diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 5db40b6f9f..969118b8cf 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -875,14 +875,14 @@ func NewChecker(program Program) *Checker { c.legacyDecorators = c.compilerOptions.ExperimentalDecorators == core.TSTrue c.emitStandardClassFields = !c.compilerOptions.UseDefineForClassFields.IsFalse() && c.compilerOptions.GetEmitScriptTarget() >= core.ScriptTargetES2022 c.allowSyntheticDefaultImports = c.compilerOptions.GetAllowSyntheticDefaultImports() - c.strictNullChecks = c.getStrictOptionValue(c.compilerOptions.StrictNullChecks) - c.strictFunctionTypes = c.getStrictOptionValue(c.compilerOptions.StrictFunctionTypes) - c.strictBindCallApply = c.getStrictOptionValue(c.compilerOptions.StrictBindCallApply) - c.strictPropertyInitialization = c.getStrictOptionValue(c.compilerOptions.StrictPropertyInitialization) - c.strictBuiltinIteratorReturn = c.getStrictOptionValue(c.compilerOptions.StrictBuiltinIteratorReturn) - c.noImplicitAny = c.getStrictOptionValue(c.compilerOptions.NoImplicitAny) - c.noImplicitThis = c.getStrictOptionValue(c.compilerOptions.NoImplicitThis) - c.useUnknownInCatchVariables = c.getStrictOptionValue(c.compilerOptions.UseUnknownInCatchVariables) + c.strictNullChecks = c.compilerOptions.GetStrictOptionValue(c.compilerOptions.StrictNullChecks) + c.strictFunctionTypes = c.compilerOptions.GetStrictOptionValue(c.compilerOptions.StrictFunctionTypes) + c.strictBindCallApply = c.compilerOptions.GetStrictOptionValue(c.compilerOptions.StrictBindCallApply) + c.strictPropertyInitialization = c.compilerOptions.GetStrictOptionValue(c.compilerOptions.StrictPropertyInitialization) + c.strictBuiltinIteratorReturn = c.compilerOptions.GetStrictOptionValue(c.compilerOptions.StrictBuiltinIteratorReturn) + c.noImplicitAny = c.compilerOptions.GetStrictOptionValue(c.compilerOptions.NoImplicitAny) + c.noImplicitThis = c.compilerOptions.GetStrictOptionValue(c.compilerOptions.NoImplicitThis) + c.useUnknownInCatchVariables = c.compilerOptions.GetStrictOptionValue(c.compilerOptions.UseUnknownInCatchVariables) c.exactOptionalPropertyTypes = c.compilerOptions.ExactOptionalPropertyTypes == core.TSTrue c.canCollectSymbolAliasAccessibilityData = c.compilerOptions.VerbatimModuleSyntax.IsFalseOrUnknown() c.arrayVariances = []VarianceFlags{VarianceFlagsCovariant} @@ -1106,13 +1106,6 @@ func (c *Checker) reportUnmeasurableWorker(t *Type) *Type { return t } -func (c *Checker) getStrictOptionValue(value core.Tristate) bool { - if value != core.TSUnknown { - return value == core.TSTrue - } - return c.compilerOptions.Strict == core.TSTrue -} - // Resolve to the global class or interface by the given name and arity, or emptyObjectType/emptyGenericType otherwise func (c *Checker) getGlobalTypeResolver(name string, arity int, reportErrors bool) func() *Type { return core.Memoize(func() *Type { diff --git a/internal/collections/syncmap.go b/internal/collections/syncmap.go index 35c81978b6..81d0af817f 100644 --- a/internal/collections/syncmap.go +++ b/internal/collections/syncmap.go @@ -73,3 +73,12 @@ func (s *SyncMap[K, V]) Keys() iter.Seq[K] { }) } } + +func (s *SyncMap[K, V]) Clone() *SyncMap[K, V] { + clone := &SyncMap[K, V]{} + s.m.Range(func(key, value any) bool { + clone.m.Store(key, value) + return true + }) + return clone +} diff --git a/internal/compiler/emitter.go b/internal/compiler/emitter.go index 6e6cc023bc..daaf74e31c 100644 --- a/internal/compiler/emitter.go +++ b/internal/compiler/emitter.go @@ -262,7 +262,7 @@ func (e *emitter) printSourceFile(jsFilePath string, sourceMapFilePath string, s // Write the source map if len(sourceMapFilePath) > 0 { sourceMap := sourceMapGenerator.String() - err := e.host.WriteFile(sourceMapFilePath, sourceMap, false /*writeByteOrderMark*/) + err := e.writeText(sourceMapFilePath, sourceMap, false /*writeByteOrderMark*/, nil) if err != nil { e.emitterDiagnostics.Add(ast.NewCompilerDiagnostic(diagnostics.Could_not_write_file_0_Colon_1, jsFilePath, err.Error())) } else { @@ -275,18 +275,12 @@ func (e *emitter) printSourceFile(jsFilePath string, sourceMapFilePath string, s // Write the output file text := e.writer.String() - var err error - var skippedDtsWrite bool - if e.writeFile == nil { - err = e.host.WriteFile(jsFilePath, text, e.host.Options().EmitBOM.IsTrue()) - } else { - data := &WriteFileData{ - SourceMapUrlPos: sourceMapUrlPos, - Diagnostics: e.emitterDiagnostics.GetDiagnostics(), - } - err = e.writeFile(jsFilePath, text, e.host.Options().EmitBOM.IsTrue(), data) - skippedDtsWrite = data.SkippedDtsWrite + data := &WriteFileData{ + SourceMapUrlPos: sourceMapUrlPos, + Diagnostics: e.emitterDiagnostics.GetDiagnostics(), } + err := e.writeText(jsFilePath, text, options.EmitBOM.IsTrue(), data) + skippedDtsWrite := data.SkippedDtsWrite if err != nil { e.emitterDiagnostics.Add(ast.NewCompilerDiagnostic(diagnostics.Could_not_write_file_0_Colon_1, jsFilePath, err.Error())) } else if !skippedDtsWrite { @@ -297,6 +291,13 @@ func (e *emitter) printSourceFile(jsFilePath string, sourceMapFilePath string, s e.writer.Clear() } +func (e *emitter) writeText(fileName string, text string, writeByteOrderMark bool, data *WriteFileData) error { + if e.writeFile != nil { + return e.writeFile(fileName, text, writeByteOrderMark, data) + } + return e.host.WriteFile(fileName, text, writeByteOrderMark) +} + func shouldEmitSourceMaps(mapOptions *core.CompilerOptions, sourceFile *ast.SourceFile) bool { return (mapOptions.SourceMap.IsTrue() || mapOptions.InlineSourceMap.IsTrue()) && !tspath.FileExtensionIs(sourceFile.FileName(), tspath.ExtensionJson) diff --git a/internal/compiler/program.go b/internal/compiler/program.go index 3de0851adf..096b87f048 100644 --- a/internal/compiler/program.go +++ b/internal/compiler/program.go @@ -542,13 +542,6 @@ func (p *Program) verifyCompilerOptions() { } } - getStrictOptionValue := func(value core.Tristate) bool { - if value != core.TSUnknown { - return value == core.TSTrue - } - return options.Strict == core.TSTrue - } - // Removed in TS7 if options.BaseUrl != "" { @@ -586,10 +579,10 @@ func (p *Program) verifyCompilerOptions() { createRemovedOptionDiagnostic("module", "UMD", "") } - if options.StrictPropertyInitialization.IsTrue() && !getStrictOptionValue(options.StrictNullChecks) { + if options.StrictPropertyInitialization.IsTrue() && !options.GetStrictOptionValue(options.StrictNullChecks) { createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "strictPropertyInitialization", "strictNullChecks") } - if options.ExactOptionalPropertyTypes.IsTrue() && !getStrictOptionValue(options.StrictNullChecks) { + if options.ExactOptionalPropertyTypes.IsTrue() && !options.GetStrictOptionValue(options.StrictNullChecks) { createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "exactOptionalPropertyTypes", "strictNullChecks") } @@ -1341,10 +1334,12 @@ type WriteFileData struct { SkippedDtsWrite bool } +type WriteFile func(fileName string, text string, writeByteOrderMark bool, data *WriteFileData) error + type EmitOptions struct { TargetSourceFile *ast.SourceFile // Single file to emit. If `nil`, emits all files EmitOnly EmitOnly - WriteFile func(fileName string, text string, writeByteOrderMark bool, data *WriteFileData) error + WriteFile WriteFile } type EmitResult struct { diff --git a/internal/core/compileroptions.go b/internal/core/compileroptions.go index 7da3fba394..3252fa0d5d 100644 --- a/internal/core/compileroptions.go +++ b/internal/core/compileroptions.go @@ -292,6 +292,13 @@ func (options *CompilerOptions) GetJSXTransformEnabled() bool { return jsx == JsxEmitReact || jsx == JsxEmitReactJSX || jsx == JsxEmitReactJSXDev } +func (options *CompilerOptions) GetStrictOptionValue(value Tristate) bool { + if value != TSUnknown { + return value == TSTrue + } + return options.Strict == TSTrue +} + func (options *CompilerOptions) GetEffectiveTypeRoots(currentDirectory string) (result []string, fromConfig bool) { if options.TypeRoots != nil { return options.TypeRoots, true diff --git a/internal/core/watchoptions.go b/internal/core/watchoptions.go index e1840054b6..42d85775fe 100644 --- a/internal/core/watchoptions.go +++ b/internal/core/watchoptions.go @@ -1,5 +1,7 @@ package core +import "time" + type WatchOptions struct { Interval *int `json:"watchInterval"` FileKind WatchFileKind `json:"watchFile"` @@ -41,3 +43,11 @@ const ( PollingKindDynamicPriority PollingKind = 3 PollingKindFixedChunkSize PollingKind = 4 ) + +func (w *WatchOptions) WatchInterval() time.Duration { + watchInterval := 1000 * time.Millisecond + if w != nil && w.Interval != nil { + watchInterval = time.Duration(*w.Interval) * time.Millisecond + } + return watchInterval +} diff --git a/internal/diagnostics/diagnostics_generated.go b/internal/diagnostics/diagnostics_generated.go index 56fa836f40..bb25f204aa 100644 --- a/internal/diagnostics/diagnostics_generated.go +++ b/internal/diagnostics/diagnostics_generated.go @@ -2980,6 +2980,8 @@ var Project_0_is_out_of_date_because_input_1_does_not_exist = &Message{code: 642 var Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files = &Message{code: 6421, category: CategoryMessage, key: "Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421", text: "Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files."} +var Project_0_is_out_of_date_because_it_has_errors = &Message{code: 6423, category: CategoryMessage, key: "Project_0_is_out_of_date_because_it_has_errors_6423", text: "Project '{0}' is out of date because it has errors."} + var The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1 = &Message{code: 6500, category: CategoryMessage, key: "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", text: "The expected type comes from property '{0}' which is declared here on type '{1}'"} var The_expected_type_comes_from_this_index_signature = &Message{code: 6501, category: CategoryMessage, key: "The_expected_type_comes_from_this_index_signature_6501", text: "The expected type comes from this index signature."} diff --git a/internal/diagnostics/extraDiagnosticMessages.json b/internal/diagnostics/extraDiagnosticMessages.json index 8b91e65d9f..209b72db4b 100644 --- a/internal/diagnostics/extraDiagnosticMessages.json +++ b/internal/diagnostics/extraDiagnosticMessages.json @@ -38,5 +38,9 @@ "Failed to update timestamp of file '{0}'.": { "category": "Message", "code": 5074 + }, + "Project '{0}' is out of date because it has errors.": { + "category": "Message", + "code": 6423 } } diff --git a/internal/diagnosticwriter/diagnosticwriter.go b/internal/diagnosticwriter/diagnosticwriter.go index 520f769e8d4..b4d879d224 100644 --- a/internal/diagnosticwriter/diagnosticwriter.go +++ b/internal/diagnosticwriter/diagnosticwriter.go @@ -10,6 +10,7 @@ import ( "unicode" "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/diagnostics" "github.com/microsoft/typescript-go/internal/scanner" "github.com/microsoft/typescript-go/internal/tspath" @@ -139,7 +140,8 @@ func writeCodeSnippet(writer io.Writer, sourceFile *ast.SourceFile, start int, l fmt.Fprint(writer, resetEscapeSequence) fmt.Fprint(writer, gutterSeparator) fmt.Fprint(writer, squiggleColor) - if i == firstLine { + switch i { + case firstLine: // If we're on the last line, then limit it to the last character of the last line. // Otherwise, we'll just squiggle the rest of the line, giving 'slice' no end position. var lastCharForLine int @@ -153,10 +155,10 @@ func writeCodeSnippet(writer io.Writer, sourceFile *ast.SourceFile, start int, l // then squiggle the remainder of the line. fmt.Fprint(writer, strings.Repeat(" ", firstLineChar)) fmt.Fprint(writer, strings.Repeat("~", lastCharForLine-firstLineChar)) - } else if i == lastLine { + case lastLine: // Squiggle until the final character. fmt.Fprint(writer, strings.Repeat("~", lastLineChar)) - } else { + default: // Squiggle the entire line. fmt.Fprint(writer, strings.Repeat("~", len(lineContent))) } @@ -263,13 +265,14 @@ func WriteErrorSummaryText(output io.Writer, allDiagnostics []*ast.Diagnostic, f message = diagnostics.Found_1_error_in_0.Format(firstFileName) } } else { - if numErroringFiles == 0 { + switch numErroringFiles { + case 0: // No file-specific errors. message = diagnostics.Found_0_errors.Format(totalErrorCount) - } else if numErroringFiles == 1 { + case 1: // One file with errors. message = diagnostics.Found_0_errors_in_the_same_file_starting_at_Colon_1.Format(totalErrorCount, firstFileName) - } else { + default: // Multiple files with errors. message = diagnostics.Found_0_errors_in_1_files.Format(totalErrorCount, numErroringFiles) } @@ -397,3 +400,19 @@ func FormatDiagnosticsStatusAndTime(output io.Writer, time string, diag *ast.Dia fmt.Fprint(output, time, " - ") WriteFlattenedDiagnosticMessage(output, diag, formatOpts.NewLine) } + +var ScreenStartingCodes = []int32{ + diagnostics.Starting_compilation_in_watch_mode.Code(), + diagnostics.File_change_detected_Starting_incremental_compilation.Code(), +} + +func TryClearScreen(output io.Writer, diag *ast.Diagnostic, options *core.CompilerOptions) bool { + if !options.PreserveWatchOutput.IsTrue() && + !options.ExtendedDiagnostics.IsTrue() && + !options.Diagnostics.IsTrue() && + slices.Contains(ScreenStartingCodes, diag.Code()) { + fmt.Fprint(output, "\x1B[2J\x1B[3J\x1B[H") // Clear screen and move cursor to home position + return true + } + return false +} diff --git a/internal/execute/build/buildtask.go b/internal/execute/build/buildtask.go index 3c69fc7847..5ee2c54593 100644 --- a/internal/execute/build/buildtask.go +++ b/internal/execute/build/buildtask.go @@ -2,7 +2,11 @@ package build import ( "fmt" + "slices" "strings" + "sync" + "sync/atomic" + "time" "github.com/microsoft/typescript-go/internal/ast" "github.com/microsoft/typescript-go/internal/collections" @@ -15,12 +19,40 @@ import ( "github.com/microsoft/typescript-go/internal/tspath" ) +type updateKind uint + +const ( + updateKindNone updateKind = iota + updateKindConfig + updateKindUpdate +) + +type buildKind uint + +const ( + buildKindNone buildKind = iota + buildKindPseudo + buildKindProgram +) + +type upstreamTask struct { + task *buildTask + refIndex int +} +type buildInfoEntry struct { + buildInfo *incremental.BuildInfo + path tspath.Path + mTime time.Time + dtsTime *time.Time +} + type buildTask struct { - config string - resolved *tsoptions.ParsedCommandLine - upStream []*buildTask - status *upToDateStatus - done chan struct{} + config string + resolved *tsoptions.ParsedCommandLine + upStream []*upstreamTask + downStream []*buildTask // Only set and used in watch mode + status *upToDateStatus + done chan struct{} // task reporting builder strings.Builder @@ -30,23 +62,34 @@ type buildTask struct { exitStatus tsc.ExitStatus statistics *tsc.Statistics program *incremental.Program - pseudoBuild bool + buildKind buildKind filesToDelete []string prevReporter *buildTask reportDone chan struct{} + + // Watching things + configTime time.Time + extendedConfigTimes []time.Time + inputFiles []time.Time + + buildInfoEntry *buildInfoEntry + buildInfoEntryMu sync.Mutex + + pending atomic.Bool + isInitialCycle bool + downStreamUpdateMu sync.Mutex + dirty bool } -func (t *buildTask) waitOnUpstream() []*upToDateStatus { - upStreamStatus := make([]*upToDateStatus, len(t.upStream)) - for i, upstream := range t.upStream { - <-upstream.done - upStreamStatus[i] = upstream.status +func (t *buildTask) waitOnUpstream() { + for _, upstream := range t.upStream { + <-upstream.task.done } - return upStreamStatus } -func (t *buildTask) unblockDownstream(status *upToDateStatus) { - t.status = status +func (t *buildTask) unblockDownstream() { + t.pending.Store(false) + t.isInitialCycle = false close(t.done) } @@ -63,21 +106,27 @@ func (t *buildTask) report(orchestrator *Orchestrator, configPath tspath.Path, b buildResult.errors = append(core.IfElse(buildResult.errors != nil, buildResult.errors, []*ast.Diagnostic{}), t.errors...) } fmt.Fprint(orchestrator.opts.Sys.Writer(), t.builder.String()) + t.builder.Reset() if t.exitStatus > buildResult.result.Status { buildResult.result.Status = t.exitStatus } if t.statistics != nil { buildResult.programStats = append(buildResult.programStats, t.statistics) + t.statistics = nil } - if t.program != nil { + // If we built the program, or updated timestamps, or had errors, we need to + // delete files that are no longer needed + switch t.buildKind { + case buildKindProgram: if orchestrator.opts.Testing != nil { orchestrator.opts.Testing.OnProgram(t.program) } t.program.MakeReadonly() buildResult.statistics.ProjectsBuilt++ - } - if t.pseudoBuild { + t.buildKind = buildKindNone + case buildKindPseudo: buildResult.statistics.TimestampUpdates++ + t.buildKind = buildKindNone } buildResult.filesToDelete = append(buildResult.filesToDelete, t.filesToDelete...) close(t.reportDone) @@ -85,82 +134,150 @@ func (t *buildTask) report(orchestrator *Orchestrator, configPath tspath.Path, b func (t *buildTask) buildProject(orchestrator *Orchestrator, path tspath.Path) { // Wait on upstream tasks to complete - upStreamStatus := t.waitOnUpstream() - status := t.getUpToDateStatus(orchestrator, path, upStreamStatus) - t.reportUpToDateStatus(orchestrator, status) - if handled := t.handleStatusThatDoesntRequireBuild(orchestrator, status); handled == nil { - if orchestrator.opts.Command.BuildOptions.Verbose.IsTrue() { - t.reportStatus(ast.NewCompilerDiagnostic(diagnostics.Building_project_0, orchestrator.relativeFileName(t.config))) - } - - // Real build - var compileTimes tsc.CompileTimes - configAndTime, _ := orchestrator.host.resolvedReferences.Load(path) - compileTimes.ConfigTime = configAndTime.time - buildInfoReadStart := orchestrator.opts.Sys.Now() - oldProgram := incremental.ReadBuildInfoProgram(t.resolved, orchestrator.host, orchestrator.host) - compileTimes.BuildInfoReadTime = orchestrator.opts.Sys.Now().Sub(buildInfoReadStart) - parseStart := orchestrator.opts.Sys.Now() - program := compiler.NewProgram(compiler.ProgramOptions{ - Config: t.resolved, - Host: &compilerHost{ - host: orchestrator.host, - trace: tsc.GetTraceWithWriterFromSys(&t.builder, orchestrator.opts.Testing), - }, - JSDocParsingMode: ast.JSDocParsingModeParseForTypeErrors, - }) - compileTimes.ParseTime = orchestrator.opts.Sys.Now().Sub(parseStart) - changesComputeStart := orchestrator.opts.Sys.Now() - t.program = incremental.NewProgram(program, oldProgram, orchestrator.host, orchestrator.opts.Testing != nil) - compileTimes.ChangesComputeTime = orchestrator.opts.Sys.Now().Sub(changesComputeStart) - - result, statistics := tsc.EmitAndReportStatistics( - orchestrator.opts.Sys, - t.program, - program, - t.resolved, - t.reportDiagnostic, - tsc.QuietDiagnosticsReporter, - &t.builder, - &compileTimes, - orchestrator.opts.Testing, - ) - t.exitStatus = result.Status - t.statistics = statistics - if (!program.Options().NoEmitOnError.IsTrue() || len(result.Diagnostics) == 0) && - (len(result.EmitResult.EmittedFiles) > 0 || status.kind != upToDateStatusTypeOutOfDateBuildInfoWithErrors) { - // Update time stamps for rest of the outputs - t.updateTimeStamps(orchestrator, result.EmitResult.EmittedFiles, diagnostics.Updating_unchanged_output_timestamps_of_project_0) - } - - if result.Status == tsc.ExitStatusDiagnosticsPresent_OutputsSkipped || result.Status == tsc.ExitStatusDiagnosticsPresent_OutputsGenerated { - status = &upToDateStatus{kind: upToDateStatusTypeBuildErrors} + t.waitOnUpstream() + if t.pending.Load() { + t.status = t.getUpToDateStatus(orchestrator, path) + t.reportUpToDateStatus(orchestrator) + if !t.handleStatusThatDoesntRequireBuild(orchestrator) { + t.compileAndEmit(orchestrator, path) + t.updateDownstream(orchestrator, path) } else { - status = &upToDateStatus{kind: upToDateStatusTypeUpToDate} + if t.resolved != nil { + for _, diagnostic := range t.resolved.GetConfigFileParsingDiagnostics() { + t.reportDiagnostic(diagnostic) + } + } + if len(t.errors) > 0 { + t.exitStatus = tsc.ExitStatusDiagnosticsPresent_OutputsSkipped + } } } else { - status = handled - if t.resolved != nil { - for _, diagnostic := range t.resolved.GetConfigFileParsingDiagnostics() { - t.reportDiagnostic(diagnostic) + if len(t.errors) > 0 { + t.reportUpToDateStatus(orchestrator) + for _, err := range t.errors { + // Should not add the diagnostics so just reporting + t.diagnosticReporter(err) } } - if len(t.errors) > 0 { - t.exitStatus = tsc.ExitStatusDiagnosticsPresent_OutputsSkipped + } + t.unblockDownstream() +} + +func (t *buildTask) updateDownstream(orchestrator *Orchestrator, path tspath.Path) { + if t.isInitialCycle { + return + } + if orchestrator.opts.Command.BuildOptions.StopBuildOnErrors.IsTrue() && t.status.isError() { + return + } + + for _, downStream := range t.downStream { + downStream.downStreamUpdateMu.Lock() + if downStream.status != nil { + switch downStream.status.kind { + case upToDateStatusTypeUpToDate: + if !t.program.HasChangedDtsFile() { + downStream.status = &upToDateStatus{kind: upToDateStatusTypeUpToDateWithUpstreamTypes, data: downStream.status.data} + break + } + fallthrough + case upToDateStatusTypeUpToDateWithUpstreamTypes, + upToDateStatusTypeUpToDateWithInputFileText: + if t.program.HasChangedDtsFile() { + downStream.status = &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{t.config, downStream.status.oldestOutputFileName()}} + } + case upToDateStatusTypeUpstreamErrors: + upstreamErrors := downStream.status.upstreamErrors() + refConfig := core.ResolveConfigFileNameOfProjectReference(upstreamErrors.ref) + if orchestrator.toPath(refConfig) == path { + downStream.resetStatus() + } + } } + downStream.pending.Store(true) + downStream.downStreamUpdateMu.Unlock() } - t.unblockDownstream(status) } -func (t *buildTask) handleStatusThatDoesntRequireBuild(orchestrator *Orchestrator, status *upToDateStatus) *upToDateStatus { - switch status.kind { +func (t *buildTask) compileAndEmit(orchestrator *Orchestrator, path tspath.Path) { + t.errors = nil + if orchestrator.opts.Command.BuildOptions.Verbose.IsTrue() { + t.reportStatus(ast.NewCompilerDiagnostic(diagnostics.Building_project_0, orchestrator.relativeFileName(t.config))) + } + + // Real build + var compileTimes tsc.CompileTimes + configTime, _ := orchestrator.host.configTimes.Load(path) + compileTimes.ConfigTime = configTime + buildInfoReadStart := orchestrator.opts.Sys.Now() + var oldProgram *incremental.Program + if !orchestrator.opts.Command.BuildOptions.Force.IsTrue() { + if t.program != nil { + oldProgram = t.program + } else { + oldProgram = incremental.ReadBuildInfoProgram(t.resolved, orchestrator.host, orchestrator.host) + } + } + compileTimes.BuildInfoReadTime = orchestrator.opts.Sys.Now().Sub(buildInfoReadStart) + parseStart := orchestrator.opts.Sys.Now() + program := compiler.NewProgram(compiler.ProgramOptions{ + Config: t.resolved, + Host: &compilerHost{ + host: orchestrator.host, + trace: tsc.GetTraceWithWriterFromSys(&t.builder, orchestrator.opts.Testing), + }, + JSDocParsingMode: ast.JSDocParsingModeParseForTypeErrors, + }) + compileTimes.ParseTime = orchestrator.opts.Sys.Now().Sub(parseStart) + changesComputeStart := orchestrator.opts.Sys.Now() + t.program = incremental.NewProgram(program, oldProgram, orchestrator.host, orchestrator.opts.Testing != nil) + compileTimes.ChangesComputeTime = orchestrator.opts.Sys.Now().Sub(changesComputeStart) + + result, statistics := tsc.EmitAndReportStatistics(tsc.EmitInput{ + Sys: orchestrator.opts.Sys, + ProgramLike: t.program, + Program: program, + Config: t.resolved, + ReportDiagnostic: t.reportDiagnostic, + ReportErrorSummary: tsc.QuietDiagnosticsReporter, + Writer: &t.builder, + WriteFile: func(fileName, text string, writeByteOrderMark bool, data *compiler.WriteFileData) error { + return t.writeFile(orchestrator, fileName, text, writeByteOrderMark, data) + }, + CompileTimes: &compileTimes, + Testing: orchestrator.opts.Testing, + TestingMTimesCache: orchestrator.host.mTimes, + }) + t.exitStatus = result.Status + t.statistics = statistics + if (!program.Options().NoEmitOnError.IsTrue() || len(result.Diagnostics) == 0) && + (len(result.EmitResult.EmittedFiles) > 0 || t.status.kind != upToDateStatusTypeOutOfDateBuildInfoWithErrors) { + // Update time stamps for rest of the outputs + t.updateTimeStamps(orchestrator, result.EmitResult.EmittedFiles, diagnostics.Updating_unchanged_output_timestamps_of_project_0) + } + t.buildKind = buildKindProgram + if result.Status == tsc.ExitStatusDiagnosticsPresent_OutputsSkipped || result.Status == tsc.ExitStatusDiagnosticsPresent_OutputsGenerated { + t.status = &upToDateStatus{kind: upToDateStatusTypeBuildErrors} + } else { + var oldestOutputFileName string + if len(result.EmitResult.EmittedFiles) > 0 { + oldestOutputFileName = result.EmitResult.EmittedFiles[0] + } else { + oldestOutputFileName = core.FirstOrNilSeq(t.resolved.GetOutputFileNames()) + } + t.status = &upToDateStatus{kind: upToDateStatusTypeUpToDate, data: oldestOutputFileName} + } +} + +func (t *buildTask) handleStatusThatDoesntRequireBuild(orchestrator *Orchestrator) bool { + switch t.status.kind { case upToDateStatusTypeUpToDate: if orchestrator.opts.Command.BuildOptions.Dry.IsTrue() { t.reportStatus(ast.NewCompilerDiagnostic(diagnostics.Project_0_is_up_to_date, t.config)) } - return status + return true case upToDateStatusTypeUpstreamErrors: - upstreamStatus := status.data.(*upstreamErrors) + upstreamStatus := t.status.upstreamErrors() if orchestrator.opts.Command.BuildOptions.Verbose.IsTrue() { t.reportStatus(ast.NewCompilerDiagnostic( core.IfElse( @@ -172,37 +289,40 @@ func (t *buildTask) handleStatusThatDoesntRequireBuild(orchestrator *Orchestrato orchestrator.relativeFileName(upstreamStatus.ref), )) } - return status + return true case upToDateStatusTypeSolution: - return status + return true case upToDateStatusTypeConfigFileNotFound: t.reportDiagnostic(ast.NewCompilerDiagnostic(diagnostics.File_0_not_found, t.config)) - return status + return true } // update timestamps - if status.isPseudoBuild() { + if t.status.isPseudoBuild() { if orchestrator.opts.Command.BuildOptions.Dry.IsTrue() { t.reportStatus(ast.NewCompilerDiagnostic(diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, t.config)) - status = &upToDateStatus{kind: upToDateStatusTypeUpToDate} - return status + t.status = &upToDateStatus{kind: upToDateStatusTypeUpToDate} + return true } t.updateTimeStamps(orchestrator, nil, diagnostics.Updating_output_timestamps_of_project_0) - status = &upToDateStatus{kind: upToDateStatusTypeUpToDate} - t.pseudoBuild = true - return status + t.status = &upToDateStatus{kind: upToDateStatusTypeUpToDate, data: t.status.data} + t.buildKind = buildKindPseudo + return true } if orchestrator.opts.Command.BuildOptions.Dry.IsTrue() { t.reportStatus(ast.NewCompilerDiagnostic(diagnostics.A_non_dry_build_would_build_project_0, t.config)) - status = &upToDateStatus{kind: upToDateStatusTypeUpToDate} - return status + t.status = &upToDateStatus{kind: upToDateStatusTypeUpToDate} + return true } - return nil + return false } -func (t *buildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tspath.Path, upStreamStatus []*upToDateStatus) *upToDateStatus { +func (t *buildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tspath.Path) *upToDateStatus { + if t.status != nil { + return t.status + } // Config file not found if t.resolved == nil { return &upToDateStatus{kind: upToDateStatusTypeConfigFileNotFound} @@ -213,15 +333,10 @@ func (t *buildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tsp return &upToDateStatus{kind: upToDateStatusTypeSolution} } - for index, upstreamStatus := range upStreamStatus { - if upstreamStatus == nil { - // Not dependent on this upstream project (expected cycle was detected and hence skipped) - continue - } - - if orchestrator.opts.Command.BuildOptions.StopBuildOnErrors.IsTrue() && upstreamStatus.isError() { + for _, upstream := range t.upStream { + if orchestrator.opts.Command.BuildOptions.StopBuildOnErrors.IsTrue() && upstream.task.status.isError() { // Upstream project has errors, so we cannot build this project - return &upToDateStatus{kind: upToDateStatusTypeUpstreamErrors, data: &upstreamErrors{t.resolved.ProjectReferences()[index].Path, upstreamStatus.kind == upToDateStatusTypeUpstreamErrors}} + return &upToDateStatus{kind: upToDateStatusTypeUpstreamErrors, data: &upstreamErrors{t.resolved.ProjectReferences()[upstream.refIndex].Path, upstream.task.status.kind == upToDateStatusTypeUpstreamErrors}} } } @@ -231,7 +346,7 @@ func (t *buildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tsp // Check the build info buildInfoPath := t.resolved.GetBuildInfoFileName() - buildInfo := orchestrator.host.readOrStoreBuildInfo(configPath, buildInfoPath) + buildInfo, buildInfoTime := t.loadOrStoreBuildInfo(orchestrator, configPath, buildInfoPath) if buildInfo == nil { return &upToDateStatus{kind: upToDateStatusTypeOutputMissing, data: buildInfoPath} } @@ -272,7 +387,7 @@ func (t *buildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tsp } } var inputTextUnchanged bool - oldestOutputFileAndTime := fileAndTime{buildInfoPath, orchestrator.host.GetMTime(buildInfoPath)} + oldestOutputFileAndTime := fileAndTime{buildInfoPath, buildInfoTime} var newestInputFileAndTime fileAndTime var seenRoots collections.Set[tspath.Path] var buildInfoRootInfoReader *incremental.BuildInfoRootInfoReader @@ -342,8 +457,8 @@ func (t *buildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tsp } var refDtsUnchanged bool - for index, upstreamStatus := range upStreamStatus { - if upstreamStatus == nil || upstreamStatus.kind == upToDateStatusTypeSolution { + for _, upstream := range t.upStream { + if upstream.task.status.kind == upToDateStatusTypeSolution { // Not dependent on the status or this upstream project // (eg: expected cycle was detected and hence skipped, or is solution) continue @@ -353,26 +468,27 @@ func (t *buildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tsp // we can't be out of date because of it // inputTime will not be present if we just built this project or updated timestamps // - in that case we do want to either build or update timestamps - refInputOutputFileAndTime := upstreamStatus.inputOutputFileAndTime() + refInputOutputFileAndTime := upstream.task.status.inputOutputFileAndTime() if refInputOutputFileAndTime != nil && !refInputOutputFileAndTime.input.time.IsZero() && refInputOutputFileAndTime.input.time.Before(oldestOutputFileAndTime.time) { continue } // Check if tsbuildinfo path is shared, then we need to rebuild - if orchestrator.host.hasConflictingBuildInfo(configPath) { - return &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{t.resolved.ProjectReferences()[index].Path, oldestOutputFileAndTime.file}} + if t.hasConflictingBuildInfo(orchestrator, upstream.task) { + // We have an output older than an upstream output - we are out of date + return &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{t.resolved.ProjectReferences()[upstream.refIndex].Path, oldestOutputFileAndTime.file}} } // If the upstream project has only change .d.ts files, and we've built // *after* those files, then we're "pseudo up to date" and eligible for a fast rebuild - newestDtsChangeTime := orchestrator.host.getLatestChangedDtsMTime(t.resolved.ResolvedProjectReferencePaths()[index]) + newestDtsChangeTime := upstream.task.getLatestChangedDtsMTime(orchestrator) if !newestDtsChangeTime.IsZero() && newestDtsChangeTime.Before(oldestOutputFileAndTime.time) { refDtsUnchanged = true continue } // We have an output older than an upstream output - we are out of date - return &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{t.resolved.ProjectReferences()[index].Path, oldestOutputFileAndTime.file}} + return &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{t.resolved.ProjectReferences()[upstream.refIndex].Path, oldestOutputFileAndTime.file}} } checkInputFileTime := func(inputFile string) *upToDateStatus { @@ -415,18 +531,18 @@ func (t *buildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tsp } } -func (t *buildTask) reportUpToDateStatus(orchestrator *Orchestrator, status *upToDateStatus) { +func (t *buildTask) reportUpToDateStatus(orchestrator *Orchestrator) { if !orchestrator.opts.Command.BuildOptions.Verbose.IsTrue() { return } - switch status.kind { + switch t.status.kind { case upToDateStatusTypeConfigFileNotFound: t.reportStatus(ast.NewCompilerDiagnostic( diagnostics.Project_0_is_out_of_date_because_config_file_does_not_exist, orchestrator.relativeFileName(t.config), )) case upToDateStatusTypeUpstreamErrors: - upstreamStatus := status.data.(*upstreamErrors) + upstreamStatus := t.status.upstreamErrors() t.reportStatus(ast.NewCompilerDiagnostic( core.IfElse( upstreamStatus.refHasUpstreamErrors, @@ -436,14 +552,22 @@ func (t *buildTask) reportUpToDateStatus(orchestrator *Orchestrator, status *upT orchestrator.relativeFileName(t.config), orchestrator.relativeFileName(upstreamStatus.ref), )) - case upToDateStatusTypeUpToDate: - inputOutputFileAndTime := status.data.(*inputOutputFileAndTime) + case upToDateStatusTypeBuildErrors: t.reportStatus(ast.NewCompilerDiagnostic( - diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2, + diagnostics.Project_0_is_out_of_date_because_it_has_errors, orchestrator.relativeFileName(t.config), - orchestrator.relativeFileName(inputOutputFileAndTime.input.file), - orchestrator.relativeFileName(inputOutputFileAndTime.output.file), )) + case upToDateStatusTypeUpToDate: + // This is to ensure skipping verbose log for projects that were built, + // and then some other package changed but this package doesnt need update + if inputOutputFileAndTime := t.status.inputOutputFileAndTime(); inputOutputFileAndTime != nil { + t.reportStatus(ast.NewCompilerDiagnostic( + diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2, + orchestrator.relativeFileName(t.config), + orchestrator.relativeFileName(inputOutputFileAndTime.input.file), + orchestrator.relativeFileName(inputOutputFileAndTime.output.file), + )) + } case upToDateStatusTypeUpToDateWithUpstreamTypes: t.reportStatus(ast.NewCompilerDiagnostic( diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, @@ -458,16 +582,16 @@ func (t *buildTask) reportUpToDateStatus(orchestrator *Orchestrator, status *upT t.reportStatus(ast.NewCompilerDiagnostic( diagnostics.Project_0_is_out_of_date_because_input_1_does_not_exist, orchestrator.relativeFileName(t.config), - orchestrator.relativeFileName(status.data.(string)), + orchestrator.relativeFileName(t.status.data.(string)), )) case upToDateStatusTypeOutputMissing: t.reportStatus(ast.NewCompilerDiagnostic( diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, orchestrator.relativeFileName(t.config), - orchestrator.relativeFileName(status.data.(string)), + orchestrator.relativeFileName(t.status.data.(string)), )) case upToDateStatusTypeInputFileNewer: - inputOutput := status.data.(*inputOutputName) + inputOutput := t.status.inputOutputName() t.reportStatus(ast.NewCompilerDiagnostic( diagnostics.Project_0_is_out_of_date_because_output_1_is_older_than_input_2, orchestrator.relativeFileName(t.config), @@ -478,22 +602,22 @@ func (t *buildTask) reportUpToDateStatus(orchestrator *Orchestrator, status *upT t.reportStatus(ast.NewCompilerDiagnostic( diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted, orchestrator.relativeFileName(t.config), - orchestrator.relativeFileName(status.data.(string)), + orchestrator.relativeFileName(t.status.data.(string)), )) case upToDateStatusTypeOutOfDateBuildInfoWithErrors: t.reportStatus(ast.NewCompilerDiagnostic( diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors, orchestrator.relativeFileName(t.config), - orchestrator.relativeFileName(status.data.(string)), + orchestrator.relativeFileName(t.status.data.(string)), )) case upToDateStatusTypeOutOfDateOptions: t.reportStatus(ast.NewCompilerDiagnostic( diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions, orchestrator.relativeFileName(t.config), - orchestrator.relativeFileName(status.data.(string)), + orchestrator.relativeFileName(t.status.data.(string)), )) case upToDateStatusTypeOutOfDateRoots: - inputOutput := status.data.(*inputOutputName) + inputOutput := t.status.inputOutputName() t.reportStatus(ast.NewCompilerDiagnostic( diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more, orchestrator.relativeFileName(t.config), @@ -504,7 +628,7 @@ func (t *buildTask) reportUpToDateStatus(orchestrator *Orchestrator, status *upT t.reportStatus(ast.NewCompilerDiagnostic( diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2, orchestrator.relativeFileName(t.config), - orchestrator.relativeFileName(status.data.(string)), + orchestrator.relativeFileName(t.status.data.(string)), core.Version(), )) case upToDateStatusTypeForceBuild: @@ -515,16 +639,19 @@ func (t *buildTask) reportUpToDateStatus(orchestrator *Orchestrator, status *upT case upToDateStatusTypeSolution: // Does not need to report status default: - panic(fmt.Sprintf("Unknown up to date status kind: %v", status.kind)) + panic(fmt.Sprintf("Unknown up to date status kind: %v", t.status.kind)) } } +func (t *buildTask) canUpdateJsDtsOutputTimestamps() bool { + return !t.resolved.CompilerOptions().NoEmit.IsTrue() && !t.resolved.CompilerOptions().IsIncremental() +} + func (t *buildTask) updateTimeStamps(orchestrator *Orchestrator, emittedFiles []string, verboseMessage *diagnostics.Message) { - if t.resolved.CompilerOptions().NoEmit.IsTrue() { - return - } emitted := collections.NewSetFromItems(emittedFiles...) var verboseMessageReported bool + buildInfoName := t.resolved.GetBuildInfoFileName() + now := orchestrator.opts.Sys.Now() updateTimeStamp := func(file string) { if emitted.Has(file) { return @@ -533,19 +660,26 @@ func (t *buildTask) updateTimeStamps(orchestrator *Orchestrator, emittedFiles [] t.reportStatus(ast.NewCompilerDiagnostic(verboseMessage, orchestrator.relativeFileName(t.config))) verboseMessageReported = true } - err := orchestrator.host.SetMTime(file, orchestrator.opts.Sys.Now()) + err := orchestrator.host.SetMTime(file, now) if err != nil { t.reportDiagnostic(ast.NewCompilerDiagnostic(diagnostics.Failed_to_update_timestamp_of_file_0, file)) + } else if file == buildInfoName { + t.buildInfoEntryMu.Lock() + if t.buildInfoEntry != nil { + t.buildInfoEntry.mTime = now + } + t.buildInfoEntryMu.Unlock() + } else if t.storeOutputTimeStamp(orchestrator) { + orchestrator.host.storeMTime(file, now) } } - if t.resolved.CompilerOptions().IsIncremental() { - updateTimeStamp(t.resolved.GetBuildInfoFileName()) - } else { + if t.canUpdateJsDtsOutputTimestamps() { for outputFile := range t.resolved.GetOutputFileNames() { updateTimeStamp(outputFile) } } + updateTimeStamp(t.resolved.GetBuildInfoFileName()) } func (t *buildTask) cleanProject(orchestrator *Orchestrator, path tspath.Path) { @@ -579,3 +713,147 @@ func (t *buildTask) cleanProjectOutput(orchestrator *Orchestrator, outputFile st } } } + +func (t *buildTask) updateWatch(orchestrator *Orchestrator, oldCache *collections.SyncMap[tspath.Path, time.Time]) { + t.configTime = orchestrator.host.loadOrStoreMTime(t.config, oldCache, false) + if t.resolved != nil { + t.extendedConfigTimes = core.Map(t.resolved.ExtendedSourceFiles(), func(p string) time.Time { + return orchestrator.host.loadOrStoreMTime(p, oldCache, false) + }) + t.inputFiles = core.Map(t.resolved.FileNames(), func(p string) time.Time { + return orchestrator.host.loadOrStoreMTime(p, oldCache, false) + }) + if t.canUpdateJsDtsOutputTimestamps() { + for outputFile := range t.resolved.GetOutputFileNames() { + orchestrator.host.storeMTimeFromOldCache(outputFile, oldCache) + } + } + } +} + +func (t *buildTask) resetStatus() { + t.status = nil + t.pending.Store(true) + t.errors = nil +} + +func (t *buildTask) resetConfig(orchestrator *Orchestrator, path tspath.Path) { + t.dirty = true + orchestrator.host.resolvedReferences.delete(path) +} + +func (t *buildTask) hasUpdate(orchestrator *Orchestrator, path tspath.Path) updateKind { + var needsConfigUpdate bool + var needsUpdate bool + if configTime := orchestrator.host.GetMTime(t.config); configTime != t.configTime { + t.resetConfig(orchestrator, path) + needsConfigUpdate = true + } + if t.resolved != nil { + for index, file := range t.resolved.ExtendedSourceFiles() { + if orchestrator.host.GetMTime(file) != t.extendedConfigTimes[index] { + t.resetConfig(orchestrator, path) + needsConfigUpdate = true + } + } + for index, file := range t.resolved.FileNames() { + if orchestrator.host.GetMTime(file) != t.inputFiles[index] { + t.resetStatus() + needsUpdate = true + } + } + if !needsConfigUpdate { + configStart := orchestrator.opts.Sys.Now() + newConfig := t.resolved.ReloadFileNamesOfParsedCommandLine(orchestrator.host.FS()) + configTime := orchestrator.opts.Sys.Now().Sub(configStart) + // Make new channels if needed later + t.reportDone = make(chan struct{}) + t.done = make(chan struct{}) + if !slices.Equal(t.resolved.FileNames(), newConfig.FileNames()) { + orchestrator.host.resolvedReferences.store(path, newConfig) + orchestrator.host.configTimes.Store(path, configTime) + t.resolved = newConfig + t.resetStatus() + needsUpdate = true + } + } + } + return core.IfElse(needsConfigUpdate, updateKindConfig, core.IfElse(needsUpdate, updateKindUpdate, updateKindNone)) +} + +func (t *buildTask) loadOrStoreBuildInfo(orchestrator *Orchestrator, configPath tspath.Path, buildInfoFileName string) (*incremental.BuildInfo, time.Time) { + path := orchestrator.toPath(buildInfoFileName) + t.buildInfoEntryMu.Lock() + defer t.buildInfoEntryMu.Unlock() + if t.buildInfoEntry != nil && t.buildInfoEntry.path == path { + return t.buildInfoEntry.buildInfo, t.buildInfoEntry.mTime + } + t.buildInfoEntry = &buildInfoEntry{ + buildInfo: incremental.NewBuildInfoReader(orchestrator.host).ReadBuildInfo(t.resolved), + path: path, + } + var mTime time.Time + if t.buildInfoEntry.buildInfo != nil { + mTime = orchestrator.host.GetMTime(buildInfoFileName) + } + t.buildInfoEntry.mTime = mTime + return t.buildInfoEntry.buildInfo, mTime +} + +func (t *buildTask) onBuildInfoEmit(orchestrator *Orchestrator, buildInfoFileName string, buildInfo *incremental.BuildInfo, hasChangedDtsFile bool) { + t.buildInfoEntryMu.Lock() + defer t.buildInfoEntryMu.Unlock() + var dtsTime *time.Time + mTime := orchestrator.opts.Sys.Now() + if hasChangedDtsFile { + dtsTime = &mTime + } else if t.buildInfoEntry != nil { + dtsTime = t.buildInfoEntry.dtsTime + } + t.buildInfoEntry = &buildInfoEntry{ + buildInfo: buildInfo, + path: orchestrator.toPath(buildInfoFileName), + mTime: mTime, + dtsTime: dtsTime, + } +} + +func (t *buildTask) hasConflictingBuildInfo(orchestrator *Orchestrator, upstream *buildTask) bool { + if t.buildInfoEntry != nil && upstream.buildInfoEntry != nil { + return t.buildInfoEntry.path == upstream.buildInfoEntry.path + } + return false +} + +func (t *buildTask) getLatestChangedDtsMTime(orchestrator *Orchestrator) time.Time { + t.buildInfoEntryMu.Lock() + defer t.buildInfoEntryMu.Unlock() + if t.buildInfoEntry.dtsTime != nil { + return *t.buildInfoEntry.dtsTime + } + dtsTime := orchestrator.host.GetMTime( + tspath.GetNormalizedAbsolutePath( + t.buildInfoEntry.buildInfo.LatestChangedDtsFile, + tspath.GetDirectoryPath(string(t.buildInfoEntry.path)), + ), + ) + t.buildInfoEntry.dtsTime = &dtsTime + return dtsTime +} + +func (t *buildTask) storeOutputTimeStamp(orchestrator *Orchestrator) bool { + return orchestrator.opts.Command.CompilerOptions.Watch.IsTrue() && !t.resolved.CompilerOptions().IsIncremental() +} + +func (t *buildTask) writeFile(orchestrator *Orchestrator, fileName string, text string, writeByteOrderMark bool, data *compiler.WriteFileData) error { + err := orchestrator.host.FS().WriteFile(fileName, text, writeByteOrderMark) + if err == nil { + if data != nil && data.BuildInfo != nil { + t.onBuildInfoEmit(orchestrator, fileName, data.BuildInfo.(*incremental.BuildInfo), t.program.HasChangedDtsFile()) + } else if t.storeOutputTimeStamp(orchestrator) { + // Store time stamps + orchestrator.host.storeMTime(fileName, orchestrator.opts.Sys.Now()) + } + } + return err +} diff --git a/internal/execute/build/graph_test.go b/internal/execute/build/graph_test.go index 0265b99d36..c0288f9486 100644 --- a/internal/execute/build/graph_test.go +++ b/internal/execute/build/graph_test.go @@ -62,6 +62,37 @@ func (b *buildOrderTestCase) run(t *testing.T) { "I": {"J"}, "J": {"H", "E"}, } + reverseDeps := map[string][]string{} + for project, deps := range deps { + for _, dep := range deps { + reverseDeps[dep] = append(reverseDeps[dep], project) + } + } + verifyDeps := func(orchestrator *build.Orchestrator, buildOrder []string, hasDownStream bool) { + for index, project := range buildOrder { + upstream := core.Map(orchestrator.Upstream(b.configName(project)), b.projectName) + expectedUpstream := deps[project] + assert.Assert(t, len(upstream) <= len(expectedUpstream), fmt.Sprintf("Expected upstream for %s to be at most %d, got %d", project, len(expectedUpstream), len(upstream))) + for _, expected := range expectedUpstream { + if slices.Contains(buildOrder[:index], expected) { + assert.Assert(t, slices.Contains(upstream, expected), fmt.Sprintf("Expected upstream for %s to contain %s", project, expected)) + } else { + assert.Assert(t, !slices.Contains(upstream, expected), fmt.Sprintf("Expected upstream for %s to not contain %s", project, expected)) + } + } + + downstream := core.Map(orchestrator.Downstream(b.configName(project)), b.projectName) + expectedDownstream := core.IfElse(hasDownStream, reverseDeps[project], nil) + assert.Assert(t, len(downstream) <= len(expectedDownstream), fmt.Sprintf("Expected downstream for %s to be at most %d, got %d", project, len(expectedDownstream), len(downstream))) + for _, expected := range expectedDownstream { + if slices.Contains(buildOrder[index+1:], expected) { + assert.Assert(t, slices.Contains(downstream, expected), fmt.Sprintf("Expected downstream for %s to contain %s", project, expected)) + } else { + assert.Assert(t, !slices.Contains(downstream, expected), fmt.Sprintf("Expected downstream for %s to not contain %s", project, expected)) + } + } + } + } for _, project := range []string{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J"} { files[fmt.Sprintf("/home/src/workspaces/project/%s/%s.ts", project, project)] = "export {}" referencesStr := "" @@ -84,22 +115,10 @@ func (b *buildOrderTestCase) run(t *testing.T) { Sys: sys, Command: buildCommand, }) - orchestrator.GenerateGraph() + orchestrator.GenerateGraph(nil) buildOrder := core.Map(orchestrator.Order(), b.projectName) assert.DeepEqual(t, buildOrder, b.expected) - - for index, project := range buildOrder { - upstream := core.Map(orchestrator.Upstream(b.configName(project)), b.projectName) - expectedUpstream := deps[project] - assert.Assert(t, len(upstream) <= len(expectedUpstream), fmt.Sprintf("Expected upstream for %s to be at most %d, got %d", project, len(expectedUpstream), len(upstream))) - for _, expected := range expectedUpstream { - if slices.Contains(buildOrder[:index], expected) { - assert.Assert(t, slices.Contains(upstream, expected), fmt.Sprintf("Expected upstream for %s to contain %s", project, expected)) - } else { - assert.Assert(t, !slices.Contains(upstream, expected), fmt.Sprintf("Expected upstream for %s to not contain %s", project, expected)) - } - } - } + verifyDeps(orchestrator, buildOrder, false) if !b.circular { for project, projectDeps := range deps { @@ -116,5 +135,19 @@ func (b *buildOrderTestCase) run(t *testing.T) { } } } + + orchestrator.GenerateGraphReusingOldTasks() + buildOrder2 := core.Map(orchestrator.Order(), b.projectName) + assert.DeepEqual(t, buildOrder2, b.expected) + + argsWatch := append([]string{"--build", "--watch"}, b.projects...) + buildCommandWatch := tsoptions.ParseBuildCommandLine(argsWatch, sys) + orchestrator = build.NewOrchestrator(build.Options{ + Sys: sys, + Command: buildCommandWatch, + }) + orchestrator.GenerateGraph(nil) + buildOrder3 := core.Map(orchestrator.Order(), b.projectName) + verifyDeps(orchestrator, buildOrder3, true) }) } diff --git a/internal/execute/build/host.go b/internal/execute/build/host.go index e9554f32ad..91f50aa59c 100644 --- a/internal/execute/build/host.go +++ b/internal/execute/build/host.go @@ -13,87 +13,28 @@ import ( "github.com/microsoft/typescript-go/internal/vfs" ) -type configAndTime struct { - resolved *tsoptions.ParsedCommandLine - time time.Duration -} - -type buildInfoAndConfig struct { - buildInfo *incremental.BuildInfo - config tspath.Path -} - type host struct { - builder *Orchestrator - host compiler.CompilerHost + orchestrator *Orchestrator + host compiler.CompilerHost + + // Caches that last only for build cycle and then cleared out extendedConfigCache tsc.ExtendedConfigCache - sourceFiles collections.SyncMap[ast.SourceFileParseOptions, *ast.SourceFile] - resolvedReferences collections.SyncMap[tspath.Path, *configAndTime] + sourceFiles parseCache[ast.SourceFileParseOptions, *ast.SourceFile] + configTimes collections.SyncMap[tspath.Path, time.Duration] - buildInfos collections.SyncMap[tspath.Path, *buildInfoAndConfig] - mTimes collections.SyncMap[tspath.Path, time.Time] - latestChangedDtsFiles collections.SyncMap[tspath.Path, time.Time] + // caches that stay as long as they are needed + resolvedReferences parseCache[tspath.Path, *tsoptions.ParsedCommandLine] + mTimes *collections.SyncMap[tspath.Path, time.Time] } var ( - _ vfs.FS = (*host)(nil) _ compiler.CompilerHost = (*host)(nil) _ incremental.BuildInfoReader = (*host)(nil) - _ incremental.BuildHost = (*host)(nil) + _ incremental.Host = (*host)(nil) ) func (h *host) FS() vfs.FS { - return h -} - -func (h *host) UseCaseSensitiveFileNames() bool { - return h.host.FS().UseCaseSensitiveFileNames() -} - -func (h *host) FileExists(path string) bool { - return h.host.FS().FileExists(path) -} - -func (h *host) ReadFile(path string) (string, bool) { - return h.host.FS().ReadFile(path) -} - -func (h *host) WriteFile(path string, data string, writeByteOrderMark bool) error { - err := h.host.FS().WriteFile(path, data, writeByteOrderMark) - if err == nil { - filePath := h.builder.toPath(path) - h.buildInfos.Delete(filePath) - h.mTimes.Delete(filePath) - } - return err -} - -func (h *host) Remove(path string) error { - return h.host.FS().Remove(path) -} - -func (h *host) Chtimes(path string, aTime time.Time, mTime time.Time) error { - return h.host.FS().Chtimes(path, aTime, mTime) -} - -func (h *host) DirectoryExists(path string) bool { - return h.host.FS().DirectoryExists(path) -} - -func (h *host) GetAccessibleEntries(path string) vfs.Entries { - return h.host.FS().GetAccessibleEntries(path) -} - -func (h *host) Stat(path string) vfs.FileInfo { - return h.host.FS().Stat(path) -} - -func (h *host) WalkDir(root string, walkFn vfs.WalkDirFunc) error { - return h.host.FS().WalkDir(root, walkFn) -} - -func (h *host) Realpath(path string) string { - return h.host.FS().Realpath(path) + return h.host.FS() } func (h *host) DefaultLibraryPath() string { @@ -109,98 +50,64 @@ func (h *host) Trace(msg string) { } func (h *host) GetSourceFile(opts ast.SourceFileParseOptions) *ast.SourceFile { - if existing, loaded := h.sourceFiles.Load(opts); loaded { - return existing - } - - file := h.host.GetSourceFile(opts) // Cache dts and json files as they will be reused - if file != nil && (tspath.IsDeclarationFileName(file.FileName()) || tspath.FileExtensionIs(file.FileName(), tspath.ExtensionJson)) { - file, _ = h.sourceFiles.LoadOrStore(opts, file) - } - return file + return h.sourceFiles.loadOrStoreNewIf(opts, h.host.GetSourceFile, func(value *ast.SourceFile) bool { + return value != nil && (tspath.IsDeclarationFileName(opts.FileName) || tspath.FileExtensionIs(opts.FileName, tspath.ExtensionJson)) + }) } func (h *host) GetResolvedProjectReference(fileName string, path tspath.Path) *tsoptions.ParsedCommandLine { - if existing, loaded := h.resolvedReferences.Load(path); loaded { - return existing.resolved - } - configStart := h.builder.opts.Sys.Now() - commandLine, _ := tsoptions.GetParsedCommandLineOfConfigFilePath(fileName, path, h.builder.opts.Command.CompilerOptions, h, &h.extendedConfigCache) - configTime := h.builder.opts.Sys.Now().Sub(configStart) - configAndTime, _ := h.resolvedReferences.LoadOrStore(path, &configAndTime{resolved: commandLine, time: configTime}) - return configAndTime.resolved + return h.resolvedReferences.loadOrStoreNew(path, func(path tspath.Path) *tsoptions.ParsedCommandLine { + configStart := h.orchestrator.opts.Sys.Now() + commandLine, _ := tsoptions.GetParsedCommandLineOfConfigFilePath(fileName, path, h.orchestrator.opts.Command.CompilerOptions, h, &h.extendedConfigCache) + configTime := h.orchestrator.opts.Sys.Now().Sub(configStart) + h.configTimes.Store(path, configTime) + return commandLine + }) } -func (h *host) ReadBuildInfo(buildInfoFileName string) *incremental.BuildInfo { - path := h.builder.toPath(buildInfoFileName) - if existing, loaded := h.buildInfos.Load(path); loaded { - return existing.buildInfo - } - return nil +func (h *host) ReadBuildInfo(config *tsoptions.ParsedCommandLine) *incremental.BuildInfo { + configPath := h.orchestrator.toPath(config.ConfigName()) + task := h.orchestrator.getTask(configPath) + buildInfo, _ := task.loadOrStoreBuildInfo(h.orchestrator, h.orchestrator.toPath(config.ConfigName()), config.GetBuildInfoFileName()) + return buildInfo } -func (h *host) readOrStoreBuildInfo(configPath tspath.Path, buildInfoFileName string) *incremental.BuildInfo { - if existing, loaded := h.buildInfos.Load(h.builder.toPath(buildInfoFileName)); loaded { - return existing.buildInfo - } - - buildInfo := incremental.NewBuildInfoReader(h).ReadBuildInfo(buildInfoFileName) - entry := &buildInfoAndConfig{buildInfo, configPath} - entry, _ = h.buildInfos.LoadOrStore(h.builder.toPath(buildInfoFileName), entry) - return entry.buildInfo +func (h *host) GetMTime(file string) time.Time { + return h.loadOrStoreMTime(file, nil, true) } -func (h *host) hasConflictingBuildInfo(configPath tspath.Path) bool { - if existing, loaded := h.buildInfos.Load(configPath); loaded { - return existing.config != configPath - } - return false +func (h *host) SetMTime(file string, mTime time.Time) error { + return h.FS().Chtimes(file, time.Time{}, mTime) } -func (h *host) GetMTime(file string) time.Time { - path := h.builder.toPath(file) +func (h *host) loadOrStoreMTime(file string, oldCache *collections.SyncMap[tspath.Path, time.Time], store bool) time.Time { + path := h.orchestrator.toPath(file) if existing, loaded := h.mTimes.Load(path); loaded { return existing } - stat := h.host.FS().Stat(file) + var found bool var mTime time.Time - if stat != nil { - mTime = stat.ModTime() + if oldCache != nil { + mTime, found = oldCache.Load(path) + } + if !found { + mTime = incremental.GetMTime(h.host, file) + } + if store { + mTime, _ = h.mTimes.LoadOrStore(path, mTime) } - mTime, _ = h.mTimes.LoadOrStore(path, mTime) return mTime } -func (h *host) SetMTime(file string, mTime time.Time) error { - path := h.builder.toPath(file) - err := h.host.FS().Chtimes(file, time.Time{}, mTime) - if err == nil { - h.mTimes.Store(path, mTime) - } - return err +func (h *host) storeMTime(file string, mTime time.Time) { + path := h.orchestrator.toPath(file) + h.mTimes.Store(path, mTime) } -func (h *host) getLatestChangedDtsMTime(config string) time.Time { - path := h.builder.toPath(config) - if existing, loaded := h.latestChangedDtsFiles.Load(path); loaded { - return existing - } - - var changedDtsMTime time.Time - if configAndTime, loaded := h.resolvedReferences.Load(path); loaded { - buildInfoPath := configAndTime.resolved.GetBuildInfoFileName() - buildInfo := h.readOrStoreBuildInfo(path, buildInfoPath) - if buildInfo != nil && buildInfo.LatestChangedDtsFile != "" { - changedDtsMTime = h.GetMTime( - tspath.GetNormalizedAbsolutePath( - buildInfo.LatestChangedDtsFile, - tspath.GetDirectoryPath(tspath.GetNormalizedAbsolutePath(buildInfoPath, h.GetCurrentDirectory())), - ), - ) - } +func (h *host) storeMTimeFromOldCache(file string, oldCache *collections.SyncMap[tspath.Path, time.Time]) { + path := h.orchestrator.toPath(file) + if mTime, found := oldCache.Load(path); found { + h.mTimes.Store(path, mTime) } - - changedDtsMTime, _ = h.mTimes.LoadOrStore(path, changedDtsMTime) - return changedDtsMTime } diff --git a/internal/execute/build/orchestrator.go b/internal/execute/build/orchestrator.go index 27535deb86..a047973194 100644 --- a/internal/execute/build/orchestrator.go +++ b/internal/execute/build/orchestrator.go @@ -3,15 +3,19 @@ package build import ( "io" "strings" + "sync/atomic" + "time" "github.com/microsoft/typescript-go/internal/ast" "github.com/microsoft/typescript-go/internal/collections" "github.com/microsoft/typescript-go/internal/compiler" "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/diagnostics" + "github.com/microsoft/typescript-go/internal/execute/incremental" "github.com/microsoft/typescript-go/internal/execute/tsc" "github.com/microsoft/typescript-go/internal/tsoptions" "github.com/microsoft/typescript-go/internal/tspath" + "github.com/microsoft/typescript-go/internal/vfs/cachedvfs" ) type Options struct { @@ -28,10 +32,14 @@ type orchestratorResult struct { filesToDelete []string } -func (b *orchestratorResult) report(s *Orchestrator) { - tsc.CreateReportErrorSummary(s.opts.Sys, s.opts.Command.CompilerOptions)(b.errors) +func (b *orchestratorResult) report(o *Orchestrator) { + if o.opts.Command.CompilerOptions.Watch.IsTrue() { + o.watchStatusReporter(ast.NewCompilerDiagnostic(core.IfElse(len(b.errors) == 1, diagnostics.Found_1_error_Watching_for_file_changes, diagnostics.Found_0_errors_Watching_for_file_changes), len(b.errors))) + } else { + o.errorSummaryReporter(b.errors) + } if b.filesToDelete != nil { - s.createBuilderStatusReporter(nil)( + o.createBuilderStatusReporter(nil)( ast.NewCompilerDiagnostic( diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, strings.Join(core.Map(b.filesToDelete, func(f string) string { @@ -42,11 +50,11 @@ func (b *orchestratorResult) report(s *Orchestrator) { if len(b.programStats) == 0 { return } - if !s.opts.Command.CompilerOptions.Diagnostics.IsTrue() && !s.opts.Command.CompilerOptions.ExtendedDiagnostics.IsTrue() { + if !o.opts.Command.CompilerOptions.Diagnostics.IsTrue() && !o.opts.Command.CompilerOptions.ExtendedDiagnostics.IsTrue() { return } - b.statistics.Aggregate(b.programStats, s.opts.Sys.SinceStart()) - b.statistics.Report(s.opts.Sys.Writer(), s.opts.Testing) + b.statistics.Aggregate(b.programStats, o.opts.Sys.SinceStart()) + b.statistics.Report(o.opts.Sys.Writer(), o.opts.Testing) } type Orchestrator struct { @@ -55,11 +63,16 @@ type Orchestrator struct { host *host // order generation result - tasks collections.SyncMap[tspath.Path, *buildTask] + tasks *collections.SyncMap[tspath.Path, *buildTask] order []string errors []*ast.Diagnostic + + errorSummaryReporter tsc.DiagnosticsReporter + watchStatusReporter tsc.DiagnosticReporter } +var _ tsc.Watcher = (*Orchestrator)(nil) + func (o *Orchestrator) relativeFileName(fileName string) string { return tspath.ConvertToRelativePath(fileName, o.comparePathsOptions) } @@ -74,26 +87,59 @@ func (o *Orchestrator) Order() []string { func (o *Orchestrator) Upstream(configName string) []string { path := o.toPath(configName) + task := o.getTask(path) + return core.Map(task.upStream, func(t *upstreamTask) string { + return t.task.config + }) +} + +func (o *Orchestrator) Downstream(configName string) []string { + path := o.toPath(configName) + task := o.getTask(path) + return core.Map(task.downStream, func(t *buildTask) string { + return t.config + }) +} + +func (o *Orchestrator) getTask(path tspath.Path) *buildTask { task, ok := o.tasks.Load(path) if !ok { - panic("No build task found for " + configName) + panic("No build task found for " + path) } - return core.Map(task.upStream, func(t *buildTask) string { - return t.config - }) + return task } -func (o *Orchestrator) createBuildTasks(configs []string, wg core.WorkGroup) { +func (o *Orchestrator) createBuildTasks(oldTasks *collections.SyncMap[tspath.Path, *buildTask], configs []string, wg core.WorkGroup) { for _, config := range configs { wg.Queue(func() { path := o.toPath(config) - task := &buildTask{config: config} + var task *buildTask + var program *incremental.Program + var buildInfo *buildInfoEntry + if oldTasks != nil { + if existing, ok := oldTasks.Load(path); ok { + if !existing.dirty { + // Reuse existing task if config is same + task = existing + } else { + program = existing.program + buildInfo = existing.buildInfoEntry + } + } + } + if task == nil { + task = &buildTask{config: config, isInitialCycle: oldTasks == nil} + task.pending.Store(true) + task.program = program + task.buildInfoEntry = buildInfo + } if _, loaded := o.tasks.LoadOrStore(path, task); loaded { return } task.resolved = o.host.GetResolvedProjectReference(config, path) + task.upStream = nil if task.resolved != nil { - o.createBuildTasks(task.resolved.ResolvedProjectReferencePaths(), wg) + o.createBuildTasks(oldTasks, task.resolved.ResolvedProjectReferencePaths(), wg) } }) } @@ -101,16 +147,14 @@ func (o *Orchestrator) createBuildTasks(configs []string, wg core.WorkGroup) { func (o *Orchestrator) setupBuildTask( configName string, + downStream *buildTask, inCircularContext bool, completed *collections.Set[tspath.Path], analyzing *collections.Set[tspath.Path], circularityStack []string, ) *buildTask { path := o.toPath(configName) - task, ok := o.tasks.Load(path) - if !ok { - panic("No build task found for " + configName) - } + task := o.getTask(path) if !completed.Has(path) { if analyzing.Has(path) { if !inCircularContext { @@ -125,9 +169,9 @@ func (o *Orchestrator) setupBuildTask( circularityStack = append(circularityStack, configName) if task.resolved != nil { for index, subReference := range task.resolved.ResolvedProjectReferencePaths() { - upstream := o.setupBuildTask(subReference, inCircularContext || task.resolved.ProjectReferences()[index].Circular, completed, analyzing, circularityStack) + upstream := o.setupBuildTask(subReference, task, inCircularContext || task.resolved.ProjectReferences()[index].Circular, completed, analyzing, circularityStack) if upstream != nil { - task.upStream = append(task.upStream, upstream) + task.upStream = append(task.upStream, &upstreamTask{task: upstream, refIndex: index}) } } } @@ -136,28 +180,30 @@ func (o *Orchestrator) setupBuildTask( task.reportDone = make(chan struct{}) prev := core.LastOrNil(o.order) if prev != "" { - if prevTask, ok := o.tasks.Load(o.toPath(prev)); ok { - task.prevReporter = prevTask - } else { - panic("No previous task found for " + prev) - } + task.prevReporter = o.getTask(o.toPath(prev)) } task.done = make(chan struct{}) o.order = append(o.order, configName) } + if o.opts.Command.CompilerOptions.Watch.IsTrue() && downStream != nil { + task.downStream = append(task.downStream, downStream) + } return task } -func (o *Orchestrator) GenerateGraph() { - o.host = &host{ - builder: o, - host: compiler.NewCachedFSCompilerHost(o.opts.Sys.GetCurrentDirectory(), o.opts.Sys.FS(), o.opts.Sys.DefaultLibraryPath(), nil, nil), - } +func (o *Orchestrator) GenerateGraphReusingOldTasks() { + tasks := o.tasks + o.tasks = &collections.SyncMap[tspath.Path, *buildTask]{} + o.order = nil + o.errors = nil + o.GenerateGraph(tasks) +} +func (o *Orchestrator) GenerateGraph(oldTasks *collections.SyncMap[tspath.Path, *buildTask]) { projects := o.opts.Command.ResolvedProjectPaths() // Parse all config files in parallel wg := core.NewWorkGroup(o.opts.Command.CompilerOptions.SingleThreaded.IsTrue()) - o.createBuildTasks(projects, wg) + o.createBuildTasks(oldTasks, projects, wg) wg.RunAndWait() // Generate the graph @@ -165,12 +211,97 @@ func (o *Orchestrator) GenerateGraph() { analyzing := collections.Set[tspath.Path]{} circularityStack := []string{} for _, project := range projects { - o.setupBuildTask(project, false, &completed, &analyzing, circularityStack) + o.setupBuildTask(project, nil, false, &completed, &analyzing, circularityStack) } } func (o *Orchestrator) Start() tsc.CommandLineResult { - o.GenerateGraph() + if o.opts.Command.CompilerOptions.Watch.IsTrue() { + o.watchStatusReporter(ast.NewCompilerDiagnostic(diagnostics.Starting_compilation_in_watch_mode)) + } + o.GenerateGraph(nil) + result := o.buildOrClean() + if o.opts.Command.CompilerOptions.Watch.IsTrue() { + o.Watch() + result.Watcher = o + } + return result +} + +func (o *Orchestrator) Watch() { + o.updateWatch() + o.resetCaches() + + // Start watching for file changes + if o.opts.Testing == nil { + watchInterval := o.opts.Command.WatchOptions.WatchInterval() + for { + // Testing mode: run a single cycle and exit + time.Sleep(watchInterval) + o.DoCycle() + } + } +} + +func (o *Orchestrator) updateWatch() { + oldCache := o.host.mTimes + o.host.mTimes = &collections.SyncMap[tspath.Path, time.Time]{} + wg := core.NewWorkGroup(o.opts.Command.CompilerOptions.SingleThreaded.IsTrue()) + o.tasks.Range(func(path tspath.Path, task *buildTask) bool { + wg.Queue(func() { + task.updateWatch(o, oldCache) + }) + return true + }) + wg.RunAndWait() +} + +func (o *Orchestrator) resetCaches() { + // Clean out all the caches + cachesVfs := o.host.host.FS().(*cachedvfs.FS) + cachesVfs.ClearCache() + o.host.extendedConfigCache = tsc.ExtendedConfigCache{} + o.host.sourceFiles.reset() + o.host.configTimes = collections.SyncMap[tspath.Path, time.Duration]{} +} + +func (o *Orchestrator) DoCycle() { + var needsConfigUpdate atomic.Bool + var needsUpdate atomic.Bool + mTimes := o.host.mTimes.Clone() + wg := core.NewWorkGroup(o.opts.Command.CompilerOptions.SingleThreaded.IsTrue()) + o.tasks.Range(func(path tspath.Path, task *buildTask) bool { + wg.Queue(func() { + if updateKind := task.hasUpdate(o, path); updateKind != updateKindNone { + needsUpdate.Store(true) + if updateKind == updateKindConfig { + needsConfigUpdate.Store(true) + } + } + }) + // Watch for file changes + return true + }) + wg.RunAndWait() + + if !needsUpdate.Load() { + o.host.mTimes = mTimes + o.resetCaches() + return + } + + o.watchStatusReporter(ast.NewCompilerDiagnostic(diagnostics.File_change_detected_Starting_incremental_compilation)) + if needsConfigUpdate.Load() { + // Generate new tasks + o.GenerateGraphReusingOldTasks() + } + + o.buildOrClean() + o.updateWatch() + o.resetCaches() +} + +func (o *Orchestrator) buildOrClean() tsc.CommandLineResult { build := !o.opts.Command.BuildOptions.Clean.IsTrue() if build && o.opts.Command.BuildOptions.Verbose.IsTrue() { o.createBuilderStatusReporter(nil)(ast.NewCompilerDiagnostic( @@ -226,11 +357,29 @@ func (o *Orchestrator) createDiagnosticReporter(task *buildTask) tsc.DiagnosticR } func NewOrchestrator(opts Options) *Orchestrator { - return &Orchestrator{ + orchestrator := &Orchestrator{ opts: opts, comparePathsOptions: tspath.ComparePathsOptions{ CurrentDirectory: opts.Sys.GetCurrentDirectory(), UseCaseSensitiveFileNames: opts.Sys.FS().UseCaseSensitiveFileNames(), }, + tasks: &collections.SyncMap[tspath.Path, *buildTask]{}, + } + orchestrator.host = &host{ + orchestrator: orchestrator, + host: compiler.NewCachedFSCompilerHost( + orchestrator.opts.Sys.GetCurrentDirectory(), + orchestrator.opts.Sys.FS(), + orchestrator.opts.Sys.DefaultLibraryPath(), + nil, + nil, + ), + mTimes: &collections.SyncMap[tspath.Path, time.Time]{}, + } + if opts.Command.CompilerOptions.Watch.IsTrue() { + orchestrator.watchStatusReporter = tsc.CreateWatchStatusReporter(opts.Sys, opts.Command.CompilerOptions, opts.Testing) + } else { + orchestrator.errorSummaryReporter = tsc.CreateReportErrorSummary(opts.Sys, opts.Command.CompilerOptions) } + return orchestrator } diff --git a/internal/execute/build/parseCache.go b/internal/execute/build/parseCache.go new file mode 100644 index 0000000000..73bc263612 --- /dev/null +++ b/internal/execute/build/parseCache.go @@ -0,0 +1,48 @@ +package build + +import ( + "sync" + + "github.com/microsoft/typescript-go/internal/collections" +) + +type parseCacheEntry[V any] struct { + value V + mu sync.Mutex +} + +type parseCache[K comparable, V any] struct { + entries collections.SyncMap[K, *parseCacheEntry[V]] +} + +func (c *parseCache[K, V]) loadOrStoreNew(key K, parse func(K) V) V { + return c.loadOrStoreNewIf(key, parse, func(value V) bool { return true }) +} + +func (c *parseCache[K, V]) loadOrStoreNewIf(key K, parse func(K) V, canCacheValue func(V) bool) V { + newEntry := &parseCacheEntry[V]{} + newEntry.mu.Lock() + defer newEntry.mu.Unlock() + if entry, loaded := c.entries.LoadOrStore(key, newEntry); loaded { + entry.mu.Lock() + defer entry.mu.Unlock() + if canCacheValue(entry.value) { + return entry.value + } + newEntry = entry + } + newEntry.value = parse(key) + return newEntry.value +} + +func (c *parseCache[K, V]) store(key K, value V) { + c.entries.Store(key, &parseCacheEntry[V]{value: value}) +} + +func (c *parseCache[K, V]) delete(key K) { + c.entries.Delete(key) +} + +func (c *parseCache[K, V]) reset() { + c.entries = collections.SyncMap[K, *parseCacheEntry[V]]{} +} diff --git a/internal/execute/build/uptodatestatus.go b/internal/execute/build/uptodatestatus.go index 8d6218b2f9..ca3477874d 100644 --- a/internal/execute/build/uptodatestatus.go +++ b/internal/execute/build/uptodatestatus.go @@ -36,7 +36,7 @@ const ( upToDateStatusTypeInputFileNewer // build info is out of date as we need to emit some files upToDateStatusTypeOutOfDateBuildInfoWithPendingEmit - // build info indiscates that project has errors and they need to be reported + // build info indicates that project has errors and they need to be reported upToDateStatusTypeOutOfDateBuildInfoWithErrors // build info options indicate there is work to do based on changes in options upToDateStatusTypeOutOfDateOptions @@ -105,3 +105,29 @@ func (s *upToDateStatus) inputOutputFileAndTime() *inputOutputFileAndTime { } return data } + +func (s *upToDateStatus) inputOutputName() *inputOutputName { + data, ok := s.data.(*inputOutputName) + if !ok { + return nil + } + return data +} + +func (s *upToDateStatus) oldestOutputFileName() string { + if !s.isPseudoBuild() && s.kind != upToDateStatusTypeUpToDate { + panic("only valid for up to date status of pseudo-build or up to date") + } + + if inputOutputFileAndTime := s.inputOutputFileAndTime(); inputOutputFileAndTime != nil { + return inputOutputFileAndTime.output.file + } + if inputOutputName := s.inputOutputName(); inputOutputName != nil { + return inputOutputName.output + } + return s.data.(string) +} + +func (s *upToDateStatus) upstreamErrors() *upstreamErrors { + return s.data.(*upstreamErrors) +} diff --git a/internal/execute/incremental/buildinfotosnapshot.go b/internal/execute/incremental/buildinfotosnapshot.go index 309ed32c95..10ebb40f64 100644 --- a/internal/execute/incremental/buildinfotosnapshot.go +++ b/internal/execute/incremental/buildinfotosnapshot.go @@ -10,10 +10,10 @@ import ( "github.com/microsoft/typescript-go/internal/tspath" ) -func buildInfoToSnapshot(buildInfo *BuildInfo, buildInfoFileName string, config *tsoptions.ParsedCommandLine, host compiler.CompilerHost) *snapshot { +func buildInfoToSnapshot(buildInfo *BuildInfo, config *tsoptions.ParsedCommandLine, host compiler.CompilerHost) *snapshot { to := &toSnapshot{ buildInfo: buildInfo, - buildInfoDirectory: tspath.GetDirectoryPath(tspath.GetNormalizedAbsolutePath(buildInfoFileName, config.GetCurrentDirectory())), + buildInfoDirectory: tspath.GetDirectoryPath(tspath.GetNormalizedAbsolutePath(config.GetBuildInfoFileName(), config.GetCurrentDirectory())), filePaths: make([]tspath.Path, 0, len(buildInfo.FileNames)), filePathSet: make([]*collections.Set[tspath.Path], 0, len(buildInfo.FileIdsList)), } diff --git a/internal/execute/incremental/emitfileshandler.go b/internal/execute/incremental/emitfileshandler.go index 273d0a7319..28239a6b19 100644 --- a/internal/execute/incremental/emitfileshandler.go +++ b/internal/execute/incremental/emitfileshandler.go @@ -12,8 +12,9 @@ import ( ) type emitUpdate struct { - pendingKind FileEmitKind - result *compiler.EmitResult + pendingKind FileEmitKind + result *compiler.EmitResult + dtsErrorsFromCache bool } type emitFilesHandler struct { @@ -107,10 +108,14 @@ func (h *emitFilesHandler) emitAllAffectedFiles(options compiler.EmitOptions) *c return true } pendingKind, _ := h.program.snapshot.affectedFilesPendingEmit.Load(path) - h.emitUpdates.Store(path, &emitUpdate{pendingKind: pendingKind, result: &compiler.EmitResult{ - EmitSkipped: true, - Diagnostics: diagnostics.getDiagnostics(h.program.program, affectedFile), - }}) + h.emitUpdates.Store(path, &emitUpdate{ + pendingKind: pendingKind, + result: &compiler.EmitResult{ + EmitSkipped: true, + Diagnostics: diagnostics.getDiagnostics(h.program.program, affectedFile), + }, + dtsErrorsFromCache: true, + }) } return true }) @@ -180,7 +185,7 @@ func (h *emitFilesHandler) getEmitOptions(options compiler.EmitOptions) compiler } else { err = h.program.program.Host().FS().WriteFile(fileName, text, writeByteOrderMark) } - if err != nil && differsOnlyInMap { + if err == nil && differsOnlyInMap { // Revert the time to original one err = h.program.host.SetMTime(fileName, aTime) } @@ -250,12 +255,16 @@ func (h *emitFilesHandler) updateSnapshot() []*compiler.EmitResult { if latestChangedDtsFile, ok := h.latestChangedDtsFiles.Load(file.Path()); ok { h.program.snapshot.latestChangedDtsFile = latestChangedDtsFile h.program.snapshot.buildInfoEmitPending.Store(true) + h.program.snapshot.hasChangedDtsFile = true } if update, ok := h.emitUpdates.Load(file.Path()); ok { - if update.pendingKind == 0 { - h.program.snapshot.affectedFilesPendingEmit.Delete(file.Path()) - } else { - h.program.snapshot.affectedFilesPendingEmit.Store(file.Path(), update.pendingKind) + if !update.dtsErrorsFromCache { + if update.pendingKind == 0 { + h.program.snapshot.affectedFilesPendingEmit.Delete(file.Path()) + } else { + h.program.snapshot.affectedFilesPendingEmit.Store(file.Path(), update.pendingKind) + } + h.program.snapshot.buildInfoEmitPending.Store(true) } if update.result != nil { results = append(results, update.result) @@ -263,7 +272,6 @@ func (h *emitFilesHandler) updateSnapshot() []*compiler.EmitResult { h.program.snapshot.emitDiagnosticsPerFile.Store(file.Path(), &diagnosticsOrBuildInfoDiagnosticsWithFileName{diagnostics: update.result.Diagnostics}) } } - h.program.snapshot.buildInfoEmitPending.Store(true) } } return results diff --git a/internal/execute/incremental/host.go b/internal/execute/incremental/host.go new file mode 100644 index 0000000000..55d6bbc088 --- /dev/null +++ b/internal/execute/incremental/host.go @@ -0,0 +1,39 @@ +package incremental + +import ( + "time" + + "github.com/microsoft/typescript-go/internal/compiler" +) + +type Host interface { + GetMTime(fileName string) time.Time + SetMTime(fileName string, mTime time.Time) error +} + +type host struct { + host compiler.CompilerHost +} + +var _ Host = (*host)(nil) + +func (b *host) GetMTime(fileName string) time.Time { + return GetMTime(b.host, fileName) +} + +func (b *host) SetMTime(fileName string, mTime time.Time) error { + return b.host.FS().Chtimes(fileName, time.Time{}, mTime) +} + +func CreateHost(compilerHost compiler.CompilerHost) Host { + return &host{host: compilerHost} +} + +func GetMTime(host compiler.CompilerHost, fileName string) time.Time { + stat := host.FS().Stat(fileName) + var mTime time.Time + if stat != nil { + mTime = stat.ModTime() + } + return mTime +} diff --git a/internal/execute/incremental/incremental.go b/internal/execute/incremental/incremental.go index 8d85686fec..e449401a72 100644 --- a/internal/execute/incremental/incremental.go +++ b/internal/execute/incremental/incremental.go @@ -7,7 +7,7 @@ import ( ) type BuildInfoReader interface { - ReadBuildInfo(buildInfoFileName string) *BuildInfo + ReadBuildInfo(config *tsoptions.ParsedCommandLine) *BuildInfo } var _ BuildInfoReader = (*buildInfoReader)(nil) @@ -16,7 +16,12 @@ type buildInfoReader struct { host compiler.CompilerHost } -func (r *buildInfoReader) ReadBuildInfo(buildInfoFileName string) *BuildInfo { +func (r *buildInfoReader) ReadBuildInfo(config *tsoptions.ParsedCommandLine) *BuildInfo { + buildInfoFileName := config.GetBuildInfoFileName() + if buildInfoFileName == "" { + return nil + } + // Read build info file data, ok := r.host.FS().ReadFile(buildInfoFileName) if !ok { @@ -37,20 +42,15 @@ func NewBuildInfoReader( } func ReadBuildInfoProgram(config *tsoptions.ParsedCommandLine, reader BuildInfoReader, host compiler.CompilerHost) *Program { - buildInfoFileName := config.GetBuildInfoFileName() - if buildInfoFileName == "" { - return nil - } - - // Read buildinFo file - buildInfo := reader.ReadBuildInfo(buildInfoFileName) + // Read buildInfo file + buildInfo := reader.ReadBuildInfo(config) if buildInfo == nil || !buildInfo.IsValidVersion() || !buildInfo.IsIncremental() { return nil } // Convert to information that can be used to create incremental program incrementalProgram := &Program{ - snapshot: buildInfoToSnapshot(buildInfo, buildInfoFileName, config, host), + snapshot: buildInfoToSnapshot(buildInfo, config, host), } return incrementalProgram } diff --git a/internal/execute/incremental/program.go b/internal/execute/incremental/program.go index aff766b617..1512126297 100644 --- a/internal/execute/incremental/program.go +++ b/internal/execute/incremental/program.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "slices" - "time" "github.com/go-json-experiment/json" "github.com/microsoft/typescript-go/internal/ast" @@ -24,15 +23,10 @@ const ( SignatureUpdateKindUsedVersion ) -type BuildHost interface { - GetMTime(fileName string) time.Time - SetMTime(fileName string, mTime time.Time) error -} - type Program struct { snapshot *snapshot program *compiler.Program - host BuildHost + host Host // Testing data testingData *TestingData @@ -40,11 +34,11 @@ type Program struct { var _ compiler.ProgramLike = (*Program)(nil) -func NewProgram(program *compiler.Program, oldProgram *Program, buildHost BuildHost, testing bool) *Program { +func NewProgram(program *compiler.Program, oldProgram *Program, host Host, testing bool) *Program { incrementalProgram := &Program{ snapshot: programToSnapshot(program, oldProgram, testing), program: program, - host: buildHost, + host: host, } if testing { @@ -86,6 +80,10 @@ func (p *Program) MakeReadonly() { p.testingData = nil } +func (p *Program) HasChangedDtsFile() bool { + return p.snapshot.hasChangedDtsFile +} + // Options implements compiler.AnyProgram interface. func (p *Program) Options() *core.CompilerOptions { return p.snapshot.options @@ -280,7 +278,7 @@ func (p *Program) emitBuildInfo(ctx context.Context, options compiler.EmitOption } if options.WriteFile != nil { err = options.WriteFile(buildInfoFileName, string(text), false, &compiler.WriteFileData{ - BuildInfo: &buildInfo, + BuildInfo: buildInfo, }) } else { err = p.program.Host().FS().WriteFile(buildInfoFileName, string(text), false) diff --git a/internal/execute/incremental/snapshot.go b/internal/execute/incremental/snapshot.go index 1fc0222c08..88d53c47cd 100644 --- a/internal/execute/incremental/snapshot.go +++ b/internal/execute/incremental/snapshot.go @@ -226,6 +226,7 @@ type snapshot struct { allFilesExcludingDefaultLibraryFileOnce sync.Once // Cache of all files excluding default library file for the current program allFilesExcludingDefaultLibraryFile []*ast.SourceFile + hasChangedDtsFile bool // Used with testing to add text of hash for better comparison hashWithText bool diff --git a/internal/execute/tsc.go b/internal/execute/tsc.go index 395685041f..65bf8d43bb 100644 --- a/internal/execute/tsc.go +++ b/internal/execute/tsc.go @@ -86,7 +86,6 @@ func tscBuildCompilation(sys tsc.System, buildCommand *tsoptions.ParsedBuildComm return tsc.CommandLineResult{Status: tsc.ExitStatusSuccess} } - // !!! sheetal watch mode orchestrator := build.NewOrchestrator(build.Options{ Sys: sys, Command: buildCommand, @@ -259,19 +258,19 @@ func performIncrementalCompilation( }) compileTimes.ParseTime = sys.Now().Sub(parseStart) changesComputeStart := sys.Now() - incrementalProgram := incremental.NewProgram(program, oldProgram, nil, testing != nil) + incrementalProgram := incremental.NewProgram(program, oldProgram, incremental.CreateHost(host), testing != nil) compileTimes.ChangesComputeTime = sys.Now().Sub(changesComputeStart) - result, _ := tsc.EmitAndReportStatistics( - sys, - incrementalProgram, - incrementalProgram.GetProgram(), - config, - reportDiagnostic, - reportErrorSummary, - sys.Writer(), - compileTimes, - testing, - ) + result, _ := tsc.EmitAndReportStatistics(tsc.EmitInput{ + Sys: sys, + ProgramLike: incrementalProgram, + Program: incrementalProgram.GetProgram(), + Config: config, + ReportDiagnostic: reportDiagnostic, + ReportErrorSummary: reportErrorSummary, + Writer: sys.Writer(), + CompileTimes: compileTimes, + Testing: testing, + }) if testing != nil { testing.OnProgram(incrementalProgram) } @@ -298,17 +297,17 @@ func performCompilation( JSDocParsingMode: ast.JSDocParsingModeParseForTypeErrors, }) compileTimes.ParseTime = sys.Now().Sub(parseStart) - result, _ := tsc.EmitAndReportStatistics( - sys, - program, - program, - config, - reportDiagnostic, - reportErrorSummary, - sys.Writer(), - compileTimes, - testing, - ) + result, _ := tsc.EmitAndReportStatistics(tsc.EmitInput{ + Sys: sys, + ProgramLike: program, + Program: program, + Config: config, + ReportDiagnostic: reportDiagnostic, + ReportErrorSummary: reportErrorSummary, + Writer: sys.Writer(), + CompileTimes: compileTimes, + Testing: testing, + }) return tsc.CommandLineResult{ Status: result.Status, } diff --git a/internal/execute/tsc/compile.go b/internal/execute/tsc/compile.go index dc80c796ec..4adc1df9e9 100644 --- a/internal/execute/tsc/compile.go +++ b/internal/execute/tsc/compile.go @@ -5,8 +5,10 @@ import ( "time" "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/collections" "github.com/microsoft/typescript-go/internal/compiler" "github.com/microsoft/typescript-go/internal/execute/incremental" + "github.com/microsoft/typescript-go/internal/tspath" "github.com/microsoft/typescript-go/internal/vfs" ) @@ -36,7 +38,6 @@ const ( type Watcher interface { DoCycle() - GetProgram() *incremental.Program } type CommandLineResult struct { @@ -46,13 +47,15 @@ type CommandLineResult struct { type CommandLineTesting interface { // Ensure that all emitted files are timestamped in order to ensure they are deterministic for test baseline - OnEmittedFiles(result *compiler.EmitResult) + OnEmittedFiles(result *compiler.EmitResult, mTimesCache *collections.SyncMap[tspath.Path, time.Time]) OnListFilesStart(w io.Writer) OnListFilesEnd(w io.Writer) OnStatisticsStart(w io.Writer) OnStatisticsEnd(w io.Writer) OnBuildStatusReportStart(w io.Writer) OnBuildStatusReportEnd(w io.Writer) + OnWatchStatusReportStart() + OnWatchStatusReportEnd() GetTrace(w io.Writer) func(msg string) OnProgram(program *incremental.Program) } diff --git a/internal/execute/tsc/diagnostics.go b/internal/execute/tsc/diagnostics.go index cb6154d562..abd3bf887f 100644 --- a/internal/execute/tsc/diagnostics.go +++ b/internal/execute/tsc/diagnostics.go @@ -145,3 +145,18 @@ func CreateBuilderStatusReporter(sys System, w io.Writer, options *core.Compiler fmt.Fprint(w, formatOpts.NewLine, formatOpts.NewLine) } } + +func CreateWatchStatusReporter(sys System, options *core.CompilerOptions, testing CommandLineTesting) DiagnosticReporter { + formatOpts := getFormatOptsOfSys(sys) + writeStatus := core.IfElse(shouldBePretty(sys, options), diagnosticwriter.FormatDiagnosticsStatusWithColorAndTime, diagnosticwriter.FormatDiagnosticsStatusAndTime) + return func(diagnostic *ast.Diagnostic) { + writer := sys.Writer() + if testing != nil { + testing.OnWatchStatusReportStart() + defer testing.OnWatchStatusReportEnd() + } + diagnosticwriter.TryClearScreen(writer, diagnostic, options) + writeStatus(writer, sys.Now().Format("03:04:05 PM"), diagnostic, formatOpts) + fmt.Fprint(writer, formatOpts.NewLine, formatOpts.NewLine) + } +} diff --git a/internal/execute/tsc/emit.go b/internal/execute/tsc/emit.go index 56350f9a87..f03e25b14d 100644 --- a/internal/execute/tsc/emit.go +++ b/internal/execute/tsc/emit.go @@ -5,8 +5,10 @@ import ( "fmt" "io" "runtime" + "time" "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/collections" "github.com/microsoft/typescript-go/internal/compiler" "github.com/microsoft/typescript-go/internal/tsoptions" "github.com/microsoft/typescript-go/internal/tspath" @@ -22,34 +24,38 @@ func GetTraceWithWriterFromSys(w io.Writer, testing CommandLineTesting) func(msg } } -func EmitAndReportStatistics( - sys System, - programLike compiler.ProgramLike, - program *compiler.Program, - config *tsoptions.ParsedCommandLine, - reportDiagnostic DiagnosticReporter, - reportErrorSummary DiagnosticsReporter, - w io.Writer, - compileTimes *CompileTimes, - testing CommandLineTesting, -) (CompileAndEmitResult, *Statistics) { +type EmitInput struct { + Sys System + ProgramLike compiler.ProgramLike + Program *compiler.Program + Config *tsoptions.ParsedCommandLine + ReportDiagnostic DiagnosticReporter + ReportErrorSummary DiagnosticsReporter + Writer io.Writer + WriteFile compiler.WriteFile + CompileTimes *CompileTimes + Testing CommandLineTesting + TestingMTimesCache *collections.SyncMap[tspath.Path, time.Time] +} + +func EmitAndReportStatistics(input EmitInput) (CompileAndEmitResult, *Statistics) { var statistics *Statistics - result := EmitFilesAndReportErrors(sys, programLike, program, reportDiagnostic, reportErrorSummary, w, compileTimes, testing) + result := EmitFilesAndReportErrors(input) if result.Status != ExitStatusSuccess { // compile exited early return result, nil } - result.times.totalTime = sys.SinceStart() + result.times.totalTime = input.Sys.SinceStart() - if config.CompilerOptions().Diagnostics.IsTrue() || config.CompilerOptions().ExtendedDiagnostics.IsTrue() { + if input.Config.CompilerOptions().Diagnostics.IsTrue() || input.Config.CompilerOptions().ExtendedDiagnostics.IsTrue() { var memStats runtime.MemStats // GC must be called twice to allow things to settle. runtime.GC() runtime.GC() runtime.ReadMemStats(&memStats) - statistics = statisticsFromProgram(program, compileTimes, &memStats) - statistics.Report(w, testing) + statistics = statisticsFromProgram(input, &memStats) + statistics.Report(input.Writer, input.Testing) } if result.EmitResult.EmitSkipped && len(result.Diagnostics) > 0 { @@ -60,84 +66,77 @@ func EmitAndReportStatistics( return result, statistics } -func EmitFilesAndReportErrors( - sys System, - programLike compiler.ProgramLike, - program *compiler.Program, - reportDiagnostic DiagnosticReporter, - reportErrorSummary DiagnosticsReporter, - w io.Writer, - compileTimes *CompileTimes, - testing CommandLineTesting, -) (result CompileAndEmitResult) { - result.times = compileTimes +func EmitFilesAndReportErrors(input EmitInput) (result CompileAndEmitResult) { + result.times = input.CompileTimes ctx := context.Background() allDiagnostics := compiler.GetDiagnosticsOfAnyProgram( ctx, - programLike, + input.ProgramLike, nil, false, func(ctx context.Context, file *ast.SourceFile) []*ast.Diagnostic { // Options diagnostics include global diagnostics (even though we collect them separately), // and global diagnostics create checkers, which then bind all of the files. Do this binding // early so we can track the time. - bindStart := sys.Now() - diags := programLike.GetBindDiagnostics(ctx, file) - result.times.bindTime = sys.Now().Sub(bindStart) + bindStart := input.Sys.Now() + diags := input.ProgramLike.GetBindDiagnostics(ctx, file) + result.times.bindTime = input.Sys.Now().Sub(bindStart) return diags }, func(ctx context.Context, file *ast.SourceFile) []*ast.Diagnostic { - checkStart := sys.Now() - diags := programLike.GetSemanticDiagnostics(ctx, file) - result.times.checkTime = sys.Now().Sub(checkStart) + checkStart := input.Sys.Now() + diags := input.ProgramLike.GetSemanticDiagnostics(ctx, file) + result.times.checkTime = input.Sys.Now().Sub(checkStart) return diags }, ) emitResult := &compiler.EmitResult{EmitSkipped: true, Diagnostics: []*ast.Diagnostic{}} - if !programLike.Options().ListFilesOnly.IsTrue() { - emitStart := sys.Now() - emitResult = programLike.Emit(ctx, compiler.EmitOptions{}) - result.times.emitTime = sys.Now().Sub(emitStart) + if !input.ProgramLike.Options().ListFilesOnly.IsTrue() { + emitStart := input.Sys.Now() + emitResult = input.ProgramLike.Emit(ctx, compiler.EmitOptions{ + WriteFile: input.WriteFile, + }) + result.times.emitTime = input.Sys.Now().Sub(emitStart) } if emitResult != nil { allDiagnostics = append(allDiagnostics, emitResult.Diagnostics...) } - if testing != nil { - testing.OnEmittedFiles(emitResult) + if input.Testing != nil { + input.Testing.OnEmittedFiles(emitResult, input.TestingMTimesCache) } allDiagnostics = compiler.SortAndDeduplicateDiagnostics(allDiagnostics) for _, diagnostic := range allDiagnostics { - reportDiagnostic(diagnostic) + input.ReportDiagnostic(diagnostic) } - listFiles(w, program, emitResult, testing) + listFiles(input, emitResult) - reportErrorSummary(allDiagnostics) + input.ReportErrorSummary(allDiagnostics) result.Diagnostics = allDiagnostics result.EmitResult = emitResult result.Status = ExitStatusSuccess return result } -func listFiles(w io.Writer, program *compiler.Program, emitResult *compiler.EmitResult, testing CommandLineTesting) { - if testing != nil { - testing.OnListFilesStart(w) - defer testing.OnListFilesEnd(w) +func listFiles(input EmitInput, emitResult *compiler.EmitResult) { + if input.Testing != nil { + input.Testing.OnListFilesStart(input.Writer) + defer input.Testing.OnListFilesEnd(input.Writer) } - options := program.Options() + options := input.Program.Options() if options.ListEmittedFiles.IsTrue() { for _, file := range emitResult.EmittedFiles { - fmt.Fprintln(w, "TSFILE: ", tspath.GetNormalizedAbsolutePath(file, program.GetCurrentDirectory())) + fmt.Fprintln(input.Writer, "TSFILE: ", tspath.GetNormalizedAbsolutePath(file, input.Program.GetCurrentDirectory())) } } if options.ExplainFiles.IsTrue() { - program.ExplainFiles(w) + input.Program.ExplainFiles(input.Writer) } else if options.ListFiles.IsTrue() || options.ListFilesOnly.IsTrue() { - for _, file := range program.GetSourceFiles() { - fmt.Fprintln(w, file.FileName()) + for _, file := range input.Program.GetSourceFiles() { + fmt.Fprintln(input.Writer, file.FileName()) } } } diff --git a/internal/execute/tsc/statistics.go b/internal/execute/tsc/statistics.go index fe2e548fa1..843e1902d1 100644 --- a/internal/execute/tsc/statistics.go +++ b/internal/execute/tsc/statistics.go @@ -67,17 +67,17 @@ type Statistics struct { compileTimes *CompileTimes } -func statisticsFromProgram(program *compiler.Program, compileTimes *CompileTimes, memStats *runtime.MemStats) *Statistics { +func statisticsFromProgram(input EmitInput, memStats *runtime.MemStats) *Statistics { return &Statistics{ - files: len(program.SourceFiles()), - lines: program.LineCount(), - identifiers: program.IdentifierCount(), - symbols: program.SymbolCount(), - types: program.TypeCount(), - instantiations: program.InstantiationCount(), + files: len(input.Program.SourceFiles()), + lines: input.Program.LineCount(), + identifiers: input.Program.IdentifierCount(), + symbols: input.Program.SymbolCount(), + types: input.Program.TypeCount(), + instantiations: input.Program.InstantiationCount(), memoryUsed: memStats.Alloc, memoryAllocs: memStats.Mallocs, - compileTimes: compileTimes, + compileTimes: input.CompileTimes, } } diff --git a/internal/execute/tsctests/runner.go b/internal/execute/tsctests/runner.go index 37fe3b8c38..6c5b8e4457 100644 --- a/internal/execute/tsctests/runner.go +++ b/internal/execute/tsctests/runner.go @@ -96,7 +96,7 @@ func (test *tscInput) run(t *testing.T, scenario string) { sys.baselineFSwithDiff(baselineBuilder) if result.Watcher == nil { - result = test.executeCommand(sys, baselineBuilder, commandLineArgs) + test.executeCommand(sys, baselineBuilder, commandLineArgs) } else { result.Watcher.DoCycle() } diff --git a/internal/execute/tsctests/sys.go b/internal/execute/tsctests/sys.go index 62f10bde25..9cf4b1ed99 100644 --- a/internal/execute/tsctests/sys.go +++ b/internal/execute/tsctests/sys.go @@ -218,14 +218,29 @@ func (s *testSys) GetEnvironmentVariable(name string) string { return s.env[name] } -func (s *testSys) OnEmittedFiles(result *compiler.EmitResult) { +func (s *testSys) OnEmittedFiles(result *compiler.EmitResult, mTimesCache *collections.SyncMap[tspath.Path, time.Time]) { if result != nil { for _, file := range result.EmittedFiles { + modTime := s.mapFs().GetModTime(file) + if s.serializedDiff != nil { + if diff, ok := s.serializedDiff.snap[file]; ok && diff.mTime.Equal(modTime) { + // Even though written, timestamp was reverted + continue + } + } + // Ensure that the timestamp for emitted files is in the order now := s.Now() if err := s.fsFromFileMap().Chtimes(file, time.Time{}, now); err != nil { panic("Failed to change time for emitted file: " + file + ": " + err.Error()) } + // Update the mTime cache in --b mode to store the updated timestamp so tests will behave deteministically when finding newest output + if mTimesCache != nil { + path := tspath.ToPath(file, s.GetCurrentDirectory(), s.FS().UseCaseSensitiveFileNames()) + if _, found := mTimesCache.Load(path); found { + mTimesCache.Store(path, now) + } + } } } } @@ -254,6 +269,14 @@ func (s *testSys) OnBuildStatusReportEnd(w io.Writer) { fmt.Fprintln(w, buildStatusReportEnd) } +func (s *testSys) OnWatchStatusReportStart() { + fmt.Fprintln(s.Writer(), watchStatusReportStart) +} + +func (s *testSys) OnWatchStatusReportEnd() { + fmt.Fprintln(s.Writer(), watchStatusReportEnd) +} + func (s *testSys) GetTrace(w io.Writer) func(str string) { return func(str string) { fmt.Fprintln(w, traceStart) @@ -308,9 +331,6 @@ func (s *testSys) baselinePrograms(baseline *strings.Builder) { s.programBaselines.Reset() } -func (s *testSys) baselineProgram(program *incremental.Program) { -} - func (s *testSys) serializeState(baseline *strings.Builder) { s.baselineOutput(baseline) s.baselineFSwithDiff(baseline) @@ -334,6 +354,8 @@ var ( statisticsEnd = "!!! Statistics end" buildStatusReportStart = "!!! Build Status Report Start" buildStatusReportEnd = "!!! Build Status Report End" + watchStatusReportStart = "!!! Watch Status Report Start" + watchStatusReportEnd = "!!! Watch Status Report End" traceStart = "!!! Trace start" traceEnd = "!!! Trace end" ) @@ -388,7 +410,8 @@ func (o *outputSanitizer) transformLines() string { if !o.addOrSkipLinesForComparing(listFileStart, listFileEnd, false, nil) && !o.addOrSkipLinesForComparing(statisticsStart, statisticsEnd, true, nil) && !o.addOrSkipLinesForComparing(traceStart, traceEnd, false, nil) && - !o.addOrSkipLinesForComparing(buildStatusReportStart, buildStatusReportEnd, false, o.sanitizeBuildStatusTimeStamp) { + !o.addOrSkipLinesForComparing(buildStatusReportStart, buildStatusReportEnd, false, o.sanitizeBuildStatusTimeStamp) && + !o.addOrSkipLinesForComparing(watchStatusReportStart, watchStatusReportEnd, false, o.sanitizeBuildStatusTimeStamp) { o.addOutputLine(line) } } @@ -461,8 +484,7 @@ func (s *testSys) baselineFSwithDiff(baseline io.Writer) { } if s.serializedDiff != nil { for path := range s.serializedDiff.snap { - _, ok := s.fsFromFileMap().ReadFile(path) - if !ok { + if fileInfo := s.mapFs().GetFileInfo(path); fileInfo == nil { // report deleted s.addFsEntryDiff(diffs, nil, path) } @@ -530,27 +552,37 @@ func (s *testSys) removeNoError(path string) { } } -func (s *testSys) replaceFileText(path string, oldText string, newText string) { +func (s *testSys) readFileNoError(path string) string { content, ok := s.fsFromFileMap().ReadFile(path) if !ok { panic("File not found: " + path) } + return content +} + +func (s *testSys) renameFileNoError(oldPath string, newPath string) { + s.writeFileNoError(newPath, s.readFileNoError(oldPath), false) + s.removeNoError(oldPath) +} + +func (s *testSys) replaceFileText(path string, oldText string, newText string) { + content := s.readFileNoError(path) content = strings.Replace(content, oldText, newText, 1) s.writeFileNoError(path, content, false) } +func (s *testSys) replaceFileTextAll(path string, oldText string, newText string) { + content := s.readFileNoError(path) + content = strings.ReplaceAll(content, oldText, newText) + s.writeFileNoError(path, content, false) +} + func (s *testSys) appendFile(path string, text string) { - content, ok := s.fsFromFileMap().ReadFile(path) - if !ok { - panic("File not found: " + path) - } + content := s.readFileNoError(path) s.writeFileNoError(path, content+text, false) } func (s *testSys) prependFile(path string, text string) { - content, ok := s.fsFromFileMap().ReadFile(path) - if !ok { - panic("File not found: " + path) - } + content := s.readFileNoError(path) s.writeFileNoError(path, text+content, false) } diff --git a/internal/execute/tsctests/tsc_test.go b/internal/execute/tsctests/tsc_test.go index 81eb372253..b9a88f6196 100644 --- a/internal/execute/tsctests/tsc_test.go +++ b/internal/execute/tsctests/tsc_test.go @@ -824,7 +824,7 @@ func TestTscExtends(t *testing.T) { commandLineArgs: []string{builtType, "src", "--extendedDiagnostics"}, } } - getTscExtendsConfigDirTestCase := func(subScenarioSufix string, commandLineArgs []string) *tscInput { + getTscExtendsConfigDirTestCase := func(subScenarioSufix string, commandLineArgs []string, edits []*tscEdit) *tscInput { return &tscInput{ subScenario: "configDir template" + subScenarioSufix, files: FileMap{ @@ -870,6 +870,7 @@ func TestTscExtends(t *testing.T) { }, cwd: "/home/src/projects/myproject", commandLineArgs: commandLineArgs, + edits: edits, } } testCases := []*tscInput{ @@ -887,10 +888,30 @@ func TestTscExtends(t *testing.T) { }, getTscExtendsWithSymlinkTestCase("-p"), getTscExtendsWithSymlinkTestCase("-b"), - getTscExtendsConfigDirTestCase("", []string{"--explainFiles"}), - getTscExtendsConfigDirTestCase(" showConfig", []string{"--showConfig"}), - getTscExtendsConfigDirTestCase(" with commandline", []string{"--explainFiles", "--outDir", "${configDir}/outDir"}), - getTscExtendsConfigDirTestCase("", []string{"--b", "--explainFiles", "--v"}), + getTscExtendsConfigDirTestCase("", []string{"--explainFiles"}, nil), + getTscExtendsConfigDirTestCase(" showConfig", []string{"--showConfig"}, nil), + getTscExtendsConfigDirTestCase(" with commandline", []string{"--explainFiles", "--outDir", "${configDir}/outDir"}, nil), + getTscExtendsConfigDirTestCase("", []string{"--b", "--explainFiles", "--v"}, nil), + getTscExtendsConfigDirTestCase("", []string{"--b", "-w", "--explainFiles", "--v"}, []*tscEdit{ + { + caption: "edit extended config file", + edit: func(sys *testSys) { + sys.writeFileNoError( + "/home/src/projects/configs/first/tsconfig.json", + stringtestutil.Dedent(` + { + "extends": "../second/tsconfig.json", + "include": ["${configDir}/src"], + "compilerOptions": { + "typeRoots": ["${configDir}/root2"], + "types": [], + }, + }`), + false, + ) + }, + }, + }), } for _, test := range testCases { @@ -1705,6 +1726,7 @@ func TestTscLibraryResolution(t *testing.T) { testCases := slices.Concat( getTscLibResolutionTestCases([]string{"-b", "project1", "project2", "project3", "project4", "--verbose", "--explainFiles"}), getTscLibResolutionTestCases([]string{"-p", "project1", "--explainFiles"}), + getTscLibResolutionTestCases([]string{"-b", "-w", "project1", "project2", "project3", "project4", "--verbose", "--explainFiles"}), []*tscInput{ { subScenario: "unknown lib", @@ -2325,6 +2347,181 @@ func TestTscModuleResolution(t *testing.T) { }, }, }, + { + subScenario: "handles the cache correctly when two projects use different module resolution settings", + files: FileMap{ + `/user/username/projects/myproject/project1/index.ts`: `import { foo } from "file";`, + `/user/username/projects/myproject/project1/node_modules/file/index.d.ts`: "export const foo = 10;", + `/user/username/projects/myproject/project1/tsconfig.json`: stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, + "types": ["foo", "bar"] + }, + "files": ["index.ts"], + }`), + `/user/username/projects/myproject/project2/index.ts`: `import { foo } from "file";`, + `/user/username/projects/myproject/project2/node_modules/file/index.d.ts`: "export const foo = 10;", + `/user/username/projects/myproject/project2/tsconfig.json`: stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, + "types": ["foo"], + "module": "nodenext", + "moduleResolution": "nodenext" + }, + "files": ["index.ts"], + }`), + `/user/username/projects/myproject/node_modules/@types/foo/index.d.ts`: "export const foo = 10;", + `/user/username/projects/myproject/node_modules/@types/bar/index.d.ts`: "export const bar = 10;", + `/user/username/projects/myproject/tsconfig.json`: stringtestutil.Dedent(` + { + "files": [], + "references": [ + { "path": "./project1" }, + { "path": "./project2" }, + ], + }`), + }, + cwd: "/user/username/projects/myproject", + commandLineArgs: []string{"--b", "-w", "-v"}, + edits: []*tscEdit{ + { + caption: "Append text", + edit: func(sys *testSys) { + sys.appendFile(`/user/username/projects/myproject/project1/index.ts`, "const bar = 10;") + }, + }, + }, + }, + { + // !!! sheetal package.json watches not yet implemented + subScenario: `resolves specifier in output declaration file from referenced project correctly with cts and mts extensions`, + files: FileMap{ + `/user/username/projects/myproject/packages/pkg1/package.json`: stringtestutil.Dedent(` + { + "name": "pkg1", + "version": "1.0.0", + "main": "build/index.js", + "type": "module" + }`), + `/user/username/projects/myproject/packages/pkg1/index.ts`: stringtestutil.Dedent(` + import type { TheNum } from 'pkg2' + export const theNum: TheNum = 42;`), + `/user/username/projects/myproject/packages/pkg1/tsconfig.json`: stringtestutil.Dedent(` + { + "compilerOptions": { + "outDir": "build", + "module": "node16", + }, + "references": [{ "path": "../pkg2" }], + }`), + `/user/username/projects/myproject/packages/pkg2/const.cts`: `export type TheNum = 42;`, + `/user/username/projects/myproject/packages/pkg2/index.ts`: `export type { TheNum } from './const.cjs';`, + `/user/username/projects/myproject/packages/pkg2/tsconfig.json`: stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, + "outDir": "build", + "module": "node16", + }, + }`), + `/user/username/projects/myproject/packages/pkg2/package.json`: stringtestutil.Dedent(` + { + "name": "pkg2", + "version": "1.0.0", + "main": "build/index.js", + "type": "module" + }`), + `/user/username/projects/myproject/node_modules/pkg2`: vfstest.Symlink(`/user/username/projects/myproject/packages/pkg2`), + }, + cwd: "/user/username/projects/myproject", + commandLineArgs: []string{"-b", "packages/pkg1", "-w", "--verbose", "--traceResolution"}, + edits: []*tscEdit{ + { + caption: "reports import errors after change to package file", + edit: func(sys *testSys) { + sys.replaceFileText(`/user/username/projects/myproject/packages/pkg1/package.json`, `"module"`, `"commonjs"`) + }, + expectedDiff: "Package.json watch pending, so no change detected yet", + }, + { + caption: "removes those errors when a package file is changed back", + edit: func(sys *testSys) { + sys.replaceFileText(`/user/username/projects/myproject/packages/pkg1/package.json`, `"commonjs"`, `"module"`) + }, + }, + { + caption: "reports import errors after change to package file", + edit: func(sys *testSys) { + sys.replaceFileText(`/user/username/projects/myproject/packages/pkg1/package.json`, `"module"`, `"commonjs"`) + }, + expectedDiff: "Package.json watch pending, so no change detected yet", + }, + { + caption: "removes those errors when a package file is changed to cjs extensions", + edit: func(sys *testSys) { + sys.replaceFileText(`/user/username/projects/myproject/packages/pkg2/package.json`, `"build/index.js"`, `"build/index.cjs"`) + sys.renameFileNoError(`/user/username/projects/myproject/packages/pkg2/index.ts`, `/user/username/projects/myproject/packages/pkg2/index.cts`) + }, + }, + }, + }, + { + subScenario: `build mode watches for changes to package-json main fields`, + files: FileMap{ + `/user/username/projects/myproject/packages/pkg1/package.json`: stringtestutil.Dedent(` + { + "name": "pkg1", + "version": "1.0.0", + "main": "build/index.js" + }`), + `/user/username/projects/myproject/packages/pkg1/index.ts`: stringtestutil.Dedent(` + import type { TheNum } from 'pkg2' + export const theNum: TheNum = 42;`), + `/user/username/projects/myproject/packages/pkg1/tsconfig.json`: stringtestutil.Dedent(` + { + "compilerOptions": { + "outDir": "build", + }, + "references": [{ "path": "../pkg2" }], + }`), + `/user/username/projects/myproject/packages/pkg2/tsconfig.json`: stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, + "outDir": "build", + }, + }`), + `/user/username/projects/myproject/packages/pkg2/const.ts`: `export type TheNum = 42;`, + `/user/username/projects/myproject/packages/pkg2/index.ts`: `export type { TheNum } from './const.js';`, + `/user/username/projects/myproject/packages/pkg2/other.ts`: `export type TheStr = string;`, + `/user/username/projects/myproject/packages/pkg2/package.json`: stringtestutil.Dedent(` + { + "name": "pkg2", + "version": "1.0.0", + "main": "build/index.js" + }`), + `/user/username/projects/myproject/node_modules/pkg2`: vfstest.Symlink(`/user/username/projects/myproject/packages/pkg2`), + }, + cwd: "/user/username/projects/myproject", + commandLineArgs: []string{"-b", "packages/pkg1", "--verbose", "-w", "--traceResolution"}, + edits: []*tscEdit{ + { + caption: "reports import errors after change to package file", + edit: func(sys *testSys) { + sys.replaceFileText(`/user/username/projects/myproject/packages/pkg2/package.json`, `index.js`, `other.js`) + }, + expectedDiff: "Package.json watch pending, so no change detected yet", + }, + { + caption: "removes those errors when a package file is changed back", + edit: func(sys *testSys) { + sys.replaceFileText(`/user/username/projects/myproject/packages/pkg2/package.json`, `other.js`, `index.js`) + }, + }, + }, + }, } for _, test := range testCases { @@ -2441,7 +2638,7 @@ func TestTscNoEmit(t *testing.T) { aText: `const a = class { private p = 10; };`, }, } - getTscNoEmitAndErrorsFileMap := func(scenario *tscNoEmitScenario, incremental bool, asModules bool) FileMap { + getTscNoEmitAndErrorsFileMap := func(scenario *tscNoEmitScenario, incremental bool, asModules bool, modify func(FileMap)) FileMap { files := FileMap{ "/home/src/projects/project/a.ts": core.IfElse(asModules, `export `, "") + scenario.aText, "/home/src/projects/project/tsconfig.json": stringtestutil.Dedent(fmt.Sprintf(` @@ -2456,67 +2653,131 @@ func TestTscNoEmit(t *testing.T) { if asModules { files["/home/src/projects/project/b.ts"] = `export const b = 10;` } + if modify != nil { + modify(files) + } return files } - getTscNoEmitAndErrorsEdits := func(scenario *tscNoEmitScenario, commandLineArgs []string, asModules bool) []*tscEdit { - fixedATsContent := core.IfElse(asModules, "export ", "") + `const a = "hello";` - return []*tscEdit{ - noChange, - { - caption: "Fix error", - edit: func(sys *testSys) { - sys.writeFileNoError("/home/src/projects/project/a.ts", fixedATsContent, false) - }, - }, - noChange, - { - caption: "Emit after fixing error", - commandLineArgs: commandLineArgs, - }, - noChange, - { - caption: "Introduce error", - edit: func(sys *testSys) { - sys.writeFileNoError("/home/src/projects/project/a.ts", scenario.aText, false) - }, - }, - { - caption: "Emit when error", - commandLineArgs: commandLineArgs, - }, - noChange, + getTscNoEmitAndErrorsTestCasesWorker := func(commandLineArgs []string, addNoEmitOnCommandLine bool, modify func(FileMap), edits func(scenario *tscNoEmitScenario, commandLineArgs []string, asModules bool) []*tscEdit) []*tscInput { + testingCases := make([]*tscInput, 0, len(noEmitScenarios)*3) + commandLineArgsForInput := commandLineArgs + if addNoEmitOnCommandLine { + commandLineArgsForInput = slices.Concat(commandLineArgs, []string{"--noEmit"}) } - } - getTscNoEmitAndErrorsTestCases := func(scenarios []*tscNoEmitScenario, commandLineArgs []string) []*tscInput { - testingCases := make([]*tscInput, 0, len(scenarios)*3) - for _, scenario := range scenarios { + for _, scenario := range noEmitScenarios { testingCases = append( testingCases, &tscInput{ subScenario: scenario.subScenario, - commandLineArgs: slices.Concat(commandLineArgs, []string{"--noEmit"}), - files: getTscNoEmitAndErrorsFileMap(scenario, false, false), + commandLineArgs: commandLineArgsForInput, + files: getTscNoEmitAndErrorsFileMap(scenario, false, false, modify), cwd: "/home/src/projects/project", - edits: getTscNoEmitAndErrorsEdits(scenario, commandLineArgs, false), + edits: edits(scenario, commandLineArgs, false), }, &tscInput{ subScenario: scenario.subScenario + " with incremental", - commandLineArgs: slices.Concat(commandLineArgs, []string{"--noEmit"}), - files: getTscNoEmitAndErrorsFileMap(scenario, true, false), + commandLineArgs: commandLineArgsForInput, + files: getTscNoEmitAndErrorsFileMap(scenario, true, false, modify), cwd: "/home/src/projects/project", - edits: getTscNoEmitAndErrorsEdits(scenario, commandLineArgs, false), + edits: edits(scenario, commandLineArgs, false), }, &tscInput{ subScenario: scenario.subScenario + " with incremental as modules", - commandLineArgs: slices.Concat(commandLineArgs, []string{"--noEmit"}), - files: getTscNoEmitAndErrorsFileMap(scenario, true, true), + commandLineArgs: commandLineArgsForInput, + files: getTscNoEmitAndErrorsFileMap(scenario, true, true, modify), cwd: "/home/src/projects/project", - edits: getTscNoEmitAndErrorsEdits(scenario, commandLineArgs, true), + edits: edits(scenario, commandLineArgs, true), }, ) } return testingCases } + getTscNoEmitAndErrorsTestCases := func(commandLineArgs []string) []*tscInput { + return getTscNoEmitAndErrorsTestCasesWorker( + commandLineArgs, + true, + nil, + func(scenario *tscNoEmitScenario, commandLineArgs []string, asModules bool) []*tscEdit { + fixedATsContent := core.IfElse(asModules, "export ", "") + `const a = "hello";` + return []*tscEdit{ + noChange, + { + caption: "Fix error", + edit: func(sys *testSys) { + sys.writeFileNoError("/home/src/projects/project/a.ts", fixedATsContent, false) + }, + }, + noChange, + { + caption: "Emit after fixing error", + commandLineArgs: commandLineArgs, + }, + noChange, + { + caption: "Introduce error", + edit: func(sys *testSys) { + sys.writeFileNoError("/home/src/projects/project/a.ts", scenario.aText, false) + }, + }, + { + caption: "Emit when error", + commandLineArgs: commandLineArgs, + }, + noChange, + } + }, + ) + } + getTscNoEmitAndErrorsWatchTestCases := func(commandLineArgs []string) []*tscInput { + return getTscNoEmitAndErrorsTestCasesWorker( + commandLineArgs, + false, + func(files FileMap) { + files["/home/src/projects/project/tsconfig.json"] = strings.Replace(files["/home/src/projects/project/tsconfig.json"].(string), "}", `, "noEmit": true }`, 1) + }, + func(scenario *tscNoEmitScenario, commandLineArgs []string, asModules bool) []*tscEdit { + fixedATsContent := core.IfElse(asModules, "export ", "") + `const a = "hello";` + return []*tscEdit{ + { + caption: "Fix error", + edit: func(sys *testSys) { + sys.writeFileNoError("/home/src/projects/project/a.ts", fixedATsContent, false) + }, + }, + { + caption: "Emit after fixing error", + edit: func(sys *testSys) { + sys.replaceFileText("/home/src/projects/project/tsconfig.json", `"noEmit": true`, `"noEmit": false`) + }, + }, + { + caption: "no Emit run after fixing error", + edit: func(sys *testSys) { + sys.replaceFileText("/home/src/projects/project/tsconfig.json", `"noEmit": false`, `"noEmit": true`) + }, + }, + { + caption: "Introduce error", + edit: func(sys *testSys) { + sys.writeFileNoError("/home/src/projects/project/a.ts", scenario.aText, false) + }, + }, + { + caption: "Emit when error", + edit: func(sys *testSys) { + sys.replaceFileText("/home/src/projects/project/tsconfig.json", `"noEmit": true`, `"noEmit": false`) + }, + }, + { + caption: "no Emit run when error", + edit: func(sys *testSys) { + sys.replaceFileText("/home/src/projects/project/tsconfig.json", `"noEmit": false`, `"noEmit": true`) + }, + }, + } + }, + ) + } getTscNoEmitChangesFileMap := func(optionsStr string) FileMap { return FileMap{ "/home/src/workspaces/project/src/class.ts": stringtestutil.Dedent(` @@ -2566,7 +2827,7 @@ func TestTscNoEmit(t *testing.T) { optionsString: `"incremental": true`, }, } - getTscNoEmitChangesTestCases := func(scenarios []*tscNoEmitChangesScenario, commandLineArgs []string) []*tscInput { + getTscNoEmitChangesTestCases := func(commandLineArgs []string) []*tscInput { noChangeWithNoEmit := &tscEdit{ caption: "No Change run with noEmit", commandLineArgs: slices.Concat(commandLineArgs, []string{"--noEmit"}), @@ -2581,8 +2842,8 @@ func TestTscNoEmit(t *testing.T) { fixError := func(sys *testSys) { sys.replaceFileText("/home/src/workspaces/project/src/class.ts", "prop1", "prop") } - testCases := make([]*tscInput, 0, len(scenarios)) - for _, scenario := range scenarios { + testCases := make([]*tscInput, 0, len(noEmitChangesScenarios)) + for _, scenario := range noEmitChangesScenarios { testCases = append( testCases, &tscInput{ @@ -2754,7 +3015,38 @@ func TestTscNoEmit(t *testing.T) { }, } } - + getTscNoEmitLoopTestCase := func(suffix string, commandLineArgs []string) *tscInput { + return &tscInput{ + subScenario: "does not go in loop when watching when no files are emitted" + suffix, + files: FileMap{ + "/user/username/projects/myproject/a.js": "", + "/user/username/projects/myproject/b.ts": "", + "/user/username/projects/myproject/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "allowJs": true, + "noEmit": true, + }, + }`), + }, + cwd: "/user/username/projects/myproject", + commandLineArgs: commandLineArgs, + edits: []*tscEdit{ + { + caption: "No change", + edit: func(sys *testSys) { + sys.writeFileNoError(`/user/username/projects/myproject/a.js`, sys.readFileNoError(`/user/username/projects/myproject/a.js`), false) + }, + }, + { + caption: "change", + edit: func(sys *testSys) { + sys.writeFileNoError(`/user/username/projects/myproject/a.js`, "const x = 10;", false) + }, + }, + }, + } + } testCases := slices.Concat( []*tscInput{ { @@ -2772,14 +3064,17 @@ func TestTscNoEmit(t *testing.T) { commandLineArgs: []string{"--noEmit"}, edits: noChangeOnlyEdit, }, + getTscNoEmitLoopTestCase("", []string{"-b", "-w", "-verbose"}), + getTscNoEmitLoopTestCase(" with incremental", []string{"-b", "-w", "-verbose", "--incremental"}), }, - getTscNoEmitAndErrorsTestCases(noEmitScenarios, []string{}), - getTscNoEmitAndErrorsTestCases(noEmitScenarios, []string{"-b", "-v"}), - getTscNoEmitChangesTestCases(noEmitChangesScenarios, []string{}), - getTscNoEmitChangesTestCases(noEmitChangesScenarios, []string{"-b", "-v"}), + getTscNoEmitAndErrorsTestCases([]string{}), + getTscNoEmitAndErrorsTestCases([]string{"-b", "-v"}), + getTscNoEmitChangesTestCases([]string{}), + getTscNoEmitChangesTestCases([]string{"-b", "-v"}), getTscNoEmitDtsChangesTestCases(), getTscNoEmitDtsChangesMultiFileErrorsTestCases([]string{}), getTscNoEmitDtsChangesMultiFileErrorsTestCases([]string{"-b", "-v"}), + getTscNoEmitAndErrorsWatchTestCases([]string{"-b", "-verbose", "-w"}), ) for _, test := range testCases { @@ -2864,6 +3159,69 @@ func TestTscNoEmitOnError(t *testing.T) { } return testCases } + getTscWatchNoEmitOnErrorTestCases := func(scenarios []*tscNoEmitOnErrorScenario, commandLineArgs []string) []*tscInput { + var edits []*tscEdit + for _, scenario := range scenarios { + if edits != nil { + edits = append(edits, &tscEdit{ + caption: scenario.subScenario, + edit: func(sys *testSys) { + sys.writeFileNoError(`/user/username/projects/noEmitOnError/src/main.ts`, scenario.mainErrorContent, false) + }, + }) + } + edits = append(edits, + &tscEdit{ + caption: "No Change", + edit: func(sys *testSys) { + sys.writeFileNoError(`/user/username/projects/noEmitOnError/src/main.ts`, sys.readFileNoError(`/user/username/projects/noEmitOnError/src/main.ts`), false) + }, + }, + &tscEdit{ + caption: "Fix " + scenario.subScenario, + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/noEmitOnError/src/main.ts", scenario.fixedErrorContent, false) + }, + }, + &tscEdit{ + caption: "No Change", + edit: func(sys *testSys) { + sys.writeFileNoError(`/user/username/projects/noEmitOnError/src/main.ts`, sys.readFileNoError(`/user/username/projects/noEmitOnError/src/main.ts`), false) + }, + }, + ) + } + return []*tscInput{ + { + subScenario: "noEmitOnError", + files: getTscNoEmitOnErrorFileMap(scenarios[0], false, false), + cwd: "/user/username/projects/noEmitOnError", + commandLineArgs: commandLineArgs, + edits: edits, + }, + { + subScenario: "noEmitOnError with declaration", + files: getTscNoEmitOnErrorFileMap(scenarios[0], true, false), + cwd: "/user/username/projects/noEmitOnError", + commandLineArgs: commandLineArgs, + edits: edits, + }, + { + subScenario: "noEmitOnError with incremental", + files: getTscNoEmitOnErrorFileMap(scenarios[0], false, true), + cwd: "/user/username/projects/noEmitOnError", + commandLineArgs: commandLineArgs, + edits: edits, + }, + { + subScenario: "noEmitOnError with declaration with incremental", + files: getTscNoEmitOnErrorFileMap(scenarios[0], true, true), + cwd: "/user/username/projects/noEmitOnError", + commandLineArgs: commandLineArgs, + edits: edits, + }, + } + } scenarios := []*tscNoEmitOnErrorScenario{ { subScenario: "syntax errors", @@ -2959,6 +3317,7 @@ func TestTscNoEmitOnError(t *testing.T) { }, }, }, + getTscWatchNoEmitOnErrorTestCases(scenarios, []string{"-b", "-w", "-v"}), ) for _, test := range testCases { diff --git a/internal/execute/tsctests/tscbuild_test.go b/internal/execute/tsctests/tscbuild_test.go index b67862b127..cde8d35442 100644 --- a/internal/execute/tsctests/tscbuild_test.go +++ b/internal/execute/tsctests/tscbuild_test.go @@ -390,6 +390,59 @@ func TestBuildConfigFileErrors(t *testing.T) { files: FileMap{}, commandLineArgs: []string{"--b", "bogus.json"}, }, + { + subScenario: "reports syntax errors in config file", + files: FileMap{ + "/home/src/workspaces/project/a.ts": "export function foo() { }", + "/home/src/workspaces/project/b.ts": "export function bar() { }", + "/home/src/workspaces/project/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, + }, + "files": [ + "a.ts" + "b.ts" + ] + }`), + }, + commandLineArgs: []string{"--b", "-w"}, + edits: []*tscEdit{ + { + caption: "reports syntax errors after change to config file", + edit: func(sys *testSys) { + sys.replaceFileText("/home/src/workspaces/project/tsconfig.json", ",", `, "declaration": true`) + }, + }, + { + caption: "reports syntax errors after change to ts file", + edit: func(sys *testSys) { + sys.appendFile("/home/src/workspaces/project/a.ts", "export function fooBar() { }") + }, + }, + { + caption: "reports error when there is no change to tsconfig file", + edit: func(sys *testSys) { + sys.replaceFileText("/home/src/workspaces/project/tsconfig.json", "", "") + }, + }, + { + caption: "builds after fixing config file errors", + edit: func(sys *testSys) { + sys.writeFileNoError("/home/src/workspaces/project/tsconfig.json", stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, "declaration": true + }, + "files": [ + "a.ts", + "b.ts" + ] + }`), false) + }, + }, + }, + }, } for _, test := range testCases { @@ -622,6 +675,61 @@ func TestBuildDemoProject(t *testing.T) { cwd: "/user/username/projects/demo", commandLineArgs: []string{"--b", "--verbose"}, }, + { + subScenario: "updates with circular reference", + files: getBuildDemoFileMap(func(files FileMap) { + files["/user/username/projects/demo/core/tsconfig.json"] = stringtestutil.Dedent(` + { + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, + "references": [ + { + "path": "../zoo", + } + ] + } + `) + }), + cwd: "/user/username/projects/demo", + commandLineArgs: []string{"--b", "-w", "--verbose"}, + edits: []*tscEdit{ + { + caption: "Fix error", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/demo/core/tsconfig.json", stringtestutil.Dedent(` + { + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, + } + `), false) + }, + }, + }, + }, + { + // !!! sheetal - this has missing errors from strada about files not in rootDir (3) + subScenario: "updates with bad reference", + files: getBuildDemoFileMap(func(files FileMap) { + files["/user/username/projects/demo/core/utilities.ts"] = `import * as A from '../animals' +` + files["/user/username/projects/demo/core/utilities.ts"].(string) + }), + cwd: "/user/username/projects/demo", + commandLineArgs: []string{"--b", "-w", "--verbose"}, + edits: []*tscEdit{ + { + caption: "Prepend a line", + edit: func(sys *testSys) { + sys.prependFile("/user/username/projects/demo/core/utilities.ts", "\n") + }, + }, + }, + }, } for _, test := range testCases { @@ -1527,139 +1635,572 @@ func TestBuildOutputPaths(t *testing.T) { } } -func TestBuildProjectReferenceWithRootDirInParent(t *testing.T) { +func TestBuildProgramUpdates(t *testing.T) { t.Parallel() - getBuildProjectReferenceWithRootDirInParentFileMap := func(modify func(files FileMap)) FileMap { - files := FileMap{ - "/home/src/workspaces/solution/src/main/a.ts": stringtestutil.Dedent(` - import { b } from './b'; - const a = b; - `), - "/home/src/workspaces/solution/src/main/b.ts": stringtestutil.Dedent(` - export const b = 0; - `), - "/home/src/workspaces/solution/src/main/tsconfig.json": stringtestutil.Dedent(` - { - "extends": "../../tsconfig.base.json", - "references": [ - { "path": "../other" }, - ], - }`), - "/home/src/workspaces/solution/src/other/other.ts": stringtestutil.Dedent(` - export const Other = 0; - `), - "/home/src/workspaces/solution/src/other/tsconfig.json": stringtestutil.Dedent(` - { - "extends": "../../tsconfig.base.json", - } - `), - "/home/src/workspaces/solution/tsconfig.base.json": stringtestutil.Dedent(` - { - "compilerOptions": { - "composite": true, - "declaration": true, - "rootDir": "./src/", - "outDir": "./dist/", - "skipDefaultLibCheck": true, - }, - "exclude": [ - "node_modules", - ], - }`), - } - if modify != nil { - modify(files) - } - return files - } testCases := []*tscInput{ { - subScenario: "builds correctly", - files: getBuildProjectReferenceWithRootDirInParentFileMap(nil), - cwd: "/home/src/workspaces/solution", - commandLineArgs: []string{"--b", "src/main", "/home/src/workspaces/solution/src/other"}, - }, - { - subScenario: "reports error for same tsbuildinfo file because no rootDir in the base", - files: getBuildProjectReferenceWithRootDirInParentFileMap( - func(files FileMap) { - text, _ := files["/home/src/workspaces/solution/tsconfig.base.json"] - files["/home/src/workspaces/solution/tsconfig.base.json"] = strings.Replace(text.(string), `"rootDir": "./src/",`, "", 1) + subScenario: "when referenced project change introduces error in the down stream project and then fixes it", + files: FileMap{ + "/user/username/projects/sample1/Library/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true + } + }`), + "/user/username/projects/sample1/Library/library.ts": stringtestutil.Dedent(` + interface SomeObject + { + message: string; + } + + export function createSomeObject(): SomeObject + { + return { + message: "new Object" + }; + } + `), + "/user/username/projects/sample1/App/tsconfig.json": stringtestutil.Dedent(` + { + "references": [{ "path": "../Library" }] + }`), + "/user/username/projects/sample1/App/app.ts": stringtestutil.Dedent(` + import { createSomeObject } from "../Library/library"; + createSomeObject().message; + `), + }, + cwd: "/user/username/projects/sample1", + commandLineArgs: []string{"-b", "-w", "App"}, + edits: []*tscEdit{ + { + caption: "Introduce error", + // Change message in library to message2 + edit: func(sys *testSys) { + sys.replaceFileTextAll("/user/username/projects/sample1/Library/library.ts", "message", "message2") + }, }, - ), - cwd: "/home/src/workspaces/solution", - commandLineArgs: []string{"--b", "src/main", "--verbose"}, - }, - { - subScenario: "reports error for same tsbuildinfo file", - files: getBuildProjectReferenceWithRootDirInParentFileMap( - func(files FileMap) { - files["/home/src/workspaces/solution/src/main/tsconfig.json"] = stringtestutil.Dedent(` - { - "compilerOptions": { "composite": true, "outDir": "../../dist/" }, - "references": [{ "path": "../other" }] - }`) - files["/home/src/workspaces/solution/src/other/tsconfig.json"] = stringtestutil.Dedent(` - { - "compilerOptions": { "composite": true, "outDir": "../../dist/" }, - }`) + { + caption: "Fix error", + // Revert library changes + edit: func(sys *testSys) { + sys.replaceFileTextAll("/user/username/projects/sample1/Library/library.ts", "message2", "message") + }, }, - ), - cwd: "/home/src/workspaces/solution", - commandLineArgs: []string{"--b", "src/main", "--verbose"}, - edits: noChangeOnlyEdit, + }, }, { - subScenario: "reports error for same tsbuildinfo file without incremental", - files: getBuildProjectReferenceWithRootDirInParentFileMap( - func(files FileMap) { - files["/home/src/workspaces/solution/src/main/tsconfig.json"] = stringtestutil.Dedent(` - { - "compilerOptions": { "outDir": "../../dist/" }, - "references": [{ "path": "../other" }] - }`) - files["/home/src/workspaces/solution/src/other/tsconfig.json"] = stringtestutil.Dedent(` - { - "compilerOptions": { "composite": true, "outDir": "../../dist/" }, - }`) + subScenario: "declarationEmitErrors when fixing error files all files are emitted", + files: FileMap{ + "/user/username/projects/solution/app/fileWithError.ts": stringtestutil.Dedent(` + export var myClassWithError = class { + tags() { } + private p = 12 + }; + `), + "/user/username/projects/solution/app/fileWithoutError.ts": "export class myClass { }", + "/user/username/projects/solution/app/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true + } + }`), + }, + cwd: "/user/username/projects/solution", + commandLineArgs: []string{"-b", "-w", "app"}, + edits: []*tscEdit{ + { + caption: "Fix error", + edit: func(sys *testSys) { + sys.replaceFileText("/user/username/projects/solution/app/fileWithError.ts", "private p = 12", "") + }, }, - ), - cwd: "/home/src/workspaces/solution", - commandLineArgs: []string{"--b", "src/main", "--verbose"}, + }, }, { - subScenario: "reports error for same tsbuildinfo file without incremental with tsc", - files: getBuildProjectReferenceWithRootDirInParentFileMap( - func(files FileMap) { - files["/home/src/workspaces/solution/src/main/tsconfig.json"] = stringtestutil.Dedent(` - { - "compilerOptions": { "outDir": "../../dist/" }, - "references": [{ "path": "../other" }] - }`) - files["/home/src/workspaces/solution/src/other/tsconfig.json"] = stringtestutil.Dedent(` - { - "compilerOptions": { "composite": true, "outDir": "../../dist/" }, - }`) - }, - ), - cwd: "/home/src/workspaces/solution", - commandLineArgs: []string{"--b", "src/other", "--verbose"}, + subScenario: "declarationEmitErrors when file with no error changes", + files: FileMap{ + "/user/username/projects/solution/app/fileWithError.ts": stringtestutil.Dedent(` + export var myClassWithError = class { + tags() { } + private p = 12 + }; + `), + "/user/username/projects/solution/app/fileWithoutError.ts": "export class myClass { }", + "/user/username/projects/solution/app/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true + } + }`), + }, + cwd: "/user/username/projects/solution", + commandLineArgs: []string{"-b", "-w", "app"}, edits: []*tscEdit{ { - caption: "Running tsc on main", - commandLineArgs: []string{"-p", "src/main"}, + caption: "Change fileWithoutError", + edit: func(sys *testSys) { + sys.replaceFileTextAll("/user/username/projects/solution/app/fileWithoutError.ts", "myClass", "myClass2") + }, }, }, }, { - subScenario: "reports no error when tsbuildinfo differ", - files: getBuildProjectReferenceWithRootDirInParentFileMap( - func(files FileMap) { - delete(files, "/home/src/workspaces/solution/src/main/tsconfig.json") - delete(files, "/home/src/workspaces/solution/src/other/tsconfig.json") - files["/home/src/workspaces/solution/src/main/tsconfig.main.json"] = stringtestutil.Dedent(` - { - "compilerOptions": { "composite": true, "outDir": "../../dist/" }, + subScenario: "declarationEmitErrors introduceError when fixing errors only changed file is emitted", + files: FileMap{ + "/user/username/projects/solution/app/fileWithError.ts": stringtestutil.Dedent(` + export var myClassWithError = class { + tags() { } + + }; + `), + "/user/username/projects/solution/app/fileWithoutError.ts": "export class myClass { }", + "/user/username/projects/solution/app/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true + } + }`), + }, + cwd: "/user/username/projects/solution", + commandLineArgs: []string{"-b", "-w", "app"}, + edits: []*tscEdit{ + { + caption: "Introduce error", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/solution/app/fileWithError.ts", stringtestutil.Dedent(` + export var myClassWithError = class { + tags() { } + private p = 12 + }; + `), false) + }, + }, + { + caption: "Fix error", + edit: func(sys *testSys) { + sys.replaceFileText("/user/username/projects/solution/app/fileWithError.ts", "private p = 12", "") + }, + }, + }, + }, + { + subScenario: "declarationEmitErrors introduceError when file with no error changes", + files: FileMap{ + "/user/username/projects/solution/app/fileWithError.ts": stringtestutil.Dedent(` + export var myClassWithError = class { + tags() { } + + }; + `), + "/user/username/projects/solution/app/fileWithoutError.ts": "export class myClass { }", + "/user/username/projects/solution/app/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true + } + }`), + }, + cwd: "/user/username/projects/solution", + commandLineArgs: []string{"-b", "-w", "app"}, + edits: []*tscEdit{ + { + caption: "Introduce error", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/solution/app/fileWithError.ts", stringtestutil.Dedent(` + export var myClassWithError = class { + tags() { } + private p = 12 + }; + `), false) + }, + }, + { + caption: "Change fileWithoutError", + edit: func(sys *testSys) { + sys.replaceFileTextAll("/user/username/projects/solution/app/fileWithoutError.ts", "myClass", "myClass2") + }, + }, + }, + }, + { + subScenario: "works when noUnusedParameters changes to false", + files: FileMap{ + "/user/username/projects/myproject/index.ts": `const fn = (a: string, b: string) => b;`, + "/user/username/projects/myproject/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "noUnusedParameters": true, + }, + }`), + }, + cwd: "/user/username/projects/myproject", + commandLineArgs: []string{"-b", "-w"}, + + edits: []*tscEdit{ + { + caption: "Change tsconfig to set noUnusedParameters to false", + edit: func(sys *testSys) { + sys.writeFileNoError( + `/user/username/projects/myproject/tsconfig.json`, + stringtestutil.Dedent(` + { + "compilerOptions": { + "noUnusedParameters": false, + }, + }`), + false, + ) + }, + }, + }, + }, + { + subScenario: "works with extended source files", + cwd: "/user/username/projects/project", + files: FileMap{ + "/user/username/projects/project/commonFile1.ts": "let x = 1", + "/user/username/projects/project/commonFile2.ts": "let y = 1", + "/user/username/projects/project/alpha.tsconfig.json": "{}", + "/user/username/projects/project/project1.tsconfig.json": stringtestutil.Dedent(` + { + "extends": "./alpha.tsconfig.json", + "compilerOptions": { + "composite": true, + }, + "files": ["commonFile1.ts", "commonFile2.ts"], + } + `), + "/user/username/projects/project/bravo.tsconfig.json": stringtestutil.Dedent(` + { + "extends": "./alpha.tsconfig.json", + } + `), + "/user/username/projects/project/other.ts": "let z = 0;", + "/user/username/projects/project/project2.tsconfig.json": stringtestutil.Dedent(` + { + "extends": "./bravo.tsconfig.json", + "compilerOptions": { + "composite": true, + }, + "files": ["other.ts"], + } + `), + "/user/username/projects/project/other2.ts": "let k = 0;", + "/user/username/projects/project/extendsConfig1.tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, + }, + } + `), + "/user/username/projects/project/extendsConfig2.tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "strictNullChecks": false, + }, + } + `), + "/user/username/projects/project/extendsConfig3.tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "noImplicitAny": true, + }, + } + `), + "/user/username/projects/project/project3.tsconfig.json": stringtestutil.Dedent(` + { + "extends": [ + "./extendsConfig1.tsconfig.json", + "./extendsConfig2.tsconfig.json", + "./extendsConfig3.tsconfig.json", + ], + "compilerOptions": { + "composite": false, + }, + "files": ["other2.ts"], + }`), + }, + commandLineArgs: []string{"-b", "-w", "-v", "project1.tsconfig.json", "project2.tsconfig.json", "project3.tsconfig.json"}, + edits: []*tscEdit{ + { + caption: "Modify alpha config", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/project/alpha.tsconfig.json", stringtestutil.Dedent(` + { + "compilerOptions": { + "strict": true + } + }`), false) + }, + }, + { + caption: "change bravo config", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/project/bravo.tsconfig.json", stringtestutil.Dedent(` + { + "extends": "./alpha.tsconfig.json", + "compilerOptions": { "strict": false } + }`), false) + }, + }, + { + caption: "project 2 extends alpha", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/project/project2.tsconfig.json", stringtestutil.Dedent(` + { + "extends": "./alpha.tsconfig.json", + }`), false) + }, + }, + { + caption: "update aplha config", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/project/alpha.tsconfig.json", "{}", false) + }, + }, + { + caption: "Modify extendsConfigFile2", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/project/extendsConfig2.tsconfig.json", stringtestutil.Dedent(` + { + "compilerOptions": { "strictNullChecks": true } + }`), false) + }, + }, + { + caption: "Modify project 3", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/project/project3.tsconfig.json", stringtestutil.Dedent(` + { + "extends": ["./extendsConfig1.tsconfig.json", "./extendsConfig2.tsconfig.json"], + "compilerOptions": { "composite": false }, + "files": ["other2.ts"], + }`), false) + }, + }, + { + caption: "Delete extendedConfigFile2 and report error", + edit: func(sys *testSys) { + sys.removeNoError("/user/username/projects/project/extendsConfig2.tsconfig.json") + }, + }, + }, + }, + { + subScenario: "works correctly when project with extended config is removed", + files: FileMap{ + "/user/username/projects/project/commonFile1.ts": "let x = 1", + "/user/username/projects/project/commonFile2.ts": "let y = 1", + "/user/username/projects/project/alpha.tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "strict": true, + }, + }`), + "/user/username/projects/project/project1.tsconfig.json": stringtestutil.Dedent(` + { + "extends": "./alpha.tsconfig.json", + "compilerOptions": { + "composite": true, + }, + "files": ["commonFile1.ts", "commonFile2.ts"], + }`), + "/user/username/projects/project/bravo.tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "strict": true, + }, + }`), + "/user/username/projects/project/other.ts": "let z = 0;", + "/user/username/projects/project/project2.tsconfig.json": stringtestutil.Dedent(` + { + "extends": "./bravo.tsconfig.json", + "compilerOptions": { + "composite": true, + }, + "files": ["other.ts"], + }`), + "/user/username/projects/project/tsconfig.json": stringtestutil.Dedent(` + { + "references": [ + { + "path": "./project1.tsconfig.json", + }, + { + "path": "./project2.tsconfig.json", + }, + ], + "files": [], + }`), + }, + cwd: "/user/username/projects/project", + commandLineArgs: []string{"-b", "-w", "-v"}, + edits: []*tscEdit{ + { + caption: "Remove project2 from base config", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/project/tsconfig.json", stringtestutil.Dedent(` + { + "references": [ + { + "path": "./project1.tsconfig.json", + }, + ], + "files": [], + }`), false) + }, + }, + }, + }, + { + subScenario: "tsbuildinfo has error", + files: FileMap{ + "/user/username/projects/project/main.ts": "export const x = 10;", + "/user/username/projects/project/tsconfig.json": "{}", + "/user/username/projects/project/tsconfig.tsbuildinfo": "Some random string", + }, + cwd: "/user/username/projects/project", + commandLineArgs: []string{"--b", "-i", "-w"}, + }, + } + for _, test := range testCases { + test.run(t, "programUpdates") + } +} + +func TestBuildProjectReferenceWithRootDirInParent(t *testing.T) { + t.Parallel() + getBuildProjectReferenceWithRootDirInParentFileMap := func(modify func(files FileMap)) FileMap { + files := FileMap{ + "/home/src/workspaces/solution/src/main/a.ts": stringtestutil.Dedent(` + import { b } from './b'; + const a = b; + `), + "/home/src/workspaces/solution/src/main/b.ts": stringtestutil.Dedent(` + export const b = 0; + `), + "/home/src/workspaces/solution/src/main/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "../../tsconfig.base.json", + "references": [ + { "path": "../other" }, + ], + }`), + "/home/src/workspaces/solution/src/other/other.ts": stringtestutil.Dedent(` + export const Other = 0; + `), + "/home/src/workspaces/solution/src/other/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "../../tsconfig.base.json", + } + `), + "/home/src/workspaces/solution/tsconfig.base.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, + "declaration": true, + "rootDir": "./src/", + "outDir": "./dist/", + "skipDefaultLibCheck": true, + }, + "exclude": [ + "node_modules", + ], + }`), + } + if modify != nil { + modify(files) + } + return files + } + testCases := []*tscInput{ + { + subScenario: "builds correctly", + files: getBuildProjectReferenceWithRootDirInParentFileMap(nil), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "src/main", "/home/src/workspaces/solution/src/other"}, + }, + { + subScenario: "reports error for same tsbuildinfo file because no rootDir in the base", + files: getBuildProjectReferenceWithRootDirInParentFileMap( + func(files FileMap) { + text, _ := files["/home/src/workspaces/solution/tsconfig.base.json"] + files["/home/src/workspaces/solution/tsconfig.base.json"] = strings.Replace(text.(string), `"rootDir": "./src/",`, "", 1) + }, + ), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "src/main", "--verbose"}, + }, + { + subScenario: "reports error for same tsbuildinfo file", + files: getBuildProjectReferenceWithRootDirInParentFileMap( + func(files FileMap) { + files["/home/src/workspaces/solution/src/main/tsconfig.json"] = stringtestutil.Dedent(` + { + "compilerOptions": { "composite": true, "outDir": "../../dist/" }, + "references": [{ "path": "../other" }] + }`) + files["/home/src/workspaces/solution/src/other/tsconfig.json"] = stringtestutil.Dedent(` + { + "compilerOptions": { "composite": true, "outDir": "../../dist/" }, + }`) + }, + ), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "src/main", "--verbose"}, + edits: noChangeOnlyEdit, + }, + { + subScenario: "reports error for same tsbuildinfo file without incremental", + files: getBuildProjectReferenceWithRootDirInParentFileMap( + func(files FileMap) { + files["/home/src/workspaces/solution/src/main/tsconfig.json"] = stringtestutil.Dedent(` + { + "compilerOptions": { "outDir": "../../dist/" }, + "references": [{ "path": "../other" }] + }`) + files["/home/src/workspaces/solution/src/other/tsconfig.json"] = stringtestutil.Dedent(` + { + "compilerOptions": { "composite": true, "outDir": "../../dist/" }, + }`) + }, + ), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "src/main", "--verbose"}, + }, + { + subScenario: "reports error for same tsbuildinfo file without incremental with tsc", + files: getBuildProjectReferenceWithRootDirInParentFileMap( + func(files FileMap) { + files["/home/src/workspaces/solution/src/main/tsconfig.json"] = stringtestutil.Dedent(` + { + "compilerOptions": { "outDir": "../../dist/" }, + "references": [{ "path": "../other" }] + }`) + files["/home/src/workspaces/solution/src/other/tsconfig.json"] = stringtestutil.Dedent(` + { + "compilerOptions": { "composite": true, "outDir": "../../dist/" }, + }`) + }, + ), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "src/other", "--verbose"}, + edits: []*tscEdit{ + { + caption: "Running tsc on main", + commandLineArgs: []string{"-p", "src/main"}, + }, + }, + }, + { + subScenario: "reports no error when tsbuildinfo differ", + files: getBuildProjectReferenceWithRootDirInParentFileMap( + func(files FileMap) { + delete(files, "/home/src/workspaces/solution/src/main/tsconfig.json") + delete(files, "/home/src/workspaces/solution/src/other/tsconfig.json") + files["/home/src/workspaces/solution/src/main/tsconfig.main.json"] = stringtestutil.Dedent(` + { + "compilerOptions": { "composite": true, "outDir": "../../dist/" }, "references": [{ "path": "../other/tsconfig.other.json" }] }`) files["/home/src/workspaces/solution/src/other/tsconfig.other.json"] = stringtestutil.Dedent(` @@ -1667,15 +2208,84 @@ func TestBuildProjectReferenceWithRootDirInParent(t *testing.T) { "compilerOptions": { "composite": true, "outDir": "../../dist/" }, }`) }, - ), - cwd: "/home/src/workspaces/solution", - commandLineArgs: []string{"--b", "src/main/tsconfig.main.json", "--verbose"}, - edits: noChangeOnlyEdit, + ), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "src/main/tsconfig.main.json", "--verbose"}, + edits: noChangeOnlyEdit, + }, + } + + for _, test := range testCases { + test.run(t, "projectReferenceWithRootDirInParent") + } +} + +func TestBuildReexport(t *testing.T) { + t.Parallel() + testCases := []*tscInput{ + { + subScenario: "Reports errors correctly", + files: FileMap{ + "/user/username/projects/reexport/src/tsconfig.json": stringtestutil.Dedent(` + { + "files": [], + "include": [], + "references": [{ "path": "./pure" }, { "path": "./main" }], + }`), + "/user/username/projects/reexport/src/main/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "outDir": "../../out", + "rootDir": "../", + }, + "include": ["**/*.ts"], + "references": [{ "path": "../pure" }], + }`), + "/user/username/projects/reexport/src/main/index.ts": stringtestutil.Dedent(` + import { Session } from "../pure"; + + export const session: Session = { + foo: 1 + }; + `), + "/user/username/projects/reexport/src/pure/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, + "outDir": "../../out", + "rootDir": "../", + }, + "include": ["**/*.ts"], + }`), + "/user/username/projects/reexport/src/pure/index.ts": `export * from "./session";`, + "/user/username/projects/reexport/src/pure/session.ts": stringtestutil.Dedent(` + export interface Session { + foo: number; + // bar: number; + } + `), + }, + cwd: `/user/username/projects/reexport`, + commandLineArgs: []string{"-b", "-w", "-verbose", "src"}, + edits: []*tscEdit{ + { + caption: "Introduce error", + edit: func(sys *testSys) { + sys.replaceFileText(`/user/username/projects/reexport/src/pure/session.ts`, "// ", "") + }, + }, + { + caption: "Fix error", + edit: func(sys *testSys) { + sys.replaceFileText(`/user/username/projects/reexport/src/pure/session.ts`, "bar: ", "// bar: ") + }, + }, + }, }, } for _, test := range testCases { - test.run(t, "projectReferenceWithRootDirInParent") + test.run(t, "reexport") } } @@ -2084,6 +2694,20 @@ func TestBuildRoots(t *testing.T) { commandLineArgs: []string{"--b", "projects/server", "-v", "--traceResolution", "--explainFiles"}, edits: getBuildRootsFromProjectReferencedProjectTestEdits(), }, + { + subScenario: "when root file is from referenced project", + files: getBuildRootsFromProjectReferencedProjectFileMap(true), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "-w", "projects/server", "-v", "--traceResolution", "--explainFiles"}, + edits: getBuildRootsFromProjectReferencedProjectTestEdits(), + }, + { + subScenario: "when root file is from referenced project and shared is first", + files: getBuildRootsFromProjectReferencedProjectFileMap(false), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "-w", "projects/server", "-v", "--traceResolution", "--explainFiles"}, + edits: getBuildRootsFromProjectReferencedProjectTestEdits(), + }, } for _, test := range testCases { @@ -2094,6 +2718,21 @@ func TestBuildRoots(t *testing.T) { func TestBuildSample(t *testing.T) { t.Parallel() + getLogicConfig := func() string { + return stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], + }`) + } + getBuildSampleFileMap := func(modify func(files FileMap)) FileMap { files := FileMap{ "/user/username/projects/sample1/core/tsconfig.json": stringtestutil.Dedent(` @@ -2112,18 +2751,7 @@ func TestBuildSample(t *testing.T) { `), "/user/username/projects/sample1/core/some_decl.d.ts": `declare const dts: any;`, "/user/username/projects/sample1/core/anotherModule.ts": `export const World = "hello";`, - "/user/username/projects/sample1/logic/tsconfig.json": stringtestutil.Dedent(` - { - "compilerOptions": { - "composite": true, - "declaration": true, - "sourceMap": true, - "skipDefaultLibCheck": true, - }, - "references": [ - { "path": "../core" }, - ], - }`), + "/user/username/projects/sample1/logic/tsconfig.json": getLogicConfig(), "/user/username/projects/sample1/logic/index.ts": stringtestutil.Dedent(` import * as c from '../core/index'; export function getSecondsInDay() { @@ -2161,6 +2789,63 @@ func TestBuildSample(t *testing.T) { } return files } + getStopBuildOnErrorTests := func(options []string) []*tscInput { + noChange := core.IfElse(options == nil, noChangeOnlyEdit, nil) + return []*tscInput{ + { + subScenario: "skips builds downstream projects if upstream projects have errors with stopBuildOnErrors", + files: getBuildSampleFileMap(func(files FileMap) { + text, _ := files["/user/username/projects/sample1/core/index.ts"] + files["/user/username/projects/sample1/core/index.ts"] = text.(string) + `multiply();` + }), + cwd: "/user/username/projects/sample1", + commandLineArgs: slices.Concat([]string{"--b", "tests", "--verbose", "--stopBuildOnErrors"}, options), + edits: slices.Concat( + noChange, + []*tscEdit{ + { + caption: "fix error", + edit: func(sys *testSys) { + sys.replaceFileText("/user/username/projects/sample1/core/index.ts", "multiply();", "") + }, + }, + }, + ), + }, + { + subScenario: "skips builds downstream projects if upstream projects have errors with stopBuildOnErrors when test does not reference core", + files: getBuildSampleFileMap(func(files FileMap) { + files["/user/username/projects/sample1/tests/tsconfig.json"] = stringtestutil.Dedent(` + { + "references": [ + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, + }`) + text, _ := files["/user/username/projects/sample1/core/index.ts"] + files["/user/username/projects/sample1/core/index.ts"] = text.(string) + `multiply();` + }), + cwd: "/user/username/projects/sample1", + commandLineArgs: slices.Concat([]string{"--b", "tests", "--verbose", "--stopBuildOnErrors"}, options), + edits: slices.Concat( + noChange, + []*tscEdit{ + { + caption: "fix error", + edit: func(sys *testSys) { + sys.replaceFileText("/user/username/projects/sample1/core/index.ts", "multiply();", "") + }, + }, + }, + ), + }, + } + } getBuildSampleCoreChangeEdits := func() []*tscEdit { return []*tscEdit{ { @@ -2186,7 +2871,104 @@ class someClass2 { }`, noChange, } } - testCases := []*tscInput{ + getBuildSampleWatchDtsChangingEdits := func() []*tscEdit { + return []*tscEdit{ + { + caption: "Make change to core", + edit: func(sys *testSys) { + sys.appendFile("/user/username/projects/sample1/core/index.ts", "\nexport class someClass { }") + }, + }, + { + caption: "Revert core file", + edit: func(sys *testSys) { + sys.replaceFileText("/user/username/projects/sample1/core/index.ts", "\nexport class someClass { }", "") + }, + }, + { + caption: "Make two changes", + edit: func(sys *testSys) { + sys.appendFile("/user/username/projects/sample1/core/index.ts", "\nexport class someClass { }") + sys.appendFile("/user/username/projects/sample1/core/index.ts", "\nexport class someClass2 { }") + }, + }, + } + } + getBuildSampleWatchNonDtsChangingEdits := func() []*tscEdit { + return []*tscEdit{ + { + caption: "Make local change to core", + edit: func(sys *testSys) { + sys.appendFile("/user/username/projects/sample1/core/index.ts", "\nfunction foo() { }") + }, + }, + } + } + getBuildSampleWatchNewFileEdits := func() []*tscEdit { + return []*tscEdit{ + { + caption: "Change to new File and build core", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/sample1/core/newfile.ts", `export const newFileConst = 30;`, false) + }, + }, + { + caption: "Change to new File and build core", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/sample1/core/newfile.ts", "\nexport class someClass2 { }", false) + }, + }, + } + } + makeCircularReferences := func(files FileMap) { + files["/user/username/projects/sample1/core/tsconfig.json"] = stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, + "declaration": true + }, + "references": [ + { "path": "../tests", "circular": true } + ], + }`) + } + getIncrementalErrorTest := func(subScenario string, options []string) *tscInput { + var expectedDiffWithLogicError string + if slices.Contains(options, "--stopBuildOnErrors") { + expectedDiffWithLogicError = stringtestutil.Dedent(` + Clean build will stop on error in core and will not report error in logic + Watch build will retain previous errors from logic and report it + `) + } + return &tscInput{ + subScenario: "reportErrors " + subScenario, + files: getBuildSampleFileMap(nil), + cwd: "/user/username/projects/sample1", + commandLineArgs: slices.Concat([]string{"-b", "-w", "tests"}, options), + edits: []*tscEdit{ + { + caption: "change logic", + edit: func(sys *testSys) { + sys.appendFile("/user/username/projects/sample1/logic/index.ts", "\nlet y: string = 10;") + }, + }, + { + caption: "change core", + edit: func(sys *testSys) { + sys.appendFile("/user/username/projects/sample1/core/index.ts", "\nlet x: string = 10;") + }, + expectedDiff: expectedDiffWithLogicError, + }, + { + caption: "fix error in logic", + edit: func(sys *testSys) { + sys.replaceFileText("/user/username/projects/sample1/logic/index.ts", "\nlet y: string = 10;", "") + }, + }, + }, + } + } + testCases := slices.Concat([]*tscInput{ { subScenario: "builds correctly when outDir is specified", files: getBuildSampleFileMap(func(files FileMap) { @@ -2441,54 +3223,6 @@ class someClass2 { }`, commandLineArgs: []string{"--b", "tests", "--verbose"}, edits: noChangeOnlyEdit, }, - { - subScenario: "skips builds downstream projects if upstream projects have errors with stopBuildOnErrors", - files: getBuildSampleFileMap(func(files FileMap) { - text, _ := files["/user/username/projects/sample1/core/index.ts"] - files["/user/username/projects/sample1/core/index.ts"] = text.(string) + `multiply();` - }), - cwd: "/user/username/projects/sample1", - commandLineArgs: []string{"--b", "tests", "--verbose", "--stopBuildOnErrors"}, - edits: []*tscEdit{ - noChange, - { - caption: "fix error", - edit: func(sys *testSys) { - sys.replaceFileText("/user/username/projects/sample1/core/index.ts", "multiply();", "") - }, - }, - }, - }, - { - subScenario: "skips builds downstream projects if upstream projects have errors with stopBuildOnErrors when test does not reference core", - files: getBuildSampleFileMap(func(files FileMap) { - files["/user/username/projects/sample1/tests/tsconfig.json"] = stringtestutil.Dedent(` - { - "references": [ - { "path": "../logic" }, - ], - "files": ["index.ts"], - "compilerOptions": { - "composite": true, - "declaration": true, - "skipDefaultLibCheck": true, - }, - }`) - text, _ := files["/user/username/projects/sample1/core/index.ts"] - files["/user/username/projects/sample1/core/index.ts"] = text.(string) + `multiply();` - }), - cwd: "/user/username/projects/sample1", - commandLineArgs: []string{"--b", "tests", "--verbose", "--stopBuildOnErrors"}, - edits: []*tscEdit{ - noChange, - { - caption: "fix error", - edit: func(sys *testSys) { - sys.replaceFileText("/user/username/projects/sample1/core/index.ts", "multiply();", "") - }, - }, - }, - }, { subScenario: "listFiles", files: getBuildSampleFileMap(nil), @@ -2677,7 +3411,128 @@ class someClass2 { }`, cwd: "/user/username/projects/sample1", commandLineArgs: []string{"--b", "tests", "--verbose", "--force"}, }, - } + { + subScenario: "change builds changes and reports found errors message", + files: getBuildSampleFileMap(nil), + cwd: "/user/username/projects/sample1", + commandLineArgs: []string{"--b", "-w", "tests"}, + edits: getBuildSampleWatchDtsChangingEdits(), + }, + { + subScenario: "non local change does not start build of referencing projects", + files: getBuildSampleFileMap(nil), + cwd: "/user/username/projects/sample1", + commandLineArgs: []string{"--b", "-w", "tests"}, + edits: getBuildSampleWatchNonDtsChangingEdits(), + }, + { + subScenario: "builds when new file is added, and its subsequent updates", + files: getBuildSampleFileMap(nil), + cwd: "/user/username/projects/sample1", + commandLineArgs: []string{"--b", "-w", "tests"}, + edits: getBuildSampleWatchNewFileEdits(), + }, + { + subScenario: "change builds changes and reports found errors message with circular references", + files: getBuildSampleFileMap(makeCircularReferences), + cwd: "/user/username/projects/sample1", + commandLineArgs: []string{"--b", "-w", "tests"}, + edits: getBuildSampleWatchDtsChangingEdits(), + }, + { + subScenario: "non local change does not start build of referencing projects with circular references", + files: getBuildSampleFileMap(makeCircularReferences), + cwd: "/user/username/projects/sample1", + commandLineArgs: []string{"--b", "-w", "tests"}, + edits: getBuildSampleWatchNonDtsChangingEdits(), + }, + { + subScenario: "builds when new file is added, and its subsequent updates with circular references", + files: getBuildSampleFileMap(makeCircularReferences), + cwd: "/user/username/projects/sample1", + commandLineArgs: []string{"--b", "-w", "tests"}, + edits: getBuildSampleWatchNewFileEdits(), + }, + { + subScenario: "watches config files that are not present", + files: getBuildSampleFileMap(func(files FileMap) { + delete(files, "/user/username/projects/sample1/logic/tsconfig.json") + }), + cwd: "/user/username/projects/sample1", + commandLineArgs: []string{"--b", "-w", "tests"}, + edits: []*tscEdit{ + { + caption: "Write logic", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/sample1/logic/tsconfig.json", getLogicConfig(), false) + }, + }, + }, + }, + getIncrementalErrorTest("when preserveWatchOutput is not used", nil), + getIncrementalErrorTest("when preserveWatchOutput is passed on command line", []string{"--preserveWatchOutput"}), + getIncrementalErrorTest("when stopBuildOnErrors is passed on command line", []string{"--stopBuildOnErrors"}), + { + subScenario: "incremental updates in verbose mode", + files: getBuildSampleFileMap(nil), + cwd: "/user/username/projects/sample1", + commandLineArgs: []string{"--b", "-w", "tests", "--verbose"}, + edits: []*tscEdit{ + { + caption: "Make non dts change", + edit: func(sys *testSys) { + sys.appendFile("/user/username/projects/sample1/logic/index.ts", "\nfunction someFn() { }") + }, + }, + { + caption: "Make dts change", + edit: func(sys *testSys) { + sys.replaceFileText("/user/username/projects/sample1/logic/index.ts", "\nfunction someFn() { }", "\nexport function someFn() { }") + }, + }, + }, + }, + { + subScenario: "should not trigger recompilation because of program emit", + files: getBuildSampleFileMap(nil), + cwd: "/user/username/projects/sample1", + commandLineArgs: []string{"--b", "-w", "core", "--verbose"}, + edits: []*tscEdit{ + noChange, + { + caption: "Add new file", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/sample1/core/file3.ts", `export const y = 10;`, false) + }, + }, + noChange, + }, + }, + { + subScenario: "should not trigger recompilation because of program emit with outDir specified", + files: getBuildSampleFileMap(func(files FileMap) { + files["/user/username/projects/sample1/core/tsconfig.json"] = stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, + "outDir": "outDir" + } + }`) + }), + cwd: "/user/username/projects/sample1", + commandLineArgs: []string{"--b", "-w", "core", "--verbose"}, + edits: []*tscEdit{ + noChange, + { + caption: "Add new file", + edit: func(sys *testSys) { + sys.writeFileNoError("/user/username/projects/sample1/core/file3.ts", `export const y = 10;`, false) + }, + }, + noChange, + }, + }, + }, getStopBuildOnErrorTests(nil), getStopBuildOnErrorTests([]string{"--watch"})) for _, test := range testCases { test.run(t, "sample") diff --git a/internal/execute/watcher.go b/internal/execute/watcher.go index 15cd3fcd9a..1c1a97b238 100644 --- a/internal/execute/watcher.go +++ b/internal/execute/watcher.go @@ -16,7 +16,7 @@ import ( type Watcher struct { sys tsc.System configFileName string - options *tsoptions.ParsedCommandLine + config *tsoptions.ParsedCommandLine reportDiagnostic tsc.DiagnosticReporter reportErrorSummary tsc.DiagnosticsReporter testing tsc.CommandLineTesting @@ -32,7 +32,7 @@ var _ tsc.Watcher = (*Watcher)(nil) func createWatcher(sys tsc.System, configParseResult *tsoptions.ParsedCommandLine, reportDiagnostic tsc.DiagnosticReporter, reportErrorSummary tsc.DiagnosticsReporter, testing tsc.CommandLineTesting) *Watcher { w := &Watcher{ sys: sys, - options: configParseResult, + config: configParseResult, reportDiagnostic: reportDiagnostic, reportErrorSummary: reportErrorSummary, testing: testing, @@ -46,13 +46,10 @@ func createWatcher(sys tsc.System, configParseResult *tsoptions.ParsedCommandLin func (w *Watcher) start() { w.host = compiler.NewCompilerHost(w.sys.GetCurrentDirectory(), w.sys.FS(), w.sys.DefaultLibraryPath(), nil, getTraceFromSys(w.sys, w.testing)) - w.program = incremental.ReadBuildInfoProgram(w.options, incremental.NewBuildInfoReader(w.host), w.host) + w.program = incremental.ReadBuildInfoProgram(w.config, incremental.NewBuildInfoReader(w.host), w.host) if w.testing == nil { - watchInterval := 1000 * time.Millisecond - if w.options.ParsedConfig.WatchOptions != nil { - watchInterval = time.Duration(*w.options.ParsedConfig.WatchOptions.Interval) * time.Millisecond - } + watchInterval := w.config.ParsedConfig.WatchOptions.WatchInterval() for { w.DoCycle() time.Sleep(watchInterval) @@ -72,7 +69,7 @@ func (w *Watcher) DoCycle() { } // updateProgram() w.program = incremental.NewProgram(compiler.NewProgram(compiler.ProgramOptions{ - Config: w.options, + Config: w.config, Host: w.host, JSDocParsingMode: ast.JSDocParsingModeParseForTypeErrors, }), w.program, nil, w.testing != nil) @@ -94,7 +91,16 @@ func (w *Watcher) DoCycle() { func (w *Watcher) compileAndEmit() { // !!! output/error reporting is currently the same as non-watch mode // diagnostics, emitResult, exitStatus := - tsc.EmitFilesAndReportErrors(w.sys, w.program, w.program.GetProgram(), w.reportDiagnostic, w.reportErrorSummary, w.sys.Writer(), &tsc.CompileTimes{}, w.testing) + tsc.EmitFilesAndReportErrors(tsc.EmitInput{ + Sys: w.sys, + ProgramLike: w.program, + Program: w.program.GetProgram(), + ReportDiagnostic: w.reportDiagnostic, + ReportErrorSummary: w.reportErrorSummary, + Writer: w.sys.Writer(), + CompileTimes: &tsc.CompileTimes{}, + Testing: w.testing, + }) } func (w *Watcher) hasErrorsInTsConfig() bool { @@ -110,11 +116,11 @@ func (w *Watcher) hasErrorsInTsConfig() bool { return true } // CompilerOptions contain fields which should not be compared; clone to get a copy without those set. - if !reflect.DeepEqual(w.options.CompilerOptions().Clone(), configParseResult.CompilerOptions().Clone()) { + if !reflect.DeepEqual(w.config.CompilerOptions().Clone(), configParseResult.CompilerOptions().Clone()) { // fmt.Fprintln(w.sys.Writer(), "build triggered due to config change") w.configModified = true } - w.options = configParseResult + w.config = configParseResult } w.host = compiler.NewCompilerHost(w.sys.GetCurrentDirectory(), w.sys.FS(), w.sys.DefaultLibraryPath(), extendedConfigCache, getTraceFromSys(w.sys, w.testing)) return false @@ -152,7 +158,3 @@ func (w *Watcher) hasBeenModified(program *compiler.Program) bool { w.configModified = false return filesModified } - -func (w *Watcher) GetProgram() *incremental.Program { - return w.program -} diff --git a/internal/tsoptions/declscompiler.go b/internal/tsoptions/declscompiler.go index 725b68dc3e..1223b52df5 100644 --- a/internal/tsoptions/declscompiler.go +++ b/internal/tsoptions/declscompiler.go @@ -1187,7 +1187,15 @@ func optionsHaveChanges(oldOptions *core.CompilerOptions, newOptions *core.Compi } oldOptionsValue := reflect.ValueOf(oldOptions).Elem() return ForEachCompilerOptionValue(newOptions, declFilter, func(option *CommandLineOption, value reflect.Value, i int) bool { - return !reflect.DeepEqual(value.Interface(), oldOptionsValue.Field(i).Interface()) + newValue := value.Interface() + oldValue := oldOptionsValue.Field(i).Interface() + if option.strictFlag { + return oldOptions.GetStrictOptionValue(oldValue.(core.Tristate)) != newOptions.GetStrictOptionValue(newValue.(core.Tristate)) + } + if option.allowJsFlag { + return oldOptions.GetAllowJS() != newOptions.GetAllowJS() + } + return !reflect.DeepEqual(newValue, oldValue) }) } diff --git a/internal/tsoptions/tsconfigparsing.go b/internal/tsoptions/tsconfigparsing.go index 663802b9d8..9ccef5af8d 100644 --- a/internal/tsoptions/tsconfigparsing.go +++ b/internal/tsoptions/tsconfigparsing.go @@ -972,11 +972,6 @@ func getExtendedConfig( result.extendedSourceFiles.Add(extendedSourceFile) } } - - if len(cacheEntry.extendedResult.SourceFile.Diagnostics()) != 0 { - errors = append(errors, cacheEntry.extendedResult.SourceFile.Diagnostics()...) - return nil, errors - } } return cacheEntry.extendedConfig, errors } diff --git a/internal/vfs/cachedvfs/cachedvfs.go b/internal/vfs/cachedvfs/cachedvfs.go index 6fcc3d92f4..13ec842f72 100644 --- a/internal/vfs/cachedvfs/cachedvfs.go +++ b/internal/vfs/cachedvfs/cachedvfs.go @@ -146,6 +146,5 @@ func (fsys *FS) WalkDir(root string, walkFn vfs.WalkDirFunc) error { } func (fsys *FS) WriteFile(path string, data string, writeByteOrderMark bool) error { - // !!! sheetal this needs update to caches or not? return fsys.fs.WriteFile(path, data, writeByteOrderMark) } diff --git a/internal/vfs/vfstest/vfstest.go b/internal/vfs/vfstest/vfstest.go index 4e8a0d7fe1..f056b1b59d 100644 --- a/internal/vfs/vfstest/vfstest.go +++ b/internal/vfs/vfstest/vfstest.go @@ -565,6 +565,18 @@ func (m *MapFS) GetTargetOfSymlink(path string) (string, bool) { return "", false } +func (m *MapFS) GetModTime(path string) time.Time { + path, _ = strings.CutPrefix(path, "/") + m.mu.RLock() + defer m.mu.RUnlock() + canonical := m.getCanonicalPath(path) + canonicalString := string(canonical) + if fileInfo, ok := m.m[canonicalString]; ok { + return fileInfo.ModTime + } + return time.Time{} +} + func (m *MapFS) Entries() iter.Seq2[string, *fstest.MapFile] { return func(yield func(string, *fstest.MapFile) bool) { m.mu.RLock() @@ -585,6 +597,15 @@ func (m *MapFS) Entries() iter.Seq2[string, *fstest.MapFile] { } } +func (m *MapFS) GetFileInfo(path string) *fstest.MapFile { + path, _ = strings.CutPrefix(path, "/") + m.mu.RLock() + defer m.mu.RUnlock() + canonical := m.getCanonicalPath(path) + canonicalString := string(canonical) + return m.m[canonicalString] +} + func must[T any](v T, err error) T { if err != nil { panic(err) diff --git a/testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors-with-incremental.js b/testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors-with-incremental.js index 2af5eb59ab..a82f347c23 100644 --- a/testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors-with-incremental.js +++ b/testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors-with-incremental.js @@ -207,7 +207,6 @@ Output:: 2 export const api = ky.extend({});    ~~~ -TSFILE: /home/src/workspaces/project/tsconfig.tsbuildinfo ../../tslibs/TS/Lib/lib.esnext.full.d.ts Default library for target 'ESNext' node_modules/ky/distribution/index.d.ts @@ -219,8 +218,6 @@ index.ts Found 1 error in index.ts:2 -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: diff --git a/testdata/baselines/reference/tsbuild/extends/resolves-the-symlink-path.js b/testdata/baselines/reference/tsbuild/extends/resolves-the-symlink-path.js index 4476b7d66e..be781f4bb3 100644 --- a/testdata/baselines/reference/tsbuild/extends/resolves-the-symlink-path.js +++ b/testdata/baselines/reference/tsbuild/extends/resolves-the-symlink-path.js @@ -47,7 +47,6 @@ interface Symbol { readonly [Symbol.toStringTag]: string; } declare const console: { log(msg: any): void; }; -//// [/users/user/projects/myproject/node_modules/@something/tsconfig-node] *deleted* //// [/users/user/projects/myproject/src/index.d.ts] *new* export declare const x = 10; diff --git a/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js b/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js index 1fb54008e0..45b4bc5898 100644 --- a/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js +++ b/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js @@ -122,7 +122,6 @@ interface Symbol { readonly [Symbol.toStringTag]: string; } declare const console: { log(msg: any): void; }; -//// [/user/username/projects/myproject/node_modules/pkg2] *deleted* //// [/user/username/projects/myproject/packages/pkg1/build/index.js] *new* "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js b/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js index 99d21e5c9b..3744082d9d 100644 --- a/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js +++ b/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js @@ -123,7 +123,6 @@ interface Symbol { readonly [Symbol.toStringTag]: string; } declare const console: { log(msg: any): void; }; -//// [/user/username/projects/myproject/node_modules/pkg2] *deleted* //// [/user/username/projects/myproject/packages/pkg1/build/index.js] *new* "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js b/testdata/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js index 2ab0a5931b..d66533dcd3 100644 --- a/testdata/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js +++ b/testdata/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js @@ -144,7 +144,6 @@ interface Symbol { readonly [Symbol.toStringTag]: string; } declare const console: { log(msg: any): void; }; -//// [/home/src/workspaces/project/node_modules/a] *deleted* //// [/home/src/workspaces/project/packages/a/types/index.d.ts] *new* export declare const a = "a"; diff --git a/testdata/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js b/testdata/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js index b1298953bb..6772e2211f 100644 --- a/testdata/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js +++ b/testdata/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js @@ -111,7 +111,6 @@ interface Symbol { readonly [Symbol.toStringTag]: string; } declare const console: { log(msg: any): void; }; -//// [/home/src/workspaces/project/node_modules/a] *deleted* //// [/home/src/workspaces/project/packages/a/types/index.d.ts] *new* export declare const a = "a"; @@ -209,7 +208,6 @@ Signatures:: Edit [0]:: build b -//// [/home/src/workspaces/project/node_modules/a] *deleted* tsgo -b packages/b --verbose --traceResolution --explainFiles ExitStatus:: Success @@ -252,7 +250,6 @@ packages/a/types/index.d.ts packages/b/index.js Matched by default include pattern '**/*' File is ECMAScript module because 'packages/b/package.json' has field "type" with value "module" -//// [/home/src/workspaces/project/node_modules/a] *deleted* //// [/home/src/workspaces/project/packages/b/tsconfig.tsbuildinfo] *new* {"version":"FakeTSVersion","root":["./index.js"]} //// [/home/src/workspaces/project/packages/b/tsconfig.tsbuildinfo.readable.baseline.txt] *new* diff --git a/testdata/baselines/reference/tsbuild/moduleSpecifiers/synthesized-module-specifiers-across-projects-resolve-correctly.js b/testdata/baselines/reference/tsbuild/moduleSpecifiers/synthesized-module-specifiers-across-projects-resolve-correctly.js index 03499ed04f..26f491e365 100644 --- a/testdata/baselines/reference/tsbuild/moduleSpecifiers/synthesized-module-specifiers-across-projects-resolve-correctly.js +++ b/testdata/baselines/reference/tsbuild/moduleSpecifiers/synthesized-module-specifiers-across-projects-resolve-correctly.js @@ -169,7 +169,6 @@ export class LassieDog extends Dog { static getDogConfig = () => LASSIE_CONFIG; } -//// [/home/src/workspaces/packages/src-dogs/node_modules] *deleted* //// [/home/src/workspaces/packages/src-dogs/tsconfig.tsbuildinfo] *new* {"version":"FakeTSVersion","root":[[4,8]],"fileNames":["lib.es2022.full.d.ts","../src-types/dogconfig.d.ts","../src-types/index.d.ts","./dogconfig.ts","./dog.ts","./lassie/lassieconfig.ts","./lassie/lassiedog.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a71e22ebb89c8c5bea7cef8d090ace25-export interface DogConfig {\n name: string;\n}\n","impliedNodeFormat":99},{"version":"3c21c50da3a1aea8b6fafa5aa595f160-export * from './dogconfig.js';\n","impliedNodeFormat":99},{"version":"a8c9e5169f1e05ea3fd4da563dc779b7-import { DogConfig } from 'src-types';\n\nexport const DOG_CONFIG: DogConfig = {\n name: 'Default dog',\n};","signature":"55c35bfb192d26f7ab56e9447864b637-import { DogConfig } from 'src-types';\nexport declare const DOG_CONFIG: DogConfig;\n","impliedNodeFormat":99},{"version":"4ef4eb6072aff36903b09b7e1fa75eea-import { DogConfig } from 'src-types';\nimport { DOG_CONFIG } from './dogconfig.js';\n\nexport abstract class Dog {\n\n public static getCapabilities(): DogConfig {\n return DOG_CONFIG;\n }\n}","signature":"1130c09f22ac69e13b25f0c42f3a9379-import { DogConfig } from 'src-types';\nexport declare abstract class Dog {\n static getCapabilities(): DogConfig;\n}\n","impliedNodeFormat":99},{"version":"37fa5afea0e398a9cc485818c902b71c-import { DogConfig } from 'src-types';\n\nexport const LASSIE_CONFIG: DogConfig = { name: 'Lassie' };","signature":"2ef44fffbc07bb77765462af9f6df2a2-import { DogConfig } from 'src-types';\nexport declare const LASSIE_CONFIG: DogConfig;\n","impliedNodeFormat":99},{"version":"16f2a31a47590452f19f34bb56d0345f-import { Dog } from '../dog.js';\nimport { LASSIE_CONFIG } from './lassieconfig.js';\n\nexport class LassieDog extends Dog {\n protected static getDogConfig = () => LASSIE_CONFIG;\n}","signature":"4e9a2f5bdce32a44b15cca0af7254c50-import { Dog } from '../dog.js';\nexport declare class LassieDog extends Dog {\n protected static getDogConfig: () => import(\"../index.js\").DogConfig;\n}\n","impliedNodeFormat":99},{"version":"099983d5c3c8b20233df02ca964ad12f-export * from 'src-types';\nexport * from './lassie/lassiedog.js';","signature":"0fb03f7b5b8061b0e2cd78a4131e3df7-export * from 'src-types';\nexport * from './lassie/lassiedog.js';\n","impliedNodeFormat":99}],"fileIdsList":[[3,4],[3],[3,7],[5,6],[2]],"options":{"composite":true,"declaration":true,"module":100},"referencedMap":[[5,1],[4,2],[8,3],[6,2],[7,4],[3,5]],"latestChangedDtsFile":"./index.d.ts"} //// [/home/src/workspaces/packages/src-dogs/tsconfig.tsbuildinfo.readable.baseline.txt] *new* @@ -354,7 +353,6 @@ export * from './dogconfig.js'; //// [/home/src/workspaces/packages/src-types/index.js] *new* export * from './dogconfig.js'; -//// [/home/src/workspaces/packages/src-types/node_modules] *deleted* //// [/home/src/workspaces/packages/src-types/tsconfig.tsbuildinfo] *new* {"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2022.full.d.ts","./dogconfig.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d8b224befa78d5f27814a6eb4da56079-export interface DogConfig {\n name: string;\n}","signature":"a71e22ebb89c8c5bea7cef8d090ace25-export interface DogConfig {\n name: string;\n}\n","impliedNodeFormat":99},{"version":"ac3890d1bb11659994f68e147333e98e-export * from './dogconfig.js';","signature":"3c21c50da3a1aea8b6fafa5aa595f160-export * from './dogconfig.js';\n","impliedNodeFormat":99}],"fileIdsList":[[2]],"options":{"composite":true,"declaration":true,"module":100},"referencedMap":[[3,1]],"latestChangedDtsFile":"./index.d.ts"} //// [/home/src/workspaces/packages/src-types/tsconfig.tsbuildinfo.readable.baseline.txt] *new* diff --git a/testdata/baselines/reference/tsbuild/noCheck/dts-errors-with-incremental.js b/testdata/baselines/reference/tsbuild/noCheck/dts-errors-with-incremental.js index 0a85460c6f..92ec8ba77d 100644 --- a/testdata/baselines/reference/tsbuild/noCheck/dts-errors-with-incremental.js +++ b/testdata/baselines/reference/tsbuild/noCheck/dts-errors-with-incremental.js @@ -210,8 +210,6 @@ Output:: Found 1 error in a.ts:1 -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: @@ -610,8 +608,6 @@ Output:: Found 1 error in a.ts:1 -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: diff --git a/testdata/baselines/reference/tsbuild/noEmit/dts-errors-with-incremental-as-modules.js b/testdata/baselines/reference/tsbuild/noEmit/dts-errors-with-incremental-as-modules.js index fade69a22f..917f58c5d5 100644 --- a/testdata/baselines/reference/tsbuild/noEmit/dts-errors-with-incremental-as-modules.js +++ b/testdata/baselines/reference/tsbuild/noEmit/dts-errors-with-incremental-as-modules.js @@ -185,8 +185,6 @@ Output:: Found 1 error in a.ts:1 -//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: @@ -704,8 +702,6 @@ Output:: Found 1 error in a.ts:1 -//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: diff --git a/testdata/baselines/reference/tsbuild/noEmit/dts-errors-with-incremental.js b/testdata/baselines/reference/tsbuild/noEmit/dts-errors-with-incremental.js index 6a76560995..660a979a45 100644 --- a/testdata/baselines/reference/tsbuild/noEmit/dts-errors-with-incremental.js +++ b/testdata/baselines/reference/tsbuild/noEmit/dts-errors-with-incremental.js @@ -169,8 +169,6 @@ Output:: Found 1 error in a.ts:1 -//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: @@ -613,8 +611,6 @@ Output:: Found 1 error in a.ts:1 -//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: diff --git a/testdata/baselines/reference/tsbuild/noEmitOnError/dts-errors-with-declaration-with-incremental.js b/testdata/baselines/reference/tsbuild/noEmitOnError/dts-errors-with-declaration-with-incremental.js index 17ecd83a5b..8cd1b339a5 100644 --- a/testdata/baselines/reference/tsbuild/noEmitOnError/dts-errors-with-declaration-with-incremental.js +++ b/testdata/baselines/reference/tsbuild/noEmitOnError/dts-errors-with-declaration-with-incremental.js @@ -222,8 +222,6 @@ Output:: Found 1 error in src/main.ts:2 -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: diff --git a/testdata/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-without-incremental.js b/testdata/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-without-incremental.js index 94b18a6cf3..fdab1fad98 100644 --- a/testdata/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-without-incremental.js +++ b/testdata/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-without-incremental.js @@ -51,6 +51,8 @@ Output:: 3 "references": [{ "path": "../other" }]    ~~~~~~~~~~~~~~~~~~~~~~ +[HH:MM:SS AM] Updating unchanged output timestamps of project 'src/main/tsconfig.json'... + Found 1 error in src/main/tsconfig.json:3 diff --git a/testdata/baselines/reference/tsbuildWatch/configFileErrors/reports-syntax-errors-in-config-file.js b/testdata/baselines/reference/tsbuildWatch/configFileErrors/reports-syntax-errors-in-config-file.js new file mode 100644 index 0000000000..1ae2b8dea6 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/configFileErrors/reports-syntax-errors-in-config-file.js @@ -0,0 +1,405 @@ +currentDirectory::/home/src/workspaces/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/project/a.ts] *new* +export function foo() { } +//// [/home/src/workspaces/project/b.ts] *new* +export function bar() { } +//// [/home/src/workspaces/project/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + }, + "files": [ + "a.ts" + "b.ts" + ] +} + +tsgo --b -w +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +tsconfig.json:7:9 - error TS1005: ',' expected. + +7 "b.ts" +   ~~~~~~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/home/src/workspaces/project/a.d.ts] *new* +export declare function foo(): void; + +//// [/home/src/workspaces/project/a.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.foo = foo; +function foo() { } + +//// [/home/src/workspaces/project/b.d.ts] *new* +export declare function bar(): void; + +//// [/home/src/workspaces/project/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bar = bar; +function bar() { } + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b8af959ef8294c415b0415508643e446-export function foo() { }","signature":"7ffb4ea6089b1a385965a214ba412941-export declare function foo(): void;\n","impliedNodeFormat":1},{"version":"492f7ec5be310332dc7e2ef503772d24-export function bar() { }","signature":"2f1e9992435d5724d3e1da8bdbc17eae-export declare function bar(): void;\n","impliedNodeFormat":1}],"options":{"composite":true},"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./b.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "b8af959ef8294c415b0415508643e446-export function foo() { }", + "signature": "7ffb4ea6089b1a385965a214ba412941-export declare function foo(): void;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b8af959ef8294c415b0415508643e446-export function foo() { }", + "signature": "7ffb4ea6089b1a385965a214ba412941-export declare function foo(): void;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "492f7ec5be310332dc7e2ef503772d24-export function bar() { }", + "signature": "2f1e9992435d5724d3e1da8bdbc17eae-export declare function bar(): void;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "492f7ec5be310332dc7e2ef503772d24-export function bar() { }", + "signature": "2f1e9992435d5724d3e1da8bdbc17eae-export declare function bar(): void;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "semanticDiagnosticsPerFile": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "latestChangedDtsFile": "./b.d.ts", + "size": 1345 +} + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/project/a.ts +*not cached* /home/src/workspaces/project/b.ts +Signatures:: +(stored at emit) /home/src/workspaces/project/a.ts +(stored at emit) /home/src/workspaces/project/b.ts + + +Edit [0]:: reports syntax errors after change to config file +//// [/home/src/workspaces/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "composite": true, "declaration": true + }, + "files": [ + "a.ts" + "b.ts" + ] +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +tsconfig.json:7:9 - error TS1005: ',' expected. + +7 "b.ts" +   ~~~~~~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/project/a.ts +*not cached* /home/src/workspaces/project/b.ts +Signatures:: + + +Edit [1]:: reports syntax errors after change to ts file +//// [/home/src/workspaces/project/a.ts] *modified* +export function foo() { }export function fooBar() { } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +tsconfig.json:7:9 - error TS1005: ',' expected. + +7 "b.ts" +   ~~~~~~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/workspaces/project/a.d.ts] *modified* +export declare function foo(): void; +export declare function fooBar(): void; + +//// [/home/src/workspaces/project/a.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.foo = foo; +exports.fooBar = fooBar; +function foo() { } +function fooBar() { } + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"12981c250647eb82bb45c5fb79732976-export function foo() { }export function fooBar() { }","signature":"f3ff291f5185ac75eeeb6de19fc28a01-export declare function foo(): void;\nexport declare function fooBar(): void;\n","impliedNodeFormat":1},{"version":"492f7ec5be310332dc7e2ef503772d24-export function bar() { }","signature":"2f1e9992435d5724d3e1da8bdbc17eae-export declare function bar(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./a.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "12981c250647eb82bb45c5fb79732976-export function foo() { }export function fooBar() { }", + "signature": "f3ff291f5185ac75eeeb6de19fc28a01-export declare function foo(): void;\nexport declare function fooBar(): void;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "12981c250647eb82bb45c5fb79732976-export function foo() { }export function fooBar() { }", + "signature": "f3ff291f5185ac75eeeb6de19fc28a01-export declare function foo(): void;\nexport declare function fooBar(): void;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "492f7ec5be310332dc7e2ef503772d24-export function bar() { }", + "signature": "2f1e9992435d5724d3e1da8bdbc17eae-export declare function bar(): void;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "492f7ec5be310332dc7e2ef503772d24-export function bar() { }", + "signature": "2f1e9992435d5724d3e1da8bdbc17eae-export declare function bar(): void;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true + }, + "semanticDiagnosticsPerFile": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "latestChangedDtsFile": "./a.d.ts", + "size": 1433 +} + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/project/a.ts +*not cached* /home/src/workspaces/project/b.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/project/a.ts + + +Edit [2]:: reports error when there is no change to tsconfig file +//// [/home/src/workspaces/project/tsconfig.json] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +tsconfig.json:7:9 - error TS1005: ',' expected. + +7 "b.ts" +   ~~~~~~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/project/a.ts +*not cached* /home/src/workspaces/project/b.ts +Signatures:: + + +Edit [3]:: builds after fixing config file errors +//// [/home/src/workspaces/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "composite": true, "declaration": true + }, + "files": [ + "a.ts", + "b.ts" + ] +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"12981c250647eb82bb45c5fb79732976-export function foo() { }export function fooBar() { }","signature":"f3ff291f5185ac75eeeb6de19fc28a01-export declare function foo(): void;\nexport declare function fooBar(): void;\n","impliedNodeFormat":1},{"version":"492f7ec5be310332dc7e2ef503772d24-export function bar() { }","signature":"2f1e9992435d5724d3e1da8bdbc17eae-export declare function bar(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./a.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "12981c250647eb82bb45c5fb79732976-export function foo() { }export function fooBar() { }", + "signature": "f3ff291f5185ac75eeeb6de19fc28a01-export declare function foo(): void;\nexport declare function fooBar(): void;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "12981c250647eb82bb45c5fb79732976-export function foo() { }export function fooBar() { }", + "signature": "f3ff291f5185ac75eeeb6de19fc28a01-export declare function foo(): void;\nexport declare function fooBar(): void;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "492f7ec5be310332dc7e2ef503772d24-export function bar() { }", + "signature": "2f1e9992435d5724d3e1da8bdbc17eae-export declare function bar(): void;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "492f7ec5be310332dc7e2ef503772d24-export function bar() { }", + "signature": "2f1e9992435d5724d3e1da8bdbc17eae-export declare function bar(): void;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true + }, + "latestChangedDtsFile": "./a.d.ts", + "size": 1382 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/project/a.ts +*refresh* /home/src/workspaces/project/b.ts +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/demo/updates-with-bad-reference.js b/testdata/baselines/reference/tsbuildWatch/demo/updates-with-bad-reference.js new file mode 100644 index 0000000000..3fdefa6ac5 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/demo/updates-with-bad-reference.js @@ -0,0 +1,908 @@ +currentDirectory::/user/username/projects/demo +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/demo/animals/animal.ts] *new* +export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +} +//// [/user/username/projects/demo/animals/dog.ts] *new* +import Animal from '.'; +import { makeRandomName } from '../core/utilities'; + +export interface Dog extends Animal { + woof(): void; + name: string; +} + +export function createDog(): Dog { + return ({ + size: "medium", + woof: function(this: Dog) { + console.log(`${ this.name } says "Woof"!`); + }, + name: makeRandomName() + }); +} +//// [/user/username/projects/demo/animals/index.ts] *new* +import Animal from './animal'; + +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog }; +//// [/user/username/projects/demo/animals/tsconfig.json] *new* +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/animals", + "rootDir": "." + }, + "references": [ + { "path": "../core" } + ] +} +//// [/user/username/projects/demo/core/tsconfig.json] *new* +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, +} +//// [/user/username/projects/demo/core/utilities.ts] *new* +import * as A from '../animals' +export function makeRandomName() { + return "Bob!?! "; +} + +export function lastElementOf(arr: T[]): T | undefined { + if (arr.length === 0) return undefined; + return arr[arr.length - 1]; +} +//// [/user/username/projects/demo/tsconfig-base.json] *new* +{ + "compilerOptions": { + "declaration": true, + "target": "es5", + "module": "commonjs", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "composite": true, + }, +} +//// [/user/username/projects/demo/tsconfig.json] *new* +{ + "files": [], + "references": [ + { + "path": "./core" + }, + { + "path": "./animals", + }, + { + "path": "./zoo", + }, + ], +} +//// [/user/username/projects/demo/zoo/tsconfig.json] *new* +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/zoo", + "rootDir": "." + }, + "references": [ + { + "path": "../animals" + } + ] +} +//// [/user/username/projects/demo/zoo/zoo.ts] *new* +import { Dog, createDog } from '../animals/index'; + +export function createZoo(): Array { + return [ + createDog() + ]; +} + +tsgo --b -w --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * animals/tsconfig.json + * zoo/tsconfig.json + * tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output file 'lib/core/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'core/tsconfig.json'... + +animals/index.ts:1:20 - error TS6307: File '/user/username/projects/demo/animals/animal.ts' is not listed within the file list of project '/user/username/projects/demo/core/tsconfig.json'. Projects must list all files or use an 'include' pattern. + +1 import Animal from './animal'; +   ~~~~~~~~~~ + +animals/index.ts:4:32 - error TS6307: File '/user/username/projects/demo/animals/dog.ts' is not listed within the file list of project '/user/username/projects/demo/core/tsconfig.json'. Projects must list all files or use an 'include' pattern. + +4 import { createDog, Dog } from './dog'; +   ~~~~~~~ + +core/utilities.ts:1:13 - error TS6133: 'A' is declared but its value is never read. + +1 import * as A from '../animals' +   ~ + +core/utilities.ts:1:20 - error TS6307: File '/user/username/projects/demo/animals/index.ts' is not listed within the file list of project '/user/username/projects/demo/core/tsconfig.json'. Projects must list all files or use an 'include' pattern. + The file is in the program because: + Imported via '../animals' from file '/user/username/projects/demo/core/utilities.ts' + Imported via '.' from file '/user/username/projects/demo/animals/dog.ts' + +1 import * as A from '../animals' +   ~~~~~~~~~~~~ + + animals/dog.ts:1:20 - File is included via import here. + 1 import Animal from '.'; +    ~~~ + +[HH:MM:SS AM] Project 'animals/tsconfig.json' is out of date because output file 'lib/animals/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'animals/tsconfig.json'... + +[HH:MM:SS AM] Project 'zoo/tsconfig.json' is out of date because output file 'lib/zoo/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'zoo/tsconfig.json'... + +[HH:MM:SS AM] Found 4 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/demo/animals/animal.d.ts] *new* +export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +} + +//// [/user/username/projects/demo/animals/animal.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/demo/animals/dog.d.ts] *new* +import Animal from '.'; +export interface Dog extends Animal { + woof(): void; + name: string; +} +export declare function createDog(): Dog; + +//// [/user/username/projects/demo/animals/dog.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDog = createDog; +const utilities_1 = require("../core/utilities"); +function createDog() { + return ({ + size: "medium", + woof: function () { + console.log(`${this.name} says "Woof"!`); + }, + name: (0, utilities_1.makeRandomName)() + }); +} + +//// [/user/username/projects/demo/animals/index.d.ts] *new* +import Animal from './animal'; +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog }; + +//// [/user/username/projects/demo/animals/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDog = void 0; +const dog_1 = require("./dog"); +Object.defineProperty(exports, "createDog", { enumerable: true, get: function () { return dog_1.createDog; } }); + +//// [/user/username/projects/demo/lib/animals/animal.d.ts] *new* +export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +} + +//// [/user/username/projects/demo/lib/animals/animal.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/demo/lib/animals/dog.d.ts] *new* +import Animal from '.'; +export interface Dog extends Animal { + woof(): void; + name: string; +} +export declare function createDog(): Dog; + +//// [/user/username/projects/demo/lib/animals/dog.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDog = createDog; +const utilities_1 = require("../core/utilities"); +function createDog() { + return ({ + size: "medium", + woof: function () { + console.log(`${this.name} says "Woof"!`); + }, + name: (0, utilities_1.makeRandomName)() + }); +} + +//// [/user/username/projects/demo/lib/animals/index.d.ts] *new* +import Animal from './animal'; +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog }; + +//// [/user/username/projects/demo/lib/animals/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDog = void 0; +const dog_1 = require("./dog"); +Object.defineProperty(exports, "createDog", { enumerable: true, get: function () { return dog_1.createDog; } }); + +//// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3],5],"fileNames":["lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../core/utilities.d.ts","../../animals/dog.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"47f086fff365b1e8b96a6df2c4313c1a-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}","signature":"1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","impliedNodeFormat":1},{"version":"d6a6b65b86b0330b1a1bd96b1738d5a4-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };","signature":"a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","impliedNodeFormat":1},"096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n",{"version":"39dbb9b755eef022e56879989968e5cf-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}","signature":"4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n","impliedNodeFormat":1}],"fileIdsList":[[3,4],[2,5]],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"referencedMap":[[5,1],[3,2]],"latestChangedDtsFile":"./dog.d.ts"} +//// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../animals/animal.ts", + "../../animals/index.ts" + ], + "original": [ + 2, + 3 + ] + }, + { + "files": [ + "../../animals/dog.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../../animals/animal.ts", + "../../animals/index.ts", + "../core/utilities.d.ts", + "../../animals/dog.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../animals/animal.ts", + "version": "47f086fff365b1e8b96a6df2c4313c1a-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}", + "signature": "1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "47f086fff365b1e8b96a6df2c4313c1a-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}", + "signature": "1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../animals/index.ts", + "version": "d6a6b65b86b0330b1a1bd96b1738d5a4-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };", + "signature": "a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d6a6b65b86b0330b1a1bd96b1738d5a4-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };", + "signature": "a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/utilities.d.ts", + "version": "096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n", + "signature": "096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../animals/dog.ts", + "version": "39dbb9b755eef022e56879989968e5cf-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "signature": "4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "39dbb9b755eef022e56879989968e5cf-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "signature": "4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../animals/index.ts", + "../core/utilities.d.ts" + ], + [ + "../../animals/animal.ts", + "../../animals/dog.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "module": 1, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "outDir": "./", + "rootDir": "../../animals", + "strict": true, + "target": 1 + }, + "referencedMap": { + "../../animals/dog.ts": [ + "../../animals/index.ts", + "../core/utilities.d.ts" + ], + "../../animals/index.ts": [ + "../../animals/animal.ts", + "../../animals/dog.ts" + ] + }, + "latestChangedDtsFile": "./dog.d.ts", + "size": 2794 +} +//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":[5],"fileNames":["lib.d.ts","../../animals/animal.ts","../../animals/dog.ts","../../animals/index.ts","../../core/utilities.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"47f086fff365b1e8b96a6df2c4313c1a-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}","signature":"1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","impliedNodeFormat":1},{"version":"39dbb9b755eef022e56879989968e5cf-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}","signature":"4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n","impliedNodeFormat":1},{"version":"d6a6b65b86b0330b1a1bd96b1738d5a4-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };","signature":"a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","impliedNodeFormat":1},{"version":"c71a99e072793c29cda49dd3fea04661-import * as A from '../animals'\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}","signature":"096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n","impliedNodeFormat":1}],"fileIdsList":[[4,5],[2,3],[4]],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[[3,1],[4,2],[5,3]],"semanticDiagnosticsPerFile":[[5,[{"pos":12,"end":13,"code":6133,"category":1,"message":"'A' is declared but its value is never read.","reportsUnnecessary":true}]]],"latestChangedDtsFile":"./utilities.d.ts"} +//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "../../core/utilities.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../../animals/animal.ts", + "../../animals/dog.ts", + "../../animals/index.ts", + "../../core/utilities.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../animals/animal.ts", + "version": "47f086fff365b1e8b96a6df2c4313c1a-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}", + "signature": "1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "47f086fff365b1e8b96a6df2c4313c1a-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}", + "signature": "1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../animals/dog.ts", + "version": "39dbb9b755eef022e56879989968e5cf-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "signature": "4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "39dbb9b755eef022e56879989968e5cf-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "signature": "4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../animals/index.ts", + "version": "d6a6b65b86b0330b1a1bd96b1738d5a4-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };", + "signature": "a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d6a6b65b86b0330b1a1bd96b1738d5a4-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };", + "signature": "a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../core/utilities.ts", + "version": "c71a99e072793c29cda49dd3fea04661-import * as A from '../animals'\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}", + "signature": "096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c71a99e072793c29cda49dd3fea04661-import * as A from '../animals'\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}", + "signature": "096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../animals/index.ts", + "../../core/utilities.ts" + ], + [ + "../../animals/animal.ts", + "../../animals/dog.ts" + ], + [ + "../../animals/index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "module": 1, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "outDir": "./", + "rootDir": "../../core", + "strict": true, + "target": 1 + }, + "referencedMap": { + "../../animals/dog.ts": [ + "../../animals/index.ts", + "../../core/utilities.ts" + ], + "../../animals/index.ts": [ + "../../animals/animal.ts", + "../../animals/dog.ts" + ], + "../../core/utilities.ts": [ + "../../animals/index.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + [ + "../../core/utilities.ts", + [ + { + "pos": 12, + "end": 13, + "code": 6133, + "category": 1, + "message": "'A' is declared but its value is never read.", + "reportsUnnecessary": true + } + ] + ] + ], + "latestChangedDtsFile": "./utilities.d.ts", + "size": 3302 +} +//// [/user/username/projects/demo/lib/core/utilities.d.ts] *new* +export declare function makeRandomName(): string; +export declare function lastElementOf(arr: T[]): T | undefined; + +//// [/user/username/projects/demo/lib/core/utilities.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeRandomName = makeRandomName; +exports.lastElementOf = lastElementOf; +function makeRandomName() { + return "Bob!?! "; +} +function lastElementOf(arr) { + if (arr.length === 0) + return undefined; + return arr[arr.length - 1]; +} + +//// [/user/username/projects/demo/lib/zoo/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../animals/animal.d.ts","../animals/dog.d.ts","../animals/index.d.ts","../../zoo/zoo.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n","a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n",{"version":"90c7a8cea6924c55890fba84da3398f3-import { Dog, createDog } from '../animals/index';\n\nexport function createZoo(): Array {\n return [\n createDog()\n ];\n}","signature":"f9be246631fc3123a90a7f2cf5f5a1a2-import { Dog } from '../animals/index';\nexport declare function createZoo(): Array;\n","impliedNodeFormat":1}],"fileIdsList":[[4],[2,3]],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../zoo","strict":true,"target":1},"referencedMap":[[3,1],[4,2],[5,1]],"latestChangedDtsFile":"./zoo.d.ts"} +//// [/user/username/projects/demo/lib/zoo/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../zoo/zoo.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../animals/animal.d.ts", + "../animals/dog.d.ts", + "../animals/index.d.ts", + "../../zoo/zoo.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../animals/animal.d.ts", + "version": "1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n", + "signature": "1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../animals/dog.d.ts", + "version": "4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n", + "signature": "4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../animals/index.d.ts", + "version": "a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "signature": "a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../zoo/zoo.ts", + "version": "90c7a8cea6924c55890fba84da3398f3-import { Dog, createDog } from '../animals/index';\n\nexport function createZoo(): Array {\n return [\n createDog()\n ];\n}", + "signature": "f9be246631fc3123a90a7f2cf5f5a1a2-import { Dog } from '../animals/index';\nexport declare function createZoo(): Array;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "90c7a8cea6924c55890fba84da3398f3-import { Dog, createDog } from '../animals/index';\n\nexport function createZoo(): Array {\n return [\n createDog()\n ];\n}", + "signature": "f9be246631fc3123a90a7f2cf5f5a1a2-import { Dog } from '../animals/index';\nexport declare function createZoo(): Array;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../animals/index.d.ts" + ], + [ + "../animals/animal.d.ts", + "../animals/dog.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "module": 1, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "outDir": "./", + "rootDir": "../../zoo", + "strict": true, + "target": 1 + }, + "referencedMap": { + "../animals/dog.d.ts": [ + "../animals/index.d.ts" + ], + "../animals/index.d.ts": [ + "../animals/animal.d.ts", + "../animals/dog.d.ts" + ], + "../../zoo/zoo.ts": [ + "../animals/index.d.ts" + ] + }, + "latestChangedDtsFile": "./zoo.d.ts", + "size": 2104 +} +//// [/user/username/projects/demo/lib/zoo/zoo.d.ts] *new* +import { Dog } from '../animals/index'; +export declare function createZoo(): Array; + +//// [/user/username/projects/demo/lib/zoo/zoo.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createZoo = createZoo; +const index_1 = require("../animals/index"); +function createZoo() { + return [ + (0, index_1.createDog)() + ]; +} + + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/demo/animals/animal.ts +*refresh* /user/username/projects/demo/animals/dog.ts +*refresh* /user/username/projects/demo/animals/index.ts +*refresh* /user/username/projects/demo/core/utilities.ts +Signatures:: +(stored at emit) /user/username/projects/demo/animals/animal.ts +(stored at emit) /user/username/projects/demo/animals/dog.ts +(stored at emit) /user/username/projects/demo/animals/index.ts +(stored at emit) /user/username/projects/demo/core/utilities.ts + +animals/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/demo/animals/animal.ts +*refresh* /user/username/projects/demo/animals/index.ts +*refresh* /user/username/projects/demo/lib/core/utilities.d.ts +*refresh* /user/username/projects/demo/animals/dog.ts +Signatures:: +(stored at emit) /user/username/projects/demo/animals/animal.ts +(stored at emit) /user/username/projects/demo/animals/index.ts +(stored at emit) /user/username/projects/demo/animals/dog.ts + +zoo/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/demo/lib/animals/animal.d.ts +*refresh* /user/username/projects/demo/lib/animals/dog.d.ts +*refresh* /user/username/projects/demo/lib/animals/index.d.ts +*refresh* /user/username/projects/demo/zoo/zoo.ts +Signatures:: +(stored at emit) /user/username/projects/demo/zoo/zoo.ts + + +Edit [0]:: Prepend a line +//// [/user/username/projects/demo/core/utilities.ts] *modified* + +import * as A from '../animals' +export function makeRandomName() { + return "Bob!?! "; +} + +export function lastElementOf(arr: T[]): T | undefined { + if (arr.length === 0) return undefined; + return arr[arr.length - 1]; +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * animals/tsconfig.json + * zoo/tsconfig.json + * tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because buildinfo file 'lib/core/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'core/tsconfig.json'... + +animals/index.ts:1:20 - error TS6307: File '/user/username/projects/demo/animals/animal.ts' is not listed within the file list of project '/user/username/projects/demo/core/tsconfig.json'. Projects must list all files or use an 'include' pattern. + +1 import Animal from './animal'; +   ~~~~~~~~~~ + +animals/index.ts:4:32 - error TS6307: File '/user/username/projects/demo/animals/dog.ts' is not listed within the file list of project '/user/username/projects/demo/core/tsconfig.json'. Projects must list all files or use an 'include' pattern. + +4 import { createDog, Dog } from './dog'; +   ~~~~~~~ + +core/utilities.ts:2:13 - error TS6133: 'A' is declared but its value is never read. + +2 import * as A from '../animals' +   ~ + +core/utilities.ts:2:20 - error TS6307: File '/user/username/projects/demo/animals/index.ts' is not listed within the file list of project '/user/username/projects/demo/core/tsconfig.json'. Projects must list all files or use an 'include' pattern. + The file is in the program because: + Imported via '../animals' from file '/user/username/projects/demo/core/utilities.ts' + Imported via '.' from file '/user/username/projects/demo/animals/dog.ts' + +2 import * as A from '../animals' +   ~~~~~~~~~~~~ + + animals/dog.ts:1:20 - File is included via import here. + 1 import Animal from '.'; +    ~~~ + +[HH:MM:SS AM] Project 'animals/tsconfig.json' is up to date with .d.ts files from its dependencies + +[HH:MM:SS AM] Updating output timestamps of project 'animals/tsconfig.json'... + +[HH:MM:SS AM] Found 4 errors. Watching for file changes. + +//// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo] *mTime changed* +//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","errors":true,"root":[5],"fileNames":["lib.d.ts","../../animals/animal.ts","../../animals/dog.ts","../../animals/index.ts","../../core/utilities.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"47f086fff365b1e8b96a6df2c4313c1a-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}","signature":"1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","impliedNodeFormat":1},{"version":"39dbb9b755eef022e56879989968e5cf-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}","signature":"4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n","impliedNodeFormat":1},{"version":"d6a6b65b86b0330b1a1bd96b1738d5a4-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };","signature":"a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","impliedNodeFormat":1},{"version":"c3e46c15bb789df9e21a5ca1964be7a1-\nimport * as A from '../animals'\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}","signature":"096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n","impliedNodeFormat":1}],"fileIdsList":[[4,5],[2,3],[4]],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[[3,1],[4,2],[5,3]],"semanticDiagnosticsPerFile":[[5,[{"pos":13,"end":14,"code":6133,"category":1,"message":"'A' is declared but its value is never read.","reportsUnnecessary":true}]]],"latestChangedDtsFile":"./utilities.d.ts"} +//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "../../core/utilities.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../../animals/animal.ts", + "../../animals/dog.ts", + "../../animals/index.ts", + "../../core/utilities.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../animals/animal.ts", + "version": "47f086fff365b1e8b96a6df2c4313c1a-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}", + "signature": "1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "47f086fff365b1e8b96a6df2c4313c1a-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}", + "signature": "1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../animals/dog.ts", + "version": "39dbb9b755eef022e56879989968e5cf-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "signature": "4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "39dbb9b755eef022e56879989968e5cf-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "signature": "4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../animals/index.ts", + "version": "d6a6b65b86b0330b1a1bd96b1738d5a4-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };", + "signature": "a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d6a6b65b86b0330b1a1bd96b1738d5a4-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };", + "signature": "a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../core/utilities.ts", + "version": "c3e46c15bb789df9e21a5ca1964be7a1-\nimport * as A from '../animals'\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}", + "signature": "096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c3e46c15bb789df9e21a5ca1964be7a1-\nimport * as A from '../animals'\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}", + "signature": "096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../animals/index.ts", + "../../core/utilities.ts" + ], + [ + "../../animals/animal.ts", + "../../animals/dog.ts" + ], + [ + "../../animals/index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "module": 1, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "outDir": "./", + "rootDir": "../../core", + "strict": true, + "target": 1 + }, + "referencedMap": { + "../../animals/dog.ts": [ + "../../animals/index.ts", + "../../core/utilities.ts" + ], + "../../animals/index.ts": [ + "../../animals/animal.ts", + "../../animals/dog.ts" + ], + "../../core/utilities.ts": [ + "../../animals/index.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + [ + "../../core/utilities.ts", + [ + { + "pos": 13, + "end": 14, + "code": 6133, + "category": 1, + "message": "'A' is declared but its value is never read.", + "reportsUnnecessary": true + } + ] + ] + ], + "latestChangedDtsFile": "./utilities.d.ts", + "size": 3304 +} +//// [/user/username/projects/demo/lib/core/utilities.js] *rewrite with same content* + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/demo/core/utilities.ts +Signatures:: +(computed .d.ts) /user/username/projects/demo/core/utilities.ts diff --git a/testdata/baselines/reference/tsbuildWatch/demo/updates-with-circular-reference.js b/testdata/baselines/reference/tsbuildWatch/demo/updates-with-circular-reference.js new file mode 100644 index 0000000000..ea64adfac5 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/demo/updates-with-circular-reference.js @@ -0,0 +1,578 @@ +currentDirectory::/user/username/projects/demo +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/demo/animals/animal.ts] *new* +export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +} +//// [/user/username/projects/demo/animals/dog.ts] *new* +import Animal from '.'; +import { makeRandomName } from '../core/utilities'; + +export interface Dog extends Animal { + woof(): void; + name: string; +} + +export function createDog(): Dog { + return ({ + size: "medium", + woof: function(this: Dog) { + console.log(`${ this.name } says "Woof"!`); + }, + name: makeRandomName() + }); +} +//// [/user/username/projects/demo/animals/index.ts] *new* +import Animal from './animal'; + +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog }; +//// [/user/username/projects/demo/animals/tsconfig.json] *new* +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/animals", + "rootDir": "." + }, + "references": [ + { "path": "../core" } + ] +} +//// [/user/username/projects/demo/core/tsconfig.json] *new* +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, + "references": [ + { + "path": "../zoo", + } + ] +} +//// [/user/username/projects/demo/core/utilities.ts] *new* +export function makeRandomName() { + return "Bob!?! "; +} + +export function lastElementOf(arr: T[]): T | undefined { + if (arr.length === 0) return undefined; + return arr[arr.length - 1]; +} +//// [/user/username/projects/demo/tsconfig-base.json] *new* +{ + "compilerOptions": { + "declaration": true, + "target": "es5", + "module": "commonjs", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "composite": true, + }, +} +//// [/user/username/projects/demo/tsconfig.json] *new* +{ + "files": [], + "references": [ + { + "path": "./core" + }, + { + "path": "./animals", + }, + { + "path": "./zoo", + }, + ], +} +//// [/user/username/projects/demo/zoo/tsconfig.json] *new* +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/zoo", + "rootDir": "." + }, + "references": [ + { + "path": "../animals" + } + ] +} +//// [/user/username/projects/demo/zoo/zoo.ts] *new* +import { Dog, createDog } from '../animals/index'; + +export function createZoo(): Array { + return [ + createDog() + ]; +} + +tsgo --b -w --verbose +ExitStatus:: ProjectReferenceCycle_OutputsSkipped +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * animals/tsconfig.json + * zoo/tsconfig.json + * core/tsconfig.json + * tsconfig.json + +error TS6202: Project references may not form a circular graph. Cycle detected: /user/username/projects/demo/tsconfig.json +/user/username/projects/demo/core/tsconfig.json +/user/username/projects/demo/zoo/tsconfig.json +/user/username/projects/demo/animals/tsconfig.json +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + + +Edit [0]:: Fix error +//// [/user/username/projects/demo/core/tsconfig.json] *modified* +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * animals/tsconfig.json + * zoo/tsconfig.json + * tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output file 'lib/core/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'core/tsconfig.json'... + +[HH:MM:SS AM] Project 'animals/tsconfig.json' is out of date because output file 'lib/animals/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'animals/tsconfig.json'... + +[HH:MM:SS AM] Project 'zoo/tsconfig.json' is out of date because output file 'lib/zoo/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'zoo/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/demo/lib/animals/animal.d.ts] *new* +export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +} + +//// [/user/username/projects/demo/lib/animals/animal.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/demo/lib/animals/dog.d.ts] *new* +import Animal from '.'; +export interface Dog extends Animal { + woof(): void; + name: string; +} +export declare function createDog(): Dog; + +//// [/user/username/projects/demo/lib/animals/dog.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDog = createDog; +const utilities_1 = require("../core/utilities"); +function createDog() { + return ({ + size: "medium", + woof: function () { + console.log(`${this.name} says "Woof"!`); + }, + name: (0, utilities_1.makeRandomName)() + }); +} + +//// [/user/username/projects/demo/lib/animals/index.d.ts] *new* +import Animal from './animal'; +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog }; + +//// [/user/username/projects/demo/lib/animals/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDog = void 0; +const dog_1 = require("./dog"); +Object.defineProperty(exports, "createDog", { enumerable: true, get: function () { return dog_1.createDog; } }); + +//// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3],5],"fileNames":["lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../core/utilities.d.ts","../../animals/dog.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"47f086fff365b1e8b96a6df2c4313c1a-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}","signature":"1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","impliedNodeFormat":1},{"version":"d6a6b65b86b0330b1a1bd96b1738d5a4-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };","signature":"a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","impliedNodeFormat":1},"096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n",{"version":"39dbb9b755eef022e56879989968e5cf-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}","signature":"4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n","impliedNodeFormat":1}],"fileIdsList":[[3,4],[2,5]],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"referencedMap":[[5,1],[3,2]],"latestChangedDtsFile":"./dog.d.ts"} +//// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../animals/animal.ts", + "../../animals/index.ts" + ], + "original": [ + 2, + 3 + ] + }, + { + "files": [ + "../../animals/dog.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../../animals/animal.ts", + "../../animals/index.ts", + "../core/utilities.d.ts", + "../../animals/dog.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../animals/animal.ts", + "version": "47f086fff365b1e8b96a6df2c4313c1a-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}", + "signature": "1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "47f086fff365b1e8b96a6df2c4313c1a-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}", + "signature": "1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../animals/index.ts", + "version": "d6a6b65b86b0330b1a1bd96b1738d5a4-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };", + "signature": "a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d6a6b65b86b0330b1a1bd96b1738d5a4-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };", + "signature": "a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/utilities.d.ts", + "version": "096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n", + "signature": "096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../animals/dog.ts", + "version": "39dbb9b755eef022e56879989968e5cf-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "signature": "4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "39dbb9b755eef022e56879989968e5cf-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}", + "signature": "4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../animals/index.ts", + "../core/utilities.d.ts" + ], + [ + "../../animals/animal.ts", + "../../animals/dog.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "module": 1, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "outDir": "./", + "rootDir": "../../animals", + "strict": true, + "target": 1 + }, + "referencedMap": { + "../../animals/dog.ts": [ + "../../animals/index.ts", + "../core/utilities.d.ts" + ], + "../../animals/index.ts": [ + "../../animals/animal.ts", + "../../animals/dog.ts" + ] + }, + "latestChangedDtsFile": "./dog.d.ts", + "size": 2794 +} +//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","../../core/utilities.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"43144ca7c82db0f51f0d56a2b3e2f565-export function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}","signature":"096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n","impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"latestChangedDtsFile":"./utilities.d.ts"} +//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../core/utilities.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "../../core/utilities.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../core/utilities.ts", + "version": "43144ca7c82db0f51f0d56a2b3e2f565-export function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}", + "signature": "096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "43144ca7c82db0f51f0d56a2b3e2f565-export function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}", + "signature": "096c311e7aecdb577f7b613fbf1716e5-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "module": 1, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "outDir": "./", + "rootDir": "../../core", + "strict": true, + "target": 1 + }, + "latestChangedDtsFile": "./utilities.d.ts", + "size": 1586 +} +//// [/user/username/projects/demo/lib/core/utilities.d.ts] *new* +export declare function makeRandomName(): string; +export declare function lastElementOf(arr: T[]): T | undefined; + +//// [/user/username/projects/demo/lib/core/utilities.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeRandomName = makeRandomName; +exports.lastElementOf = lastElementOf; +function makeRandomName() { + return "Bob!?! "; +} +function lastElementOf(arr) { + if (arr.length === 0) + return undefined; + return arr[arr.length - 1]; +} + +//// [/user/username/projects/demo/lib/zoo/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../animals/animal.d.ts","../animals/dog.d.ts","../animals/index.d.ts","../../zoo/zoo.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n","a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n",{"version":"90c7a8cea6924c55890fba84da3398f3-import { Dog, createDog } from '../animals/index';\n\nexport function createZoo(): Array {\n return [\n createDog()\n ];\n}","signature":"f9be246631fc3123a90a7f2cf5f5a1a2-import { Dog } from '../animals/index';\nexport declare function createZoo(): Array;\n","impliedNodeFormat":1}],"fileIdsList":[[4],[2,3]],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../zoo","strict":true,"target":1},"referencedMap":[[3,1],[4,2],[5,1]],"latestChangedDtsFile":"./zoo.d.ts"} +//// [/user/username/projects/demo/lib/zoo/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../zoo/zoo.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../animals/animal.d.ts", + "../animals/dog.d.ts", + "../animals/index.d.ts", + "../../zoo/zoo.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../animals/animal.d.ts", + "version": "1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n", + "signature": "1d76529d4652ddf9ebdfa65e748240fb-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../animals/dog.d.ts", + "version": "4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n", + "signature": "4dc4bc559452869bfd0d92b5ed5d604f-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../animals/index.d.ts", + "version": "a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "signature": "a3e41a5ccafc3d07a201f0603e28edcf-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../zoo/zoo.ts", + "version": "90c7a8cea6924c55890fba84da3398f3-import { Dog, createDog } from '../animals/index';\n\nexport function createZoo(): Array {\n return [\n createDog()\n ];\n}", + "signature": "f9be246631fc3123a90a7f2cf5f5a1a2-import { Dog } from '../animals/index';\nexport declare function createZoo(): Array;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "90c7a8cea6924c55890fba84da3398f3-import { Dog, createDog } from '../animals/index';\n\nexport function createZoo(): Array {\n return [\n createDog()\n ];\n}", + "signature": "f9be246631fc3123a90a7f2cf5f5a1a2-import { Dog } from '../animals/index';\nexport declare function createZoo(): Array;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../animals/index.d.ts" + ], + [ + "../animals/animal.d.ts", + "../animals/dog.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "module": 1, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "outDir": "./", + "rootDir": "../../zoo", + "strict": true, + "target": 1 + }, + "referencedMap": { + "../animals/dog.d.ts": [ + "../animals/index.d.ts" + ], + "../animals/index.d.ts": [ + "../animals/animal.d.ts", + "../animals/dog.d.ts" + ], + "../../zoo/zoo.ts": [ + "../animals/index.d.ts" + ] + }, + "latestChangedDtsFile": "./zoo.d.ts", + "size": 2104 +} +//// [/user/username/projects/demo/lib/zoo/zoo.d.ts] *new* +import { Dog } from '../animals/index'; +export declare function createZoo(): Array; + +//// [/user/username/projects/demo/lib/zoo/zoo.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createZoo = createZoo; +const index_1 = require("../animals/index"); +function createZoo() { + return [ + (0, index_1.createDog)() + ]; +} + + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/demo/core/utilities.ts +Signatures:: +(stored at emit) /user/username/projects/demo/core/utilities.ts + +animals/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/demo/animals/animal.ts +*refresh* /user/username/projects/demo/animals/index.ts +*refresh* /user/username/projects/demo/lib/core/utilities.d.ts +*refresh* /user/username/projects/demo/animals/dog.ts +Signatures:: +(stored at emit) /user/username/projects/demo/animals/animal.ts +(stored at emit) /user/username/projects/demo/animals/index.ts +(stored at emit) /user/username/projects/demo/animals/dog.ts + +zoo/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/demo/lib/animals/animal.d.ts +*refresh* /user/username/projects/demo/lib/animals/dog.d.ts +*refresh* /user/username/projects/demo/lib/animals/index.d.ts +*refresh* /user/username/projects/demo/zoo/zoo.ts +Signatures:: +(stored at emit) /user/username/projects/demo/zoo/zoo.ts diff --git a/testdata/baselines/reference/tsbuildWatch/extends/configDir-template.js b/testdata/baselines/reference/tsbuildWatch/extends/configDir-template.js new file mode 100644 index 0000000000..b67178786b --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/extends/configDir-template.js @@ -0,0 +1,187 @@ +currentDirectory::/home/src/projects/myproject +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/projects/configs/first/tsconfig.json] *new* +{ + "extends": "../second/tsconfig.json", + "include": ["${configDir}/src"], + "compilerOptions": { + "typeRoots": ["root1", "${configDir}/root2", "root3"], + "types": [], + }, +} +//// [/home/src/projects/configs/second/tsconfig.json] *new* +{ + "files": ["${configDir}/main.ts"], + "compilerOptions": { + "declarationDir": "${configDir}/decls", + "paths": { + "@myscope/*": ["${configDir}/types/*"], + }, + }, + "watchOptions": { + "excludeFiles": ["${configDir}/main.ts"], + }, +} +//// [/home/src/projects/myproject/main.ts] *new* +// some comment +export const y = 10; +import { x } from "@myscope/sometype"; +//// [/home/src/projects/myproject/tsconfig.json] *new* +{ + "extends": "../configs/first/tsconfig.json", + "compilerOptions": { + "declaration": true, + "outDir": "outDir", + "traceResolution": true, + }, +} +//// [/home/src/projects/myproject/types/sometype.ts] *new* +export const x = 10; + +tsgo --b -w --explainFiles --v +ExitStatus:: Success +Output:: +[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 'outDir/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +======== Resolving module '@myscope/sometype' from '/home/src/projects/myproject/main.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +'paths' option is specified, looking for a pattern to match module name '@myscope/sometype'. +Module name '@myscope/sometype', matched pattern '@myscope/*'. +Trying substitution '/home/src/projects/myproject/types/*', candidate module location: '/home/src/projects/myproject/types/sometype'. +Loading module as file / folder, candidate module location '/home/src/projects/myproject/types/sometype', target file types: TypeScript, JavaScript, Declaration, JSON. +File '/home/src/projects/myproject/types/sometype.ts' exists - use it as a name resolution result. +======== Module name '@myscope/sometype' was successfully resolved to '/home/src/projects/myproject/types/sometype.ts'. ======== +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +types/sometype.ts + Imported via "@myscope/sometype" from file 'main.ts' +main.ts + Part of 'files' list in tsconfig.json +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/myproject/decls/main.d.ts] *new* +// some comment +export declare const y = 10; + +//// [/home/src/projects/myproject/decls/types/sometype.d.ts] *new* +export declare const x = 10; + +//// [/home/src/projects/myproject/outDir/main.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.y = void 0; +// some comment +exports.y = 10; + +//// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":["../main.ts"]} +//// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../main.ts" + ], + "original": "../main.ts" + } + ], + "size": 49 +} +//// [/home/src/projects/myproject/outDir/types/sometype.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/myproject/types/sometype.ts +*refresh* /home/src/projects/myproject/main.ts +Signatures:: +(stored at emit) /home/src/projects/myproject/types/sometype.ts +(stored at emit) /home/src/projects/myproject/main.ts + + +Edit [0]:: edit extended config file +//// [/home/src/projects/configs/first/tsconfig.json] *modified* +{ + "extends": "../second/tsconfig.json", + "include": ["${configDir}/src"], + "compilerOptions": { + "typeRoots": ["${configDir}/root2"], + "types": [], + }, +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'outDir/tsconfig.tsbuildinfo' is older than input '../configs/first/tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +======== Resolving module '@myscope/sometype' from '/home/src/projects/myproject/main.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +'paths' option is specified, looking for a pattern to match module name '@myscope/sometype'. +Module name '@myscope/sometype', matched pattern '@myscope/*'. +Trying substitution '/home/src/projects/myproject/types/*', candidate module location: '/home/src/projects/myproject/types/sometype'. +Loading module as file / folder, candidate module location '/home/src/projects/myproject/types/sometype', target file types: TypeScript, JavaScript, Declaration, JSON. +File '/home/src/projects/myproject/types/sometype.ts' exists - use it as a name resolution result. +======== Module name '@myscope/sometype' was successfully resolved to '/home/src/projects/myproject/types/sometype.ts'. ======== +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +types/sometype.ts + Imported via "@myscope/sometype" from file 'main.ts' +main.ts + Part of 'files' list in tsconfig.json +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/myproject/decls/main.d.ts] *mTime changed* +//// [/home/src/projects/myproject/outDir/main.js] *mTime changed* +//// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config-with-libReplacement.js b/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config-with-libReplacement.js new file mode 100644 index 0000000000..1bc6e8b2bf --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config-with-libReplacement.js @@ -0,0 +1,930 @@ +currentDirectory::/home/src/workspace/projects +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/tslibs/TS/Lib/lib.dom.d.ts] *new* +interface DOMInterface { } +//// [/home/src/tslibs/TS/Lib/lib.scripthost.d.ts] *new* +interface ScriptHostInterface { } +//// [/home/src/tslibs/TS/Lib/lib.webworker.d.ts] *new* +interface WebWorkerInterface { } +//// [/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts] *new* +interface DOMInterface { } +//// [/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts] *new* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/home/src/workspace/projects/node_modules/@typescript/lib-esnext/index.d.ts] *new* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/home/src/workspace/projects/node_modules/@typescript/lib-scripthost/index.d.ts] *new* +interface ScriptHostInterface { } +//// [/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts] *new* +interface WebWorkerInterface { } +//// [/home/src/workspace/projects/node_modules/@typescript/unlreated/index.d.ts] *new* +export const unrelated = 10; +//// [/home/src/workspace/projects/project1/core.d.ts] *new* +export const core = 10; +//// [/home/src/workspace/projects/project1/file.ts] *new* +export const file = 10; +//// [/home/src/workspace/projects/project1/file2.ts] *new* +/// +/// +/// +//// [/home/src/workspace/projects/project1/index.ts] *new* +export const x = "type1"; +//// [/home/src/workspace/projects/project1/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "typeRoots": ["./typeroot1"], + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": true + } +} +//// [/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts] *new* +export type TheNum = "type1"; +//// [/home/src/workspace/projects/project1/utils.d.ts] *new* +export const y = 10; +//// [/home/src/workspace/projects/project2/index.ts] *new* +export const y = 10 +//// [/home/src/workspace/projects/project2/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": true + } +} +//// [/home/src/workspace/projects/project2/utils.d.ts] *new* +export const y = 10; +//// [/home/src/workspace/projects/project3/index.ts] *new* +export const z = 10 +//// [/home/src/workspace/projects/project3/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": true + } +} +//// [/home/src/workspace/projects/project3/utils.d.ts] *new* +export const y = 10; +//// [/home/src/workspace/projects/project4/index.ts] *new* +export const z = 10 +//// [/home/src/workspace/projects/project4/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "lib": ["esnext", "dom", "webworker"], + "traceResolution": true, + "libReplacement": true + } +} +//// [/home/src/workspace/projects/project4/utils.d.ts] *new* +export const y = 10; + +tsgo -b -w project1 project2 project3 project4 --verbose --explainFiles +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * project1/tsconfig.json + * project2/tsconfig.json + * project3/tsconfig.json + * project4/tsconfig.json + +[HH:MM:SS AM] Project 'project1/tsconfig.json' is out of date because output file 'project1/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project1/tsconfig.json'... + +======== Resolving type reference directive 'sometype', containing file '/home/src/workspace/projects/project1/__inferred type names__.ts', root directory '/home/src/workspace/projects/project1/typeroot1'. ======== +Resolving with primary search path '/home/src/workspace/projects/project1/typeroot1'. +File '/home/src/workspace/projects/project1/typeroot1/sometype.d.ts' does not exist. +File '/home/src/workspace/projects/project1/typeroot1/sometype/package.json' does not exist. +File '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', result '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts'. +======== Type reference directive 'sometype' was successfully resolved to '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', primary: true. ======== +======== Resolving module '@typescript/lib-dom' from '/home/src/workspace/projects/project1/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +File '/home/src/workspace/projects/project1/package.json' does not exist. +File '/home/src/workspace/projects/package.json' does not exist. +File '/home/src/workspace/package.json' does not exist. +File '/home/src/package.json' does not exist. +File '/home/package.json' does not exist. +File '/package.json' does not exist. +Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/home/src/workspace/projects/project1/node_modules' does not exist, skipping all lookups in it. +Directory '/home/src/workspace/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Scoped package detected, looking in 'typescript__lib-dom' +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/package.json' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom.d.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts', result '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts'. +======== Module name '@typescript/lib-dom' was successfully resolved to '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts'. ======== +======== Resolving module '@typescript/lib-es5' from '/home/src/workspace/projects/project1/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +File '/home/src/workspace/projects/project1/package.json' does not exist. +File '/home/src/workspace/projects/package.json' does not exist. +File '/home/src/workspace/package.json' does not exist. +File '/home/src/package.json' does not exist. +File '/home/package.json' does not exist. +File '/package.json' does not exist. +Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/home/src/workspace/projects/project1/node_modules' does not exist, skipping all lookups in it. +Directory '/home/src/workspace/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Scoped package detected, looking in 'typescript__lib-es5' +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5/package.json' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5.d.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts', result '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts'. +======== Module name '@typescript/lib-es5' was successfully resolved to '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts'. ======== +======== Resolving module '@typescript/lib-scripthost' from '/home/src/workspace/projects/project1/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +File '/home/src/workspace/projects/project1/package.json' does not exist. +File '/home/src/workspace/projects/package.json' does not exist. +File '/home/src/workspace/package.json' does not exist. +File '/home/src/package.json' does not exist. +File '/home/package.json' does not exist. +File '/package.json' does not exist. +Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/home/src/workspace/projects/project1/node_modules' does not exist, skipping all lookups in it. +Directory '/home/src/workspace/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Scoped package detected, looking in 'typescript__lib-scripthost' +File '/home/src/workspace/projects/node_modules/@typescript/lib-scripthost/package.json' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-scripthost.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-scripthost.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-scripthost.d.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-scripthost/index.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-scripthost/index.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-scripthost/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/home/src/workspace/projects/node_modules/@typescript/lib-scripthost/index.d.ts', result '/home/src/workspace/projects/node_modules/@typescript/lib-scripthost/index.d.ts'. +======== Module name '@typescript/lib-scripthost' was successfully resolved to '/home/src/workspace/projects/node_modules/@typescript/lib-scripthost/index.d.ts'. ======== +======== Resolving module '@typescript/lib-webworker' from '/home/src/workspace/projects/project1/__lib_node_modules_lookup_lib.webworker.d.ts__.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +File '/home/src/workspace/projects/project1/package.json' does not exist. +File '/home/src/workspace/projects/package.json' does not exist. +File '/home/src/workspace/package.json' does not exist. +File '/home/src/package.json' does not exist. +File '/home/package.json' does not exist. +File '/package.json' does not exist. +Loading module '@typescript/lib-webworker' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/home/src/workspace/projects/project1/node_modules' does not exist, skipping all lookups in it. +Directory '/home/src/workspace/projects/project1/node_modules/@types' does not exist, skipping all lookups in it. +Scoped package detected, looking in 'typescript__lib-webworker' +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/package.json' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker.d.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts', result '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts'. +======== Module name '@typescript/lib-webworker' was successfully resolved to '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts'. ======== +node_modules/@typescript/lib-webworker/index.d.ts + Library referenced via 'webworker' from file 'project1/file2.ts' +node_modules/@typescript/lib-scripthost/index.d.ts + Library referenced via 'scripthost' from file 'project1/file2.ts' +node_modules/@typescript/lib-es5/index.d.ts + Library referenced via 'es5' from file 'project1/file2.ts' + Library 'lib.es5.d.ts' specified in compilerOptions +node_modules/@typescript/lib-dom/index.d.ts + Library 'lib.dom.d.ts' specified in compilerOptions +project1/core.d.ts + Matched by default include pattern '**/*' +project1/file.ts + Matched by default include pattern '**/*' +project1/file2.ts + Matched by default include pattern '**/*' +project1/index.ts + Matched by default include pattern '**/*' +project1/utils.d.ts + Matched by default include pattern '**/*' +project1/typeroot1/sometype/index.d.ts + Matched by default include pattern '**/*' + Entry point for implicit type library 'sometype' +[HH:MM:SS AM] Project 'project2/tsconfig.json' is out of date because output file 'project2/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project2/tsconfig.json'... + +======== Resolving module '@typescript/lib-dom' from '/home/src/workspace/projects/project2/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +File '/home/src/workspace/projects/project2/package.json' does not exist. +File '/home/src/workspace/projects/package.json' does not exist. +File '/home/src/workspace/package.json' does not exist. +File '/home/src/package.json' does not exist. +File '/home/package.json' does not exist. +File '/package.json' does not exist. +Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/home/src/workspace/projects/project2/node_modules' does not exist, skipping all lookups in it. +Directory '/home/src/workspace/projects/project2/node_modules/@types' does not exist, skipping all lookups in it. +Scoped package detected, looking in 'typescript__lib-dom' +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/package.json' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom.d.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts', result '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts'. +======== Module name '@typescript/lib-dom' was successfully resolved to '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts'. ======== +======== Resolving module '@typescript/lib-es5' from '/home/src/workspace/projects/project2/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +File '/home/src/workspace/projects/project2/package.json' does not exist. +File '/home/src/workspace/projects/package.json' does not exist. +File '/home/src/workspace/package.json' does not exist. +File '/home/src/package.json' does not exist. +File '/home/package.json' does not exist. +File '/package.json' does not exist. +Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/home/src/workspace/projects/project2/node_modules' does not exist, skipping all lookups in it. +Directory '/home/src/workspace/projects/project2/node_modules/@types' does not exist, skipping all lookups in it. +Scoped package detected, looking in 'typescript__lib-es5' +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5/package.json' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5.d.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts', result '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts'. +======== Module name '@typescript/lib-es5' was successfully resolved to '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts'. ======== +node_modules/@typescript/lib-es5/index.d.ts + Library 'lib.es5.d.ts' specified in compilerOptions +node_modules/@typescript/lib-dom/index.d.ts + Library 'lib.dom.d.ts' specified in compilerOptions +project2/index.ts + Matched by default include pattern '**/*' +project2/utils.d.ts + Matched by default include pattern '**/*' +[HH:MM:SS AM] Project 'project3/tsconfig.json' is out of date because output file 'project3/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project3/tsconfig.json'... + +======== Resolving module '@typescript/lib-dom' from '/home/src/workspace/projects/project3/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +File '/home/src/workspace/projects/project3/package.json' does not exist. +File '/home/src/workspace/projects/package.json' does not exist. +File '/home/src/workspace/package.json' does not exist. +File '/home/src/package.json' does not exist. +File '/home/package.json' does not exist. +File '/package.json' does not exist. +Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/home/src/workspace/projects/project3/node_modules' does not exist, skipping all lookups in it. +Directory '/home/src/workspace/projects/project3/node_modules/@types' does not exist, skipping all lookups in it. +Scoped package detected, looking in 'typescript__lib-dom' +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/package.json' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom.d.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts', result '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts'. +======== Module name '@typescript/lib-dom' was successfully resolved to '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts'. ======== +======== Resolving module '@typescript/lib-es5' from '/home/src/workspace/projects/project3/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +File '/home/src/workspace/projects/project3/package.json' does not exist. +File '/home/src/workspace/projects/package.json' does not exist. +File '/home/src/workspace/package.json' does not exist. +File '/home/src/package.json' does not exist. +File '/home/package.json' does not exist. +File '/package.json' does not exist. +Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/home/src/workspace/projects/project3/node_modules' does not exist, skipping all lookups in it. +Directory '/home/src/workspace/projects/project3/node_modules/@types' does not exist, skipping all lookups in it. +Scoped package detected, looking in 'typescript__lib-es5' +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5/package.json' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5.d.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts', result '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts'. +======== Module name '@typescript/lib-es5' was successfully resolved to '/home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts'. ======== +node_modules/@typescript/lib-es5/index.d.ts + Library 'lib.es5.d.ts' specified in compilerOptions +node_modules/@typescript/lib-dom/index.d.ts + Library 'lib.dom.d.ts' specified in compilerOptions +project3/index.ts + Matched by default include pattern '**/*' +project3/utils.d.ts + Matched by default include pattern '**/*' +[HH:MM:SS AM] Project 'project4/tsconfig.json' is out of date because output file 'project4/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project4/tsconfig.json'... + +======== Resolving module '@typescript/lib-dom' from '/home/src/workspace/projects/project4/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +File '/home/src/workspace/projects/project4/package.json' does not exist. +File '/home/src/workspace/projects/package.json' does not exist. +File '/home/src/workspace/package.json' does not exist. +File '/home/src/package.json' does not exist. +File '/home/package.json' does not exist. +File '/package.json' does not exist. +Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/home/src/workspace/projects/project4/node_modules' does not exist, skipping all lookups in it. +Directory '/home/src/workspace/projects/project4/node_modules/@types' does not exist, skipping all lookups in it. +Scoped package detected, looking in 'typescript__lib-dom' +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/package.json' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom.d.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts', result '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts'. +======== Module name '@typescript/lib-dom' was successfully resolved to '/home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts'. ======== +======== Resolving module '@typescript/lib-esnext' from '/home/src/workspace/projects/project4/__lib_node_modules_lookup_lib.esnext.d.ts__.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +File '/home/src/workspace/projects/project4/package.json' does not exist. +File '/home/src/workspace/projects/package.json' does not exist. +File '/home/src/workspace/package.json' does not exist. +File '/home/src/package.json' does not exist. +File '/home/package.json' does not exist. +File '/package.json' does not exist. +Loading module '@typescript/lib-esnext' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/home/src/workspace/projects/project4/node_modules' does not exist, skipping all lookups in it. +Directory '/home/src/workspace/projects/project4/node_modules/@types' does not exist, skipping all lookups in it. +Scoped package detected, looking in 'typescript__lib-esnext' +File '/home/src/workspace/projects/node_modules/@typescript/lib-esnext/package.json' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-esnext.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-esnext.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-esnext.d.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-esnext/index.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-esnext/index.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-esnext/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/home/src/workspace/projects/node_modules/@typescript/lib-esnext/index.d.ts', result '/home/src/workspace/projects/node_modules/@typescript/lib-esnext/index.d.ts'. +======== Module name '@typescript/lib-esnext' was successfully resolved to '/home/src/workspace/projects/node_modules/@typescript/lib-esnext/index.d.ts'. ======== +======== Resolving module '@typescript/lib-webworker' from '/home/src/workspace/projects/project4/__lib_node_modules_lookup_lib.webworker.d.ts__.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +File '/home/src/workspace/projects/project4/package.json' does not exist. +File '/home/src/workspace/projects/package.json' does not exist. +File '/home/src/workspace/package.json' does not exist. +File '/home/src/package.json' does not exist. +File '/home/package.json' does not exist. +File '/package.json' does not exist. +Loading module '@typescript/lib-webworker' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/home/src/workspace/projects/project4/node_modules' does not exist, skipping all lookups in it. +Directory '/home/src/workspace/projects/project4/node_modules/@types' does not exist, skipping all lookups in it. +Scoped package detected, looking in 'typescript__lib-webworker' +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/package.json' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker.d.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.ts' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.tsx' does not exist. +File '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts', result '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts'. +======== Module name '@typescript/lib-webworker' was successfully resolved to '/home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts'. ======== +node_modules/@typescript/lib-esnext/index.d.ts + Library 'lib.esnext.d.ts' specified in compilerOptions +node_modules/@typescript/lib-dom/index.d.ts + Library 'lib.dom.d.ts' specified in compilerOptions +node_modules/@typescript/lib-webworker/index.d.ts + Library 'lib.webworker.d.ts' specified in compilerOptions +project4/index.ts + Matched by default include pattern '**/*' +project4/utils.d.ts + Matched by default include pattern '**/*' +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/workspace/projects/project1/file.d.ts] *new* +export declare const file = 10; + +//// [/home/src/workspace/projects/project1/file.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.file = void 0; +exports.file = 10; + +//// [/home/src/workspace/projects/project1/file2.d.ts] *new* + +//// [/home/src/workspace/projects/project1/file2.js] *new* +/// +/// +/// + +//// [/home/src/workspace/projects/project1/index.d.ts] *new* +export declare const x = "type1"; + +//// [/home/src/workspace/projects/project1/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = "type1"; + +//// [/home/src/workspace/projects/project1/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[5,10]],"fileNames":["../node_modules/@typescript/lib-webworker/index.d.ts","../node_modules/@typescript/lib-scripthost/index.d.ts","../node_modules/@typescript/lib-es5/index.d.ts","../node_modules/@typescript/lib-dom/index.d.ts","./core.d.ts","./file.ts","./file2.ts","./index.ts","./utils.d.ts","./typeroot1/sometype/index.d.ts"],"fileInfos":[{"version":"95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2fa71959819338965a3c6b2122d95c96-interface ScriptHostInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},"a1f9b824326bab2c3c8f13eccf69f182-export const core = 10;",{"version":"69c4ea0c9ff13ab7fc078607d9363624-export const file = 10;","signature":"a224c1b0cbd2f5fe611e588db48243cb-export declare const file = 10;\n","impliedNodeFormat":1},{"version":"76f8c505d1aaf1122ce1da0807c21477-/// \n/// \n/// ","signature":"99aa06d3014798d86001c324468d497f-","impliedNodeFormat":1},{"version":"aeb695aed936d7539a32fc3cd25af558-export const x = \"type1\";","signature":"e2f8d12de2edba256e37cf4a656ac52d-export declare const x = \"type1\";\n","impliedNodeFormat":1},"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;","6bf5e0a71dae6fccf68b93fbbb73f178-export type TheNum = \"type1\";"],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspace/projects/project1/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./core.d.ts", + "./file.ts", + "./file2.ts", + "./index.ts", + "./utils.d.ts", + "./typeroot1/sometype/index.d.ts" + ], + "original": [ + 5, + 10 + ] + } + ], + "fileNames": [ + "../node_modules/@typescript/lib-webworker/index.d.ts", + "../node_modules/@typescript/lib-scripthost/index.d.ts", + "../node_modules/@typescript/lib-es5/index.d.ts", + "../node_modules/@typescript/lib-dom/index.d.ts", + "./core.d.ts", + "./file.ts", + "./file2.ts", + "./index.ts", + "./utils.d.ts", + "./typeroot1/sometype/index.d.ts" + ], + "fileInfos": [ + { + "fileName": "../node_modules/@typescript/lib-webworker/index.d.ts", + "version": "95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }", + "signature": "95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../node_modules/@typescript/lib-scripthost/index.d.ts", + "version": "2fa71959819338965a3c6b2122d95c96-interface ScriptHostInterface { }", + "signature": "2fa71959819338965a3c6b2122d95c96-interface ScriptHostInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2fa71959819338965a3c6b2122d95c96-interface ScriptHostInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../node_modules/@typescript/lib-es5/index.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../node_modules/@typescript/lib-dom/index.d.ts", + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "signature": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./core.d.ts", + "version": "a1f9b824326bab2c3c8f13eccf69f182-export const core = 10;", + "signature": "a1f9b824326bab2c3c8f13eccf69f182-export const core = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./file.ts", + "version": "69c4ea0c9ff13ab7fc078607d9363624-export const file = 10;", + "signature": "a224c1b0cbd2f5fe611e588db48243cb-export declare const file = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "69c4ea0c9ff13ab7fc078607d9363624-export const file = 10;", + "signature": "a224c1b0cbd2f5fe611e588db48243cb-export declare const file = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./file2.ts", + "version": "76f8c505d1aaf1122ce1da0807c21477-/// \n/// \n/// ", + "signature": "99aa06d3014798d86001c324468d497f-", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "76f8c505d1aaf1122ce1da0807c21477-/// \n/// \n/// ", + "signature": "99aa06d3014798d86001c324468d497f-", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "aeb695aed936d7539a32fc3cd25af558-export const x = \"type1\";", + "signature": "e2f8d12de2edba256e37cf4a656ac52d-export declare const x = \"type1\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "aeb695aed936d7539a32fc3cd25af558-export const x = \"type1\";", + "signature": "e2f8d12de2edba256e37cf4a656ac52d-export declare const x = \"type1\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./utils.d.ts", + "version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "signature": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./typeroot1/sometype/index.d.ts", + "version": "6bf5e0a71dae6fccf68b93fbbb73f178-export type TheNum = \"type1\";", + "signature": "6bf5e0a71dae6fccf68b93fbbb73f178-export type TheNum = \"type1\";", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2354 +} +//// [/home/src/workspace/projects/project2/index.d.ts] *new* +export declare const y = 10; + +//// [/home/src/workspace/projects/project2/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.y = void 0; +exports.y = 10; + +//// [/home/src/workspace/projects/project2/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[3,4]],"fileNames":["../node_modules/@typescript/lib-es5/index.d.ts","../node_modules/@typescript/lib-dom/index.d.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"95e641b4f34db55d73f0f5008cdd30f0-export const y = 10","signature":"7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n","impliedNodeFormat":1},"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;"],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspace/projects/project2/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts", + "./utils.d.ts" + ], + "original": [ + 3, + 4 + ] + } + ], + "fileNames": [ + "../node_modules/@typescript/lib-es5/index.d.ts", + "../node_modules/@typescript/lib-dom/index.d.ts", + "./index.ts", + "./utils.d.ts" + ], + "fileInfos": [ + { + "fileName": "../node_modules/@typescript/lib-es5/index.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../node_modules/@typescript/lib-dom/index.d.ts", + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "signature": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "95e641b4f34db55d73f0f5008cdd30f0-export const y = 10", + "signature": "7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "95e641b4f34db55d73f0f5008cdd30f0-export const y = 10", + "signature": "7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./utils.d.ts", + "version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "signature": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1378 +} +//// [/home/src/workspace/projects/project3/index.d.ts] *new* +export declare const z = 10; + +//// [/home/src/workspace/projects/project3/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.z = void 0; +exports.z = 10; + +//// [/home/src/workspace/projects/project3/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[3,4]],"fileNames":["../node_modules/@typescript/lib-es5/index.d.ts","../node_modules/@typescript/lib-dom/index.d.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6f4aaa0b206d74bd2835c8fd3a4020fe-export const z = 10","signature":"f4ea7cd61571728ffc44aefcffc4eda1-export declare const z = 10;\n","impliedNodeFormat":1},"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;"],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspace/projects/project3/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts", + "./utils.d.ts" + ], + "original": [ + 3, + 4 + ] + } + ], + "fileNames": [ + "../node_modules/@typescript/lib-es5/index.d.ts", + "../node_modules/@typescript/lib-dom/index.d.ts", + "./index.ts", + "./utils.d.ts" + ], + "fileInfos": [ + { + "fileName": "../node_modules/@typescript/lib-es5/index.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../node_modules/@typescript/lib-dom/index.d.ts", + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "signature": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "6f4aaa0b206d74bd2835c8fd3a4020fe-export const z = 10", + "signature": "f4ea7cd61571728ffc44aefcffc4eda1-export declare const z = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f4aaa0b206d74bd2835c8fd3a4020fe-export const z = 10", + "signature": "f4ea7cd61571728ffc44aefcffc4eda1-export declare const z = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./utils.d.ts", + "version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "signature": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1378 +} +//// [/home/src/workspace/projects/project4/index.d.ts] *new* +export declare const z = 10; + +//// [/home/src/workspace/projects/project4/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.z = void 0; +exports.z = 10; + +//// [/home/src/workspace/projects/project4/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[4,5]],"fileNames":["../node_modules/@typescript/lib-esnext/index.d.ts","../node_modules/@typescript/lib-dom/index.d.ts","../node_modules/@typescript/lib-webworker/index.d.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6f4aaa0b206d74bd2835c8fd3a4020fe-export const z = 10","signature":"f4ea7cd61571728ffc44aefcffc4eda1-export declare const z = 10;\n","impliedNodeFormat":1},"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;"],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspace/projects/project4/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts", + "./utils.d.ts" + ], + "original": [ + 4, + 5 + ] + } + ], + "fileNames": [ + "../node_modules/@typescript/lib-esnext/index.d.ts", + "../node_modules/@typescript/lib-dom/index.d.ts", + "../node_modules/@typescript/lib-webworker/index.d.ts", + "./index.ts", + "./utils.d.ts" + ], + "fileInfos": [ + { + "fileName": "../node_modules/@typescript/lib-esnext/index.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../node_modules/@typescript/lib-dom/index.d.ts", + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "signature": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../node_modules/@typescript/lib-webworker/index.d.ts", + "version": "95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }", + "signature": "95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "6f4aaa0b206d74bd2835c8fd3a4020fe-export const z = 10", + "signature": "f4ea7cd61571728ffc44aefcffc4eda1-export declare const z = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f4aaa0b206d74bd2835c8fd3a4020fe-export const z = 10", + "signature": "f4ea7cd61571728ffc44aefcffc4eda1-export declare const z = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./utils.d.ts", + "version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "signature": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1564 +} + +project1/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts +*refresh* /home/src/workspace/projects/node_modules/@typescript/lib-scripthost/index.d.ts +*refresh* /home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts +*refresh* /home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts +*refresh* /home/src/workspace/projects/project1/core.d.ts +*refresh* /home/src/workspace/projects/project1/file.ts +*refresh* /home/src/workspace/projects/project1/file2.ts +*refresh* /home/src/workspace/projects/project1/index.ts +*refresh* /home/src/workspace/projects/project1/utils.d.ts +*refresh* /home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts +Signatures:: +(stored at emit) /home/src/workspace/projects/project1/file.ts +(stored at emit) /home/src/workspace/projects/project1/file2.ts +(stored at emit) /home/src/workspace/projects/project1/index.ts + +project2/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts +*refresh* /home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts +*refresh* /home/src/workspace/projects/project2/index.ts +*refresh* /home/src/workspace/projects/project2/utils.d.ts +Signatures:: +(stored at emit) /home/src/workspace/projects/project2/index.ts + +project3/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspace/projects/node_modules/@typescript/lib-es5/index.d.ts +*refresh* /home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts +*refresh* /home/src/workspace/projects/project3/index.ts +*refresh* /home/src/workspace/projects/project3/utils.d.ts +Signatures:: +(stored at emit) /home/src/workspace/projects/project3/index.ts + +project4/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspace/projects/node_modules/@typescript/lib-esnext/index.d.ts +*refresh* /home/src/workspace/projects/node_modules/@typescript/lib-dom/index.d.ts +*refresh* /home/src/workspace/projects/node_modules/@typescript/lib-webworker/index.d.ts +*refresh* /home/src/workspace/projects/project4/index.ts +*refresh* /home/src/workspace/projects/project4/utils.d.ts +Signatures:: +(stored at emit) /home/src/workspace/projects/project4/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config.js b/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config.js new file mode 100644 index 0000000000..a3fec6415c --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config.js @@ -0,0 +1,671 @@ +currentDirectory::/home/src/workspace/projects +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/tslibs/TS/Lib/lib.dom.d.ts] *new* +interface DOMInterface { } +//// [/home/src/tslibs/TS/Lib/lib.scripthost.d.ts] *new* +interface ScriptHostInterface { } +//// [/home/src/tslibs/TS/Lib/lib.webworker.d.ts] *new* +interface WebWorkerInterface { } +//// [/home/src/workspace/projects/node_modules/@typescript/unlreated/index.d.ts] *new* +export const unrelated = 10; +//// [/home/src/workspace/projects/project1/core.d.ts] *new* +export const core = 10; +//// [/home/src/workspace/projects/project1/file.ts] *new* +export const file = 10; +//// [/home/src/workspace/projects/project1/file2.ts] *new* +/// +/// +/// +//// [/home/src/workspace/projects/project1/index.ts] *new* +export const x = "type1"; +//// [/home/src/workspace/projects/project1/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "typeRoots": ["./typeroot1"], + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": false + } +} +//// [/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts] *new* +export type TheNum = "type1"; +//// [/home/src/workspace/projects/project1/utils.d.ts] *new* +export const y = 10; +//// [/home/src/workspace/projects/project2/index.ts] *new* +export const y = 10 +//// [/home/src/workspace/projects/project2/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": false + } +} +//// [/home/src/workspace/projects/project2/utils.d.ts] *new* +export const y = 10; +//// [/home/src/workspace/projects/project3/index.ts] *new* +export const z = 10 +//// [/home/src/workspace/projects/project3/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "lib": ["es5", "dom"], + "traceResolution": true, + "libReplacement": false + } +} +//// [/home/src/workspace/projects/project3/utils.d.ts] *new* +export const y = 10; +//// [/home/src/workspace/projects/project4/index.ts] *new* +export const z = 10 +//// [/home/src/workspace/projects/project4/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "lib": ["esnext", "dom", "webworker"], + "traceResolution": true, + "libReplacement": false + } +} +//// [/home/src/workspace/projects/project4/utils.d.ts] *new* +export const y = 10; + +tsgo -b -w project1 project2 project3 project4 --verbose --explainFiles +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * project1/tsconfig.json + * project2/tsconfig.json + * project3/tsconfig.json + * project4/tsconfig.json + +[HH:MM:SS AM] Project 'project1/tsconfig.json' is out of date because output file 'project1/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project1/tsconfig.json'... + +======== Resolving type reference directive 'sometype', containing file '/home/src/workspace/projects/project1/__inferred type names__.ts', root directory '/home/src/workspace/projects/project1/typeroot1'. ======== +Resolving with primary search path '/home/src/workspace/projects/project1/typeroot1'. +File '/home/src/workspace/projects/project1/typeroot1/sometype.d.ts' does not exist. +File '/home/src/workspace/projects/project1/typeroot1/sometype/package.json' does not exist. +File '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', result '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts'. +======== Type reference directive 'sometype' was successfully resolved to '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', primary: true. ======== +../../tslibs/TS/Lib/lib.es5.d.ts + Library referenced via 'es5' from file 'project1/file2.ts' + Library 'lib.es5.d.ts' specified in compilerOptions +../../tslibs/TS/Lib/lib.dom.d.ts + Library 'lib.dom.d.ts' specified in compilerOptions +../../tslibs/TS/Lib/lib.webworker.d.ts + Library referenced via 'webworker' from file 'project1/file2.ts' +../../tslibs/TS/Lib/lib.scripthost.d.ts + Library referenced via 'scripthost' from file 'project1/file2.ts' +project1/core.d.ts + Matched by default include pattern '**/*' +project1/file.ts + Matched by default include pattern '**/*' +project1/file2.ts + Matched by default include pattern '**/*' +project1/index.ts + Matched by default include pattern '**/*' +project1/utils.d.ts + Matched by default include pattern '**/*' +project1/typeroot1/sometype/index.d.ts + Matched by default include pattern '**/*' + Entry point for implicit type library 'sometype' +[HH:MM:SS AM] Project 'project2/tsconfig.json' is out of date because output file 'project2/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project2/tsconfig.json'... + +../../tslibs/TS/Lib/lib.es5.d.ts + Library 'lib.es5.d.ts' specified in compilerOptions +../../tslibs/TS/Lib/lib.dom.d.ts + Library 'lib.dom.d.ts' specified in compilerOptions +project2/index.ts + Matched by default include pattern '**/*' +project2/utils.d.ts + Matched by default include pattern '**/*' +[HH:MM:SS AM] Project 'project3/tsconfig.json' is out of date because output file 'project3/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project3/tsconfig.json'... + +../../tslibs/TS/Lib/lib.es5.d.ts + Library 'lib.es5.d.ts' specified in compilerOptions +../../tslibs/TS/Lib/lib.dom.d.ts + Library 'lib.dom.d.ts' specified in compilerOptions +project3/index.ts + Matched by default include pattern '**/*' +project3/utils.d.ts + Matched by default include pattern '**/*' +[HH:MM:SS AM] Project 'project4/tsconfig.json' is out of date because output file 'project4/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project4/tsconfig.json'... + +../../tslibs/TS/Lib/lib.esnext.d.ts + Library 'lib.esnext.d.ts' specified in compilerOptions +../../tslibs/TS/Lib/lib.dom.d.ts + Library 'lib.dom.d.ts' specified in compilerOptions +../../tslibs/TS/Lib/lib.webworker.d.ts + Library 'lib.webworker.d.ts' specified in compilerOptions +project4/index.ts + Matched by default include pattern '**/*' +project4/utils.d.ts + Matched by default include pattern '**/*' +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.es5.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/home/src/tslibs/TS/Lib/lib.esnext.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/home/src/workspace/projects/project1/file.d.ts] *new* +export declare const file = 10; + +//// [/home/src/workspace/projects/project1/file.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.file = void 0; +exports.file = 10; + +//// [/home/src/workspace/projects/project1/file2.d.ts] *new* + +//// [/home/src/workspace/projects/project1/file2.js] *new* +/// +/// +/// + +//// [/home/src/workspace/projects/project1/index.d.ts] *new* +export declare const x = "type1"; + +//// [/home/src/workspace/projects/project1/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = "type1"; + +//// [/home/src/workspace/projects/project1/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[5,10]],"fileNames":["lib.es5.d.ts","lib.dom.d.ts","lib.webworker.d.ts","lib.scripthost.d.ts","./core.d.ts","./file.ts","./file2.ts","./index.ts","./utils.d.ts","./typeroot1/sometype/index.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2fa71959819338965a3c6b2122d95c96-interface ScriptHostInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},"a1f9b824326bab2c3c8f13eccf69f182-export const core = 10;",{"version":"69c4ea0c9ff13ab7fc078607d9363624-export const file = 10;","signature":"a224c1b0cbd2f5fe611e588db48243cb-export declare const file = 10;\n","impliedNodeFormat":1},{"version":"76f8c505d1aaf1122ce1da0807c21477-/// \n/// \n/// ","signature":"99aa06d3014798d86001c324468d497f-","impliedNodeFormat":1},{"version":"aeb695aed936d7539a32fc3cd25af558-export const x = \"type1\";","signature":"e2f8d12de2edba256e37cf4a656ac52d-export declare const x = \"type1\";\n","impliedNodeFormat":1},"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;","6bf5e0a71dae6fccf68b93fbbb73f178-export type TheNum = \"type1\";"],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspace/projects/project1/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./core.d.ts", + "./file.ts", + "./file2.ts", + "./index.ts", + "./utils.d.ts", + "./typeroot1/sometype/index.d.ts" + ], + "original": [ + 5, + 10 + ] + } + ], + "fileNames": [ + "lib.es5.d.ts", + "lib.dom.d.ts", + "lib.webworker.d.ts", + "lib.scripthost.d.ts", + "./core.d.ts", + "./file.ts", + "./file2.ts", + "./index.ts", + "./utils.d.ts", + "./typeroot1/sometype/index.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.es5.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "lib.dom.d.ts", + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "signature": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "lib.webworker.d.ts", + "version": "95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }", + "signature": "95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "lib.scripthost.d.ts", + "version": "2fa71959819338965a3c6b2122d95c96-interface ScriptHostInterface { }", + "signature": "2fa71959819338965a3c6b2122d95c96-interface ScriptHostInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2fa71959819338965a3c6b2122d95c96-interface ScriptHostInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./core.d.ts", + "version": "a1f9b824326bab2c3c8f13eccf69f182-export const core = 10;", + "signature": "a1f9b824326bab2c3c8f13eccf69f182-export const core = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./file.ts", + "version": "69c4ea0c9ff13ab7fc078607d9363624-export const file = 10;", + "signature": "a224c1b0cbd2f5fe611e588db48243cb-export declare const file = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "69c4ea0c9ff13ab7fc078607d9363624-export const file = 10;", + "signature": "a224c1b0cbd2f5fe611e588db48243cb-export declare const file = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./file2.ts", + "version": "76f8c505d1aaf1122ce1da0807c21477-/// \n/// \n/// ", + "signature": "99aa06d3014798d86001c324468d497f-", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "76f8c505d1aaf1122ce1da0807c21477-/// \n/// \n/// ", + "signature": "99aa06d3014798d86001c324468d497f-", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "aeb695aed936d7539a32fc3cd25af558-export const x = \"type1\";", + "signature": "e2f8d12de2edba256e37cf4a656ac52d-export declare const x = \"type1\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "aeb695aed936d7539a32fc3cd25af558-export const x = \"type1\";", + "signature": "e2f8d12de2edba256e37cf4a656ac52d-export declare const x = \"type1\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./utils.d.ts", + "version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "signature": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./typeroot1/sometype/index.d.ts", + "version": "6bf5e0a71dae6fccf68b93fbbb73f178-export type TheNum = \"type1\";", + "signature": "6bf5e0a71dae6fccf68b93fbbb73f178-export type TheNum = \"type1\";", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2218 +} +//// [/home/src/workspace/projects/project2/index.d.ts] *new* +export declare const y = 10; + +//// [/home/src/workspace/projects/project2/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.y = void 0; +exports.y = 10; + +//// [/home/src/workspace/projects/project2/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[3,4]],"fileNames":["lib.es5.d.ts","lib.dom.d.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"95e641b4f34db55d73f0f5008cdd30f0-export const y = 10","signature":"7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n","impliedNodeFormat":1},"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;"],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspace/projects/project2/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts", + "./utils.d.ts" + ], + "original": [ + 3, + 4 + ] + } + ], + "fileNames": [ + "lib.es5.d.ts", + "lib.dom.d.ts", + "./index.ts", + "./utils.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.es5.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "lib.dom.d.ts", + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "signature": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "95e641b4f34db55d73f0f5008cdd30f0-export const y = 10", + "signature": "7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "95e641b4f34db55d73f0f5008cdd30f0-export const y = 10", + "signature": "7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./utils.d.ts", + "version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "signature": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1310 +} +//// [/home/src/workspace/projects/project3/index.d.ts] *new* +export declare const z = 10; + +//// [/home/src/workspace/projects/project3/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.z = void 0; +exports.z = 10; + +//// [/home/src/workspace/projects/project3/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[3,4]],"fileNames":["lib.es5.d.ts","lib.dom.d.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6f4aaa0b206d74bd2835c8fd3a4020fe-export const z = 10","signature":"f4ea7cd61571728ffc44aefcffc4eda1-export declare const z = 10;\n","impliedNodeFormat":1},"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;"],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspace/projects/project3/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts", + "./utils.d.ts" + ], + "original": [ + 3, + 4 + ] + } + ], + "fileNames": [ + "lib.es5.d.ts", + "lib.dom.d.ts", + "./index.ts", + "./utils.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.es5.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "lib.dom.d.ts", + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "signature": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "6f4aaa0b206d74bd2835c8fd3a4020fe-export const z = 10", + "signature": "f4ea7cd61571728ffc44aefcffc4eda1-export declare const z = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f4aaa0b206d74bd2835c8fd3a4020fe-export const z = 10", + "signature": "f4ea7cd61571728ffc44aefcffc4eda1-export declare const z = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./utils.d.ts", + "version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "signature": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1310 +} +//// [/home/src/workspace/projects/project4/index.d.ts] *new* +export declare const z = 10; + +//// [/home/src/workspace/projects/project4/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.z = void 0; +exports.z = 10; + +//// [/home/src/workspace/projects/project4/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[4,5]],"fileNames":["lib.esnext.d.ts","lib.dom.d.ts","lib.webworker.d.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6f4aaa0b206d74bd2835c8fd3a4020fe-export const z = 10","signature":"f4ea7cd61571728ffc44aefcffc4eda1-export declare const z = 10;\n","impliedNodeFormat":1},"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;"],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspace/projects/project4/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts", + "./utils.d.ts" + ], + "original": [ + 4, + 5 + ] + } + ], + "fileNames": [ + "lib.esnext.d.ts", + "lib.dom.d.ts", + "lib.webworker.d.ts", + "./index.ts", + "./utils.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.esnext.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "lib.dom.d.ts", + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "signature": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d9b7428535134fcb21dad91303dc6311-interface DOMInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "lib.webworker.d.ts", + "version": "95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }", + "signature": "95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "95c5e18b7871b756fb3bb843e03aa05d-interface WebWorkerInterface { }", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "6f4aaa0b206d74bd2835c8fd3a4020fe-export const z = 10", + "signature": "f4ea7cd61571728ffc44aefcffc4eda1-export declare const z = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f4aaa0b206d74bd2835c8fd3a4020fe-export const z = 10", + "signature": "f4ea7cd61571728ffc44aefcffc4eda1-export declare const z = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./utils.d.ts", + "version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "signature": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1462 +} + +project1/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.es5.d.ts +*refresh* /home/src/tslibs/TS/Lib/lib.dom.d.ts +*refresh* /home/src/tslibs/TS/Lib/lib.webworker.d.ts +*refresh* /home/src/tslibs/TS/Lib/lib.scripthost.d.ts +*refresh* /home/src/workspace/projects/project1/core.d.ts +*refresh* /home/src/workspace/projects/project1/file.ts +*refresh* /home/src/workspace/projects/project1/file2.ts +*refresh* /home/src/workspace/projects/project1/index.ts +*refresh* /home/src/workspace/projects/project1/utils.d.ts +*refresh* /home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts +Signatures:: +(stored at emit) /home/src/workspace/projects/project1/file.ts +(stored at emit) /home/src/workspace/projects/project1/file2.ts +(stored at emit) /home/src/workspace/projects/project1/index.ts + +project2/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.es5.d.ts +*refresh* /home/src/tslibs/TS/Lib/lib.dom.d.ts +*refresh* /home/src/workspace/projects/project2/index.ts +*refresh* /home/src/workspace/projects/project2/utils.d.ts +Signatures:: +(stored at emit) /home/src/workspace/projects/project2/index.ts + +project3/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.es5.d.ts +*refresh* /home/src/tslibs/TS/Lib/lib.dom.d.ts +*refresh* /home/src/workspace/projects/project3/index.ts +*refresh* /home/src/workspace/projects/project3/utils.d.ts +Signatures:: +(stored at emit) /home/src/workspace/projects/project3/index.ts + +project4/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.esnext.d.ts +*refresh* /home/src/tslibs/TS/Lib/lib.dom.d.ts +*refresh* /home/src/tslibs/TS/Lib/lib.webworker.d.ts +*refresh* /home/src/workspace/projects/project4/index.ts +*refresh* /home/src/workspace/projects/project4/utils.d.ts +Signatures:: +(stored at emit) /home/src/workspace/projects/project4/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js b/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js new file mode 100644 index 0000000000..e9cdbb7c50 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js @@ -0,0 +1,307 @@ +currentDirectory::/user/username/projects/myproject +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/myproject/node_modules/pkg2] -> /user/username/projects/myproject/packages/pkg2 *new* +//// [/user/username/projects/myproject/packages/pkg1/index.ts] *new* +import type { TheNum } from 'pkg2' +export const theNum: TheNum = 42; +//// [/user/username/projects/myproject/packages/pkg1/package.json] *new* +{ + "name": "pkg1", + "version": "1.0.0", + "main": "build/index.js" +} +//// [/user/username/projects/myproject/packages/pkg1/tsconfig.json] *new* +{ + "compilerOptions": { + "outDir": "build", + }, + "references": [{ "path": "../pkg2" }], +} +//// [/user/username/projects/myproject/packages/pkg2/const.ts] *new* +export type TheNum = 42; +//// [/user/username/projects/myproject/packages/pkg2/index.ts] *new* +export type { TheNum } from './const.js'; +//// [/user/username/projects/myproject/packages/pkg2/other.ts] *new* +export type TheStr = string; +//// [/user/username/projects/myproject/packages/pkg2/package.json] *new* +{ + "name": "pkg2", + "version": "1.0.0", + "main": "build/index.js" +} +//// [/user/username/projects/myproject/packages/pkg2/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "outDir": "build", + }, +} + +tsgo -b packages/pkg1 --verbose -w --traceResolution +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * packages/pkg2/tsconfig.json + * packages/pkg1/tsconfig.json + +[HH:MM:SS AM] Project 'packages/pkg2/tsconfig.json' is out of date because output file 'packages/pkg2/build/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'packages/pkg2/tsconfig.json'... + +======== Resolving module './const.js' from '/user/username/projects/myproject/packages/pkg2/index.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +Loading module as file / folder, candidate module location '/user/username/projects/myproject/packages/pkg2/const.js', target file types: TypeScript, JavaScript, Declaration, JSON. +File name '/user/username/projects/myproject/packages/pkg2/const.js' has a '.js' extension - stripping it. +File '/user/username/projects/myproject/packages/pkg2/const.ts' exists - use it as a name resolution result. +======== Module name './const.js' was successfully resolved to '/user/username/projects/myproject/packages/pkg2/const.ts'. ======== +[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because output file 'packages/pkg1/build/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'packages/pkg1/tsconfig.json'... + +======== Resolving module 'pkg2' from '/user/username/projects/myproject/packages/pkg1/index.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +Found 'package.json' at '/user/username/projects/myproject/packages/pkg1/package.json'. +Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. +Directory '/user/username/projects/myproject/packages/pkg1/node_modules/@types' does not exist, skipping all lookups in it. +Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. +Directory '/user/username/projects/myproject/packages/node_modules/@types' does not exist, skipping all lookups in it. +Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. +File '/user/username/projects/myproject/node_modules/pkg2.ts' does not exist. +File '/user/username/projects/myproject/node_modules/pkg2.tsx' does not exist. +File '/user/username/projects/myproject/node_modules/pkg2.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. +'package.json' does not have a 'typings' field. +'package.json' does not have a 'types' field. +'package.json' has 'main' field 'build/index.js' that references '/user/username/projects/myproject/node_modules/pkg2/build/index.js'. +File name '/user/username/projects/myproject/node_modules/pkg2/build/index.js' has a '.js' extension - stripping it. +File '/user/username/projects/myproject/node_modules/pkg2/build/index.ts' does not exist. +File '/user/username/projects/myproject/node_modules/pkg2/build/index.tsx' does not exist. +File '/user/username/projects/myproject/node_modules/pkg2/build/index.d.ts' exists - use it as a name resolution result. +'package.json' does not have a 'peerDependencies' field. +Resolving real path for '/user/username/projects/myproject/node_modules/pkg2/build/index.d.ts', result '/user/username/projects/myproject/packages/pkg2/build/index.d.ts'. +======== Module name 'pkg2' was successfully resolved to '/user/username/projects/myproject/packages/pkg2/build/index.d.ts' with Package ID 'pkg2@1.0.0'. ======== +======== Resolving module './const.js' from '/user/username/projects/myproject/packages/pkg2/index.ts'. ======== +Using compiler options of project reference redirect '/user/username/projects/myproject/packages/pkg2/tsconfig.json'. +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +Loading module as file / folder, candidate module location '/user/username/projects/myproject/packages/pkg2/const.js', target file types: TypeScript, JavaScript, Declaration, JSON. +File name '/user/username/projects/myproject/packages/pkg2/const.js' has a '.js' extension - stripping it. +File '/user/username/projects/myproject/packages/pkg2/const.ts' exists - use it as a name resolution result. +======== Module name './const.js' was successfully resolved to '/user/username/projects/myproject/packages/pkg2/const.ts'. ======== +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/myproject/packages/pkg1/build/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.theNum = void 0; +exports.theNum = 42; + +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":["../index.ts"]} +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../index.ts" + ], + "original": "../index.ts" + } + ], + "size": 50 +} +//// [/user/username/projects/myproject/packages/pkg2/build/const.d.ts] *new* +export type TheNum = 42; + +//// [/user/username/projects/myproject/packages/pkg2/build/const.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/myproject/packages/pkg2/build/index.d.ts] *new* +export type { TheNum } from './const.js'; + +//// [/user/username/projects/myproject/packages/pkg2/build/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/myproject/packages/pkg2/build/other.d.ts] *new* +export type TheStr = string; + +//// [/user/username/projects/myproject/packages/pkg2/build/other.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../const.ts","../index.ts","../other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be0f939ab1143e4064a3742586332724-export type TheNum = 42;","signature":"56e2d69d2edd1f0edd1a64ecfdf6de0d-export type TheNum = 42;\n","impliedNodeFormat":1},{"version":"c95c354b23966e289caeaece40bb8d0a-export type { TheNum } from './const.js';","signature":"f257912cfebb94a04c6ba4e8f754166a-export type { TheNum } from './const.js';\n","impliedNodeFormat":1},{"version":"dfadcd1940a5dc36721d3311ebd8eb8b-export type TheStr = string;","signature":"9551f60bc06319547b96535db4cb8520-export type TheStr = string;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./other.d.ts"} +//// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../const.ts", + "../index.ts", + "../other.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../const.ts", + "../index.ts", + "../other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../const.ts", + "version": "be0f939ab1143e4064a3742586332724-export type TheNum = 42;", + "signature": "56e2d69d2edd1f0edd1a64ecfdf6de0d-export type TheNum = 42;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "be0f939ab1143e4064a3742586332724-export type TheNum = 42;", + "signature": "56e2d69d2edd1f0edd1a64ecfdf6de0d-export type TheNum = 42;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../index.ts", + "version": "c95c354b23966e289caeaece40bb8d0a-export type { TheNum } from './const.js';", + "signature": "f257912cfebb94a04c6ba4e8f754166a-export type { TheNum } from './const.js';\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c95c354b23966e289caeaece40bb8d0a-export type { TheNum } from './const.js';", + "signature": "f257912cfebb94a04c6ba4e8f754166a-export type { TheNum } from './const.js';\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../other.ts", + "version": "dfadcd1940a5dc36721d3311ebd8eb8b-export type TheStr = string;", + "signature": "9551f60bc06319547b96535db4cb8520-export type TheStr = string;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "dfadcd1940a5dc36721d3311ebd8eb8b-export type TheStr = string;", + "signature": "9551f60bc06319547b96535db4cb8520-export type TheStr = string;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../const.ts" + ] + ], + "options": { + "composite": true, + "outDir": "./" + }, + "referencedMap": { + "../index.ts": [ + "../const.ts" + ] + }, + "latestChangedDtsFile": "./other.d.ts", + "size": 1564 +} + +packages/pkg2/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/myproject/packages/pkg2/const.ts +*refresh* /user/username/projects/myproject/packages/pkg2/index.ts +*refresh* /user/username/projects/myproject/packages/pkg2/other.ts +Signatures:: +(stored at emit) /user/username/projects/myproject/packages/pkg2/const.ts +(stored at emit) /user/username/projects/myproject/packages/pkg2/index.ts +(stored at emit) /user/username/projects/myproject/packages/pkg2/other.ts + +packages/pkg1/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/myproject/packages/pkg2/build/const.d.ts +*refresh* /user/username/projects/myproject/packages/pkg2/build/index.d.ts +*refresh* /user/username/projects/myproject/packages/pkg1/index.ts +Signatures:: + + +Edit [0]:: reports import errors after change to package file +//// [/user/username/projects/myproject/packages/pkg2/package.json] *modified* +{ + "name": "pkg2", + "version": "1.0.0", + "main": "build/other.js" +} + + +Output:: + + + +Diff:: Package.json watch pending, so no change detected yet +--- nonIncremental.output.txt ++++ incremental.output.txt +@@ -1,5 +0,0 @@ +-packages/pkg1/index.ts:1:15 - error TS2305: Module '"pkg2"' has no exported member 'TheNum'. +- +-1 import type { TheNum } from 'pkg2' +-   ~~~~~~ +- + +Edit [1]:: removes those errors when a package file is changed back +//// [/user/username/projects/myproject/packages/pkg2/package.json] *modified* +{ + "name": "pkg2", + "version": "1.0.0", + "main": "build/index.js" +} + + +Output:: + diff --git a/testdata/baselines/reference/tsbuildWatch/moduleResolution/handles-the-cache-correctly-when-two-projects-use-different-module-resolution-settings.js b/testdata/baselines/reference/tsbuildWatch/moduleResolution/handles-the-cache-correctly-when-two-projects-use-different-module-resolution-settings.js new file mode 100644 index 0000000000..a5f58bb728 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/moduleResolution/handles-the-cache-correctly-when-two-projects-use-different-module-resolution-settings.js @@ -0,0 +1,404 @@ +currentDirectory::/user/username/projects/myproject +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/myproject/node_modules/@types/bar/index.d.ts] *new* +export const bar = 10; +//// [/user/username/projects/myproject/node_modules/@types/foo/index.d.ts] *new* +export const foo = 10; +//// [/user/username/projects/myproject/project1/index.ts] *new* +import { foo } from "file"; +//// [/user/username/projects/myproject/project1/node_modules/file/index.d.ts] *new* +export const foo = 10; +//// [/user/username/projects/myproject/project1/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "types": ["foo", "bar"] + }, + "files": ["index.ts"], +} +//// [/user/username/projects/myproject/project2/index.ts] *new* +import { foo } from "file"; +//// [/user/username/projects/myproject/project2/node_modules/file/index.d.ts] *new* +export const foo = 10; +//// [/user/username/projects/myproject/project2/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "types": ["foo"], + "module": "nodenext", + "moduleResolution": "nodenext" + }, + "files": ["index.ts"], +} +//// [/user/username/projects/myproject/tsconfig.json] *new* +{ + "files": [], + "references": [ + { "path": "./project1" }, + { "path": "./project2" }, + ], +} + +tsgo --b -w -v +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * project1/tsconfig.json + * project2/tsconfig.json + * tsconfig.json + +[HH:MM:SS AM] Project 'project1/tsconfig.json' is out of date because output file 'project1/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project1/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/tsconfig.json' is out of date because output file 'project2/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project2/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/myproject/project1/index.d.ts] *new* +export {}; + +//// [/user/username/projects/myproject/project1/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/myproject/project1/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[3],"fileNames":["lib.d.ts","./node_modules/file/index.d.ts","./index.ts","../node_modules/@types/foo/index.d.ts","../node_modules/@types/bar/index.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"bf6a9897955595825a99e7ef50878c55-export const foo = 10;",{"version":"7ae42cb6eee47288e3acb472bb3aad16-import { foo } from \"file\";","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"bf6a9897955595825a99e7ef50878c55-export const foo = 10;","a0d503557e945e94b2464694c91a48ba-export const bar = 10;"],"fileIdsList":[[2]],"options":{"composite":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/myproject/project1/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 3 + } + ], + "fileNames": [ + "lib.d.ts", + "./node_modules/file/index.d.ts", + "./index.ts", + "../node_modules/@types/foo/index.d.ts", + "../node_modules/@types/bar/index.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./node_modules/file/index.d.ts", + "version": "bf6a9897955595825a99e7ef50878c55-export const foo = 10;", + "signature": "bf6a9897955595825a99e7ef50878c55-export const foo = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7ae42cb6eee47288e3acb472bb3aad16-import { foo } from \"file\";", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7ae42cb6eee47288e3acb472bb3aad16-import { foo } from \"file\";", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../node_modules/@types/foo/index.d.ts", + "version": "bf6a9897955595825a99e7ef50878c55-export const foo = 10;", + "signature": "bf6a9897955595825a99e7ef50878c55-export const foo = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../node_modules/@types/bar/index.d.ts", + "version": "a0d503557e945e94b2464694c91a48ba-export const bar = 10;", + "signature": "a0d503557e945e94b2464694c91a48ba-export const bar = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "./node_modules/file/index.d.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./index.ts": [ + "./node_modules/file/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1417 +} +//// [/user/username/projects/myproject/project2/index.d.ts] *new* +export {}; + +//// [/user/username/projects/myproject/project2/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/myproject/project2/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[3],"fileNames":["lib.esnext.full.d.ts","./node_modules/file/index.d.ts","./index.ts","../node_modules/@types/foo/index.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"bf6a9897955595825a99e7ef50878c55-export const foo = 10;",{"version":"7ae42cb6eee47288e3acb472bb3aad16-import { foo } from \"file\";","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"bf6a9897955595825a99e7ef50878c55-export const foo = 10;"],"fileIdsList":[[2]],"options":{"composite":true,"module":199},"referencedMap":[[3,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/myproject/project2/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 3 + } + ], + "fileNames": [ + "lib.esnext.full.d.ts", + "./node_modules/file/index.d.ts", + "./index.ts", + "../node_modules/@types/foo/index.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.esnext.full.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./node_modules/file/index.d.ts", + "version": "bf6a9897955595825a99e7ef50878c55-export const foo = 10;", + "signature": "bf6a9897955595825a99e7ef50878c55-export const foo = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7ae42cb6eee47288e3acb472bb3aad16-import { foo } from \"file\";", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7ae42cb6eee47288e3acb472bb3aad16-import { foo } from \"file\";", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../node_modules/@types/foo/index.d.ts", + "version": "bf6a9897955595825a99e7ef50878c55-export const foo = 10;", + "signature": "bf6a9897955595825a99e7ef50878c55-export const foo = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "./node_modules/file/index.d.ts" + ] + ], + "options": { + "composite": true, + "module": 199 + }, + "referencedMap": { + "./index.ts": [ + "./node_modules/file/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1344 +} + +project1/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/myproject/project1/node_modules/file/index.d.ts +*refresh* /user/username/projects/myproject/project1/index.ts +*refresh* /user/username/projects/myproject/node_modules/@types/foo/index.d.ts +*refresh* /user/username/projects/myproject/node_modules/@types/bar/index.d.ts +Signatures:: +(stored at emit) /user/username/projects/myproject/project1/index.ts + +project2/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts +*refresh* /user/username/projects/myproject/project2/node_modules/file/index.d.ts +*refresh* /user/username/projects/myproject/project2/index.ts +*refresh* /user/username/projects/myproject/node_modules/@types/foo/index.d.ts +Signatures:: +(stored at emit) /user/username/projects/myproject/project2/index.ts + + +Edit [0]:: Append text +//// [/user/username/projects/myproject/project1/index.ts] *modified* +import { foo } from "file";const bar = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * project1/tsconfig.json + * project2/tsconfig.json + * tsconfig.json + +[HH:MM:SS AM] Project 'project1/tsconfig.json' is out of date because output 'project1/tsconfig.tsbuildinfo' is older than input 'project1/index.ts' + +[HH:MM:SS AM] Building project 'project1/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/myproject/project1/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const bar = 10; + +//// [/user/username/projects/myproject/project1/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[3],"fileNames":["lib.d.ts","./node_modules/file/index.d.ts","./index.ts","../node_modules/@types/foo/index.d.ts","../node_modules/@types/bar/index.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"bf6a9897955595825a99e7ef50878c55-export const foo = 10;",{"version":"1ab147b130b9a5309305c28d6be6beb4-import { foo } from \"file\";const bar = 10;","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"bf6a9897955595825a99e7ef50878c55-export const foo = 10;","a0d503557e945e94b2464694c91a48ba-export const bar = 10;"],"fileIdsList":[[2]],"options":{"composite":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/myproject/project1/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 3 + } + ], + "fileNames": [ + "lib.d.ts", + "./node_modules/file/index.d.ts", + "./index.ts", + "../node_modules/@types/foo/index.d.ts", + "../node_modules/@types/bar/index.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./node_modules/file/index.d.ts", + "version": "bf6a9897955595825a99e7ef50878c55-export const foo = 10;", + "signature": "bf6a9897955595825a99e7ef50878c55-export const foo = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "1ab147b130b9a5309305c28d6be6beb4-import { foo } from \"file\";const bar = 10;", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "1ab147b130b9a5309305c28d6be6beb4-import { foo } from \"file\";const bar = 10;", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../node_modules/@types/foo/index.d.ts", + "version": "bf6a9897955595825a99e7ef50878c55-export const foo = 10;", + "signature": "bf6a9897955595825a99e7ef50878c55-export const foo = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../node_modules/@types/bar/index.d.ts", + "version": "a0d503557e945e94b2464694c91a48ba-export const bar = 10;", + "signature": "a0d503557e945e94b2464694c91a48ba-export const bar = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "./node_modules/file/index.d.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./index.ts": [ + "./node_modules/file/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1432 +} + +project1/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/myproject/project1/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/myproject/project1/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js b/testdata/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js new file mode 100644 index 0000000000..f91d8d9568 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js @@ -0,0 +1,501 @@ +currentDirectory::/user/username/projects/myproject +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/myproject/node_modules/pkg2] -> /user/username/projects/myproject/packages/pkg2 *new* +//// [/user/username/projects/myproject/packages/pkg1/index.ts] *new* +import type { TheNum } from 'pkg2' +export const theNum: TheNum = 42; +//// [/user/username/projects/myproject/packages/pkg1/package.json] *new* +{ + "name": "pkg1", + "version": "1.0.0", + "main": "build/index.js", + "type": "module" +} +//// [/user/username/projects/myproject/packages/pkg1/tsconfig.json] *new* +{ + "compilerOptions": { + "outDir": "build", + "module": "node16", + }, + "references": [{ "path": "../pkg2" }], +} +//// [/user/username/projects/myproject/packages/pkg2/const.cts] *new* +export type TheNum = 42; +//// [/user/username/projects/myproject/packages/pkg2/index.ts] *new* +export type { TheNum } from './const.cjs'; +//// [/user/username/projects/myproject/packages/pkg2/package.json] *new* +{ + "name": "pkg2", + "version": "1.0.0", + "main": "build/index.js", + "type": "module" +} +//// [/user/username/projects/myproject/packages/pkg2/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "outDir": "build", + "module": "node16", + }, +} + +tsgo -b packages/pkg1 -w --verbose --traceResolution +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * packages/pkg2/tsconfig.json + * packages/pkg1/tsconfig.json + +[HH:MM:SS AM] Project 'packages/pkg2/tsconfig.json' is out of date because output file 'packages/pkg2/build/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'packages/pkg2/tsconfig.json'... + +======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/index.ts'. ======== +Module resolution kind is not specified, using 'Node16'. +Resolving in ESM mode with conditions 'import', 'types', 'node'. +Loading module as file / folder, candidate module location '/user/username/projects/myproject/packages/pkg2/const.cjs', target file types: TypeScript, JavaScript, Declaration. +File name '/user/username/projects/myproject/packages/pkg2/const.cjs' has a '.cjs' extension - stripping it. +File '/user/username/projects/myproject/packages/pkg2/const.cts' exists - use it as a name resolution result. +======== Module name './const.cjs' was successfully resolved to '/user/username/projects/myproject/packages/pkg2/const.cts'. ======== +[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because output file 'packages/pkg1/build/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'packages/pkg1/tsconfig.json'... + +======== Resolving module 'pkg2' from '/user/username/projects/myproject/packages/pkg1/index.ts'. ======== +Module resolution kind is not specified, using 'Node16'. +Resolving in ESM mode with conditions 'import', 'types', 'node'. +Found 'package.json' at '/user/username/projects/myproject/packages/pkg1/package.json'. +Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. +Directory '/user/username/projects/myproject/packages/pkg1/node_modules/@types' does not exist, skipping all lookups in it. +Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. +Directory '/user/username/projects/myproject/packages/node_modules/@types' does not exist, skipping all lookups in it. +Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. +'package.json' does not have a 'typesVersions' field. +'package.json' does not have a 'typings' field. +'package.json' does not have a 'types' field. +'package.json' has 'main' field 'build/index.js' that references '/user/username/projects/myproject/node_modules/pkg2/build/index.js'. +File name '/user/username/projects/myproject/node_modules/pkg2/build/index.js' has a '.js' extension - stripping it. +File '/user/username/projects/myproject/node_modules/pkg2/build/index.ts' does not exist. +File '/user/username/projects/myproject/node_modules/pkg2/build/index.tsx' does not exist. +File '/user/username/projects/myproject/node_modules/pkg2/build/index.d.ts' exists - use it as a name resolution result. +'package.json' does not have a 'peerDependencies' field. +Resolving real path for '/user/username/projects/myproject/node_modules/pkg2/build/index.d.ts', result '/user/username/projects/myproject/packages/pkg2/build/index.d.ts'. +======== Module name 'pkg2' was successfully resolved to '/user/username/projects/myproject/packages/pkg2/build/index.d.ts' with Package ID 'pkg2@1.0.0'. ======== +======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/index.ts'. ======== +Using compiler options of project reference redirect '/user/username/projects/myproject/packages/pkg2/tsconfig.json'. +Module resolution kind is not specified, using 'Node16'. +Resolving in ESM mode with conditions 'import', 'types', 'node'. +Loading module as file / folder, candidate module location '/user/username/projects/myproject/packages/pkg2/const.cjs', target file types: TypeScript, JavaScript, Declaration. +File name '/user/username/projects/myproject/packages/pkg2/const.cjs' has a '.cjs' extension - stripping it. +File '/user/username/projects/myproject/packages/pkg2/const.cts' exists - use it as a name resolution result. +======== Module name './const.cjs' was successfully resolved to '/user/username/projects/myproject/packages/pkg2/const.cts'. ======== +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.es2022.full.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/myproject/packages/pkg1/build/index.js] *new* +export const theNum = 42; + +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":["../index.ts"]} +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../index.ts" + ], + "original": "../index.ts" + } + ], + "size": 50 +} +//// [/user/username/projects/myproject/packages/pkg2/build/const.cjs] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/myproject/packages/pkg2/build/const.d.cts] *new* +export type TheNum = 42; + +//// [/user/username/projects/myproject/packages/pkg2/build/index.d.ts] *new* +export type { TheNum } from './const.cjs'; + +//// [/user/username/projects/myproject/packages/pkg2/build/index.js] *new* +export {}; + +//// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2022.full.d.ts","../const.cts","../index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be0f939ab1143e4064a3742586332724-export type TheNum = 42;","signature":"56e2d69d2edd1f0edd1a64ecfdf6de0d-export type TheNum = 42;\n","impliedNodeFormat":1},{"version":"7bb214373f4d1876e9a0040d287d1b6e-export type { TheNum } from './const.cjs';","signature":"2c7786a1f125eb57a4db00a4d58e384a-export type { TheNum } from './const.cjs';\n","impliedNodeFormat":99}],"fileIdsList":[[2]],"options":{"composite":true,"module":100,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../const.cts", + "../index.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.es2022.full.d.ts", + "../const.cts", + "../index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.es2022.full.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../const.cts", + "version": "be0f939ab1143e4064a3742586332724-export type TheNum = 42;", + "signature": "56e2d69d2edd1f0edd1a64ecfdf6de0d-export type TheNum = 42;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "be0f939ab1143e4064a3742586332724-export type TheNum = 42;", + "signature": "56e2d69d2edd1f0edd1a64ecfdf6de0d-export type TheNum = 42;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../index.ts", + "version": "7bb214373f4d1876e9a0040d287d1b6e-export type { TheNum } from './const.cjs';", + "signature": "2c7786a1f125eb57a4db00a4d58e384a-export type { TheNum } from './const.cjs';\n", + "impliedNodeFormat": "ESNext", + "original": { + "version": "7bb214373f4d1876e9a0040d287d1b6e-export type { TheNum } from './const.cjs';", + "signature": "2c7786a1f125eb57a4db00a4d58e384a-export type { TheNum } from './const.cjs';\n", + "impliedNodeFormat": 99 + } + } + ], + "fileIdsList": [ + [ + "../const.cts" + ] + ], + "options": { + "composite": true, + "module": 100, + "outDir": "./" + }, + "referencedMap": { + "../index.ts": [ + "../const.cts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1403 +} + +packages/pkg2/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.es2022.full.d.ts +*refresh* /user/username/projects/myproject/packages/pkg2/const.cts +*refresh* /user/username/projects/myproject/packages/pkg2/index.ts +Signatures:: +(stored at emit) /user/username/projects/myproject/packages/pkg2/const.cts +(stored at emit) /user/username/projects/myproject/packages/pkg2/index.ts + +packages/pkg1/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.es2022.full.d.ts +*refresh* /user/username/projects/myproject/packages/pkg2/build/const.d.cts +*refresh* /user/username/projects/myproject/packages/pkg2/build/index.d.ts +*refresh* /user/username/projects/myproject/packages/pkg1/index.ts +Signatures:: + + +Edit [0]:: reports import errors after change to package file +//// [/user/username/projects/myproject/packages/pkg1/package.json] *modified* +{ + "name": "pkg1", + "version": "1.0.0", + "main": "build/index.js", + "type": "commonjs" +} + + +Output:: + + + +Diff:: Package.json watch pending, so no change detected yet +--- nonIncremental /user/username/projects/myproject/packages/pkg1/build/index.js ++++ incremental /user/username/projects/myproject/packages/pkg1/build/index.js +@@ -1,4 +1,1 @@ +-"use strict"; +-Object.defineProperty(exports, "__esModule", { value: true }); +-exports.theNum = void 0; +-exports.theNum = 42; ++export const theNum = 42; +--- nonIncremental.output.txt ++++ incremental.output.txt +@@ -1,6 +0,0 @@ +-packages/pkg1/index.ts:1:29 - error TS1541: Type-only import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute. +- To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`. +- +-1 import type { TheNum } from 'pkg2' +-   ~~~~~~ +- + +Edit [1]:: removes those errors when a package file is changed back +//// [/user/username/projects/myproject/packages/pkg1/package.json] *modified* +{ + "name": "pkg1", + "version": "1.0.0", + "main": "build/index.js", + "type": "module" +} + + +Output:: + + + +Edit [2]:: reports import errors after change to package file +//// [/user/username/projects/myproject/packages/pkg1/package.json] *modified* +{ + "name": "pkg1", + "version": "1.0.0", + "main": "build/index.js", + "type": "commonjs" +} + + +Output:: + + + +Diff:: Package.json watch pending, so no change detected yet +--- nonIncremental /user/username/projects/myproject/packages/pkg1/build/index.js ++++ incremental /user/username/projects/myproject/packages/pkg1/build/index.js +@@ -1,4 +1,1 @@ +-"use strict"; +-Object.defineProperty(exports, "__esModule", { value: true }); +-exports.theNum = void 0; +-exports.theNum = 42; ++export const theNum = 42; +--- nonIncremental.output.txt ++++ incremental.output.txt +@@ -1,6 +0,0 @@ +-packages/pkg1/index.ts:1:29 - error TS1541: Type-only import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute. +- To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with `{ "type": "module" }`. +- +-1 import type { TheNum } from 'pkg2' +-   ~~~~~~ +- + +Edit [3]:: removes those errors when a package file is changed to cjs extensions +//// [/user/username/projects/myproject/packages/pkg2/index.cts] *new* +export type { TheNum } from './const.cjs'; +//// [/user/username/projects/myproject/packages/pkg2/index.ts] *deleted* +//// [/user/username/projects/myproject/packages/pkg2/package.json] *modified* +{ + "name": "pkg2", + "version": "1.0.0", + "main": "build/index.cjs", + "type": "module" +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * packages/pkg2/tsconfig.json + * packages/pkg1/tsconfig.json + +[HH:MM:SS AM] Project 'packages/pkg2/tsconfig.json' is out of date because output 'packages/pkg2/build/tsconfig.tsbuildinfo' is older than input 'packages/pkg2/index.cts' + +[HH:MM:SS AM] Building project 'packages/pkg2/tsconfig.json'... + +======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/index.cts'. ======== +Module resolution kind is not specified, using 'Node16'. +Resolving in CJS mode with conditions 'require', 'types', 'node'. +Loading module as file / folder, candidate module location '/user/username/projects/myproject/packages/pkg2/const.cjs', target file types: TypeScript, JavaScript, Declaration. +File name '/user/username/projects/myproject/packages/pkg2/const.cjs' has a '.cjs' extension - stripping it. +File '/user/username/projects/myproject/packages/pkg2/const.cts' exists - use it as a name resolution result. +======== Module name './const.cjs' was successfully resolved to '/user/username/projects/myproject/packages/pkg2/const.cts'. ======== +[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because output 'packages/pkg1/build/index.js' is older than input 'packages/pkg2/tsconfig.json' + +[HH:MM:SS AM] Building project 'packages/pkg1/tsconfig.json'... + +======== Resolving module 'pkg2' from '/user/username/projects/myproject/packages/pkg1/index.ts'. ======== +Module resolution kind is not specified, using 'Node16'. +Resolving in CJS mode with conditions 'require', 'types', 'node'. +Found 'package.json' at '/user/username/projects/myproject/packages/pkg1/package.json'. +Loading module 'pkg2' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. +Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. +Directory '/user/username/projects/myproject/packages/pkg1/node_modules' does not exist, skipping all lookups in it. +Directory '/user/username/projects/myproject/packages/pkg1/node_modules/@types' does not exist, skipping all lookups in it. +Directory '/user/username/projects/myproject/packages/node_modules' does not exist, skipping all lookups in it. +Directory '/user/username/projects/myproject/packages/node_modules/@types' does not exist, skipping all lookups in it. +Found 'package.json' at '/user/username/projects/myproject/node_modules/pkg2/package.json'. +File '/user/username/projects/myproject/node_modules/pkg2.ts' does not exist. +File '/user/username/projects/myproject/node_modules/pkg2.tsx' does not exist. +File '/user/username/projects/myproject/node_modules/pkg2.d.ts' does not exist. +'package.json' does not have a 'typesVersions' field. +'package.json' does not have a 'typings' field. +'package.json' does not have a 'types' field. +'package.json' has 'main' field 'build/index.cjs' that references '/user/username/projects/myproject/node_modules/pkg2/build/index.cjs'. +File name '/user/username/projects/myproject/node_modules/pkg2/build/index.cjs' has a '.cjs' extension - stripping it. +File '/user/username/projects/myproject/node_modules/pkg2/build/index.cts' does not exist. +File '/user/username/projects/myproject/node_modules/pkg2/build/index.d.cts' exists - use it as a name resolution result. +'package.json' does not have a 'peerDependencies' field. +Resolving real path for '/user/username/projects/myproject/node_modules/pkg2/build/index.d.cts', result '/user/username/projects/myproject/packages/pkg2/build/index.d.cts'. +======== Module name 'pkg2' was successfully resolved to '/user/username/projects/myproject/packages/pkg2/build/index.d.cts' with Package ID 'pkg2@1.0.0'. ======== +======== Resolving module './const.cjs' from '/user/username/projects/myproject/packages/pkg2/index.cts'. ======== +Using compiler options of project reference redirect '/user/username/projects/myproject/packages/pkg2/tsconfig.json'. +Module resolution kind is not specified, using 'Node16'. +Resolving in CJS mode with conditions 'require', 'types', 'node'. +Loading module as file / folder, candidate module location '/user/username/projects/myproject/packages/pkg2/const.cjs', target file types: TypeScript, JavaScript, Declaration. +File name '/user/username/projects/myproject/packages/pkg2/const.cjs' has a '.cjs' extension - stripping it. +File '/user/username/projects/myproject/packages/pkg2/const.cts' exists - use it as a name resolution result. +======== Module name './const.cjs' was successfully resolved to '/user/username/projects/myproject/packages/pkg2/const.cts'. ======== +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/myproject/packages/pkg1/build/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.theNum = void 0; +exports.theNum = 42; + +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* +//// [/user/username/projects/myproject/packages/pkg2/build/index.cjs] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/myproject/packages/pkg2/build/index.d.cts] *new* +export type { TheNum } from './const.cjs'; + +//// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2022.full.d.ts","../const.cts","../index.cts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be0f939ab1143e4064a3742586332724-export type TheNum = 42;","signature":"56e2d69d2edd1f0edd1a64ecfdf6de0d-export type TheNum = 42;\n","impliedNodeFormat":1},{"version":"7bb214373f4d1876e9a0040d287d1b6e-export type { TheNum } from './const.cjs';","signature":"2c7786a1f125eb57a4db00a4d58e384a-export type { TheNum } from './const.cjs';\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"module":100,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./index.d.cts"} +//// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../const.cts", + "../index.cts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.es2022.full.d.ts", + "../const.cts", + "../index.cts" + ], + "fileInfos": [ + { + "fileName": "lib.es2022.full.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../const.cts", + "version": "be0f939ab1143e4064a3742586332724-export type TheNum = 42;", + "signature": "56e2d69d2edd1f0edd1a64ecfdf6de0d-export type TheNum = 42;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "be0f939ab1143e4064a3742586332724-export type TheNum = 42;", + "signature": "56e2d69d2edd1f0edd1a64ecfdf6de0d-export type TheNum = 42;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../index.cts", + "version": "7bb214373f4d1876e9a0040d287d1b6e-export type { TheNum } from './const.cjs';", + "signature": "2c7786a1f125eb57a4db00a4d58e384a-export type { TheNum } from './const.cjs';\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7bb214373f4d1876e9a0040d287d1b6e-export type { TheNum } from './const.cjs';", + "signature": "2c7786a1f125eb57a4db00a4d58e384a-export type { TheNum } from './const.cjs';\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../const.cts" + ] + ], + "options": { + "composite": true, + "module": 100, + "outDir": "./" + }, + "referencedMap": { + "../index.cts": [ + "../const.cts" + ] + }, + "latestChangedDtsFile": "./index.d.cts", + "size": 1404 +} + +packages/pkg2/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/myproject/packages/pkg2/index.cts +Signatures:: +(computed .d.ts) /user/username/projects/myproject/packages/pkg2/index.cts + +packages/pkg1/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/myproject/packages/pkg2/build/index.d.cts +*refresh* /user/username/projects/myproject/packages/pkg1/index.ts +Signatures:: +(used version) /user/username/projects/myproject/packages/pkg2/build/index.d.cts +(computed .d.ts) /user/username/projects/myproject/packages/pkg1/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted-with-incremental.js b/testdata/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted-with-incremental.js new file mode 100644 index 0000000000..995b3e1d9a --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted-with-incremental.js @@ -0,0 +1,242 @@ +currentDirectory::/user/username/projects/myproject +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/myproject/a.js] *new* + +//// [/user/username/projects/myproject/b.ts] *new* + +//// [/user/username/projects/myproject/tsconfig.json] *new* +{ + "compilerOptions": { + "allowJs": true, + "noEmit": true, + }, +} + +tsgo -b -w -verbose --incremental +ExitStatus:: Success +Output:: +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.js","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"99aa06d3014798d86001c324468d497f-","99aa06d3014798d86001c324468d497f-"],"options":{"allowJs":true},"affectedFilesPendingEmit":[2,3]} +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.js", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.js", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.js", + "version": "99aa06d3014798d86001c324468d497f-", + "signature": "99aa06d3014798d86001c324468d497f-", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./b.ts", + "version": "99aa06d3014798d86001c324468d497f-", + "signature": "99aa06d3014798d86001c324468d497f-", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "allowJs": true + }, + "affectedFilesPendingEmit": [ + [ + "./a.js", + "Js", + 2 + ], + [ + "./b.ts", + "Js", + 3 + ] + ], + "size": 1001 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/myproject/a.js +*refresh* /user/username/projects/myproject/b.ts +Signatures:: + + +Edit [0]:: No change +//// [/user/username/projects/myproject/a.js] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] *mTime changed* + + + +Edit [1]:: change +//// [/user/username/projects/myproject/a.js] *modified* +const x = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.js","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4447ab8c90027f28bdaff9f2056779ce-const x = 10;","signature":"4be7af7f970696121f4f582a5d074177-declare const x = 10;\n","affectsGlobalScope":true,"impliedNodeFormat":1},"99aa06d3014798d86001c324468d497f-"],"options":{"allowJs":true},"affectedFilesPendingEmit":[2,3]} +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.js", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.js", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.js", + "version": "4447ab8c90027f28bdaff9f2056779ce-const x = 10;", + "signature": "4be7af7f970696121f4f582a5d074177-declare const x = 10;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4447ab8c90027f28bdaff9f2056779ce-const x = 10;", + "signature": "4be7af7f970696121f4f582a5d074177-declare const x = 10;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "99aa06d3014798d86001c324468d497f-", + "signature": "99aa06d3014798d86001c324468d497f-", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "allowJs": true + }, + "affectedFilesPendingEmit": [ + [ + "./a.js", + "Js", + 2 + ], + [ + "./b.ts", + "Js", + 3 + ] + ], + "size": 1145 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/myproject/a.js +Signatures:: +(computed .d.ts) /user/username/projects/myproject/a.js diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js b/testdata/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js new file mode 100644 index 0000000000..8ee92c09ce --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js @@ -0,0 +1,133 @@ +currentDirectory::/user/username/projects/myproject +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/myproject/a.js] *new* + +//// [/user/username/projects/myproject/b.ts] *new* + +//// [/user/username/projects/myproject/tsconfig.json] *new* +{ + "compilerOptions": { + "allowJs": true, + "noEmit": true, + }, +} + +tsgo -b -w -verbose +ExitStatus:: Success +Output:: +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":["./a.js","./b.ts"]} +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.js" + ], + "original": "./a.js" + }, + { + "files": [ + "./b.ts" + ], + "original": "./b.ts" + } + ], + "size": 54 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/myproject/a.js +*refresh* /user/username/projects/myproject/b.ts +Signatures:: + + +Edit [0]:: No change +//// [/user/username/projects/myproject/a.js] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[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 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [1]:: change +//// [/user/username/projects/myproject/a.js] *modified* +const x = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/myproject/a.js +Signatures:: +(computed .d.ts) /user/username/projects/myproject/a.js diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-with-incremental-as-modules.js b/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-with-incremental-as-modules.js new file mode 100644 index 0000000000..2f795e410b --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-with-incremental-as-modules.js @@ -0,0 +1,711 @@ +currentDirectory::/home/src/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/projects/project/a.ts] *new* +export const a = class { private p = 10; }; +//// [/home/src/projects/project/b.ts] *new* +export const b = 10; +//// [/home/src/projects/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": true } +} + +tsgo -b -verbose -w +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[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 'tsconfig.json'... + +a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 export const a = class { private p = 10; }; +   ~ + + a.ts:1:14 - Add a type annotation to the variable a. + 1 export const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"9c1fc7106f3a21aadb5219db8b3209bc-export const a = class { private p = 10; };","907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"pos":13,"end":14,"code":4094,"category":1,"message":"Property 'p' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":13,"end":14,"code":9027,"category":1,"message":"Add a type annotation to the variable a."}]}]]],"affectedFilesPendingEmit":[[2,17],[3,17]]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "9c1fc7106f3a21aadb5219db8b3209bc-export const a = class { private p = 10; };", + "signature": "9c1fc7106f3a21aadb5219db8b3209bc-export const a = class { private p = 10; };", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": true + }, + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "pos": 13, + "end": 14, + "code": 4094, + "category": 1, + "message": "Property 'p' of exported anonymous class type may not be private or protected.", + "relatedInformation": [ + { + "pos": 13, + "end": 14, + "code": 9027, + "category": 1, + "message": "Add a type annotation to the variable a." + } + ] + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js|DtsEmit", + [ + 2, + 17 + ] + ], + [ + "./b.ts", + "Js|DtsEmit", + [ + 3, + 17 + ] + ] + ], + "size": 1368 +} +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +*refresh* /home/src/projects/project/b.ts +Signatures:: + + +Edit [0]:: Fix error +//// [/home/src/projects/project/a.ts] *modified* +export const a = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";","signature":"8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n","impliedNodeFormat":1},"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":true},"affectedFilesPendingEmit":[[2,17],[3,17]]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": true + }, + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js|DtsEmit", + [ + 2, + 17 + ] + ], + [ + "./b.ts", + "Js|DtsEmit", + [ + 3, + 17 + ] + ] + ], + "size": 1181 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [1]:: Emit after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.d.ts] *new* +export declare const a = "hello"; + +//// [/home/src/projects/project/a.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + +//// [/home/src/projects/project/b.d.ts] *new* +export declare const b = 10; + +//// [/home/src/projects/project/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";","signature":"8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n","impliedNodeFormat":1},{"version":"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1}],"options":{"declaration":true}} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": true + }, + "size": 1250 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: +(stored at emit) /home/src/projects/project/b.ts + + +Edit [2]:: no Emit run after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: Introduce error +//// [/home/src/projects/project/a.ts] *modified* +const a = class { private p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 const a = class { private p = 10; }; +   ~ + + a.ts:1:7 - Add a type annotation to the variable a. + 1 const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };","signature":"26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1}],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"pos":6,"end":7,"code":4094,"category":1,"message":"Property 'p' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":6,"end":7,"code":9027,"category":1,"message":"Add a type annotation to the variable a."}]}]]],"affectedFilesPendingEmit":[[2,17]]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": true + }, + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "pos": 6, + "end": 7, + "code": 4094, + "category": 1, + "message": "Property 'p' of exported anonymous class type may not be private or protected.", + "relatedInformation": [ + { + "pos": 6, + "end": 7, + "code": 9027, + "category": 1, + "message": "Add a type annotation to the variable a." + } + ] + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js|DtsEmit", + [ + 2, + 17 + ] + ] + ], + "size": 1795 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [4]:: Emit when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 const a = class { private p = 10; }; +   ~ + + a.ts:1:7 - Add a type annotation to the variable a. + 1 const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/a.d.ts] *modified* +declare const a: { + new (): { + p: number; + }; +}; + +//// [/home/src/projects/project/a.js] *modified* +const a = class { + p = 10; +}; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };","signature":"26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1}],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"pos":6,"end":7,"code":4094,"category":1,"message":"Property 'p' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":6,"end":7,"code":9027,"category":1,"message":"Add a type annotation to the variable a."}]}]]]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": true + }, + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "pos": 6, + "end": 7, + "code": 4094, + "category": 1, + "message": "Property 'p' of exported anonymous class type may not be private or protected.", + "relatedInformation": [ + { + "pos": 6, + "end": 7, + "code": 9027, + "category": 1, + "message": "Add a type annotation to the variable a." + } + ] + } + ] + ] + ], + "size": 1759 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: no Emit run when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 const a = class { private p = 10; }; +   ~ + + a.ts:1:7 - Add a type annotation to the variable a. + 1 const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-with-incremental.js b/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-with-incremental.js new file mode 100644 index 0000000000..516fd9568c --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-with-incremental.js @@ -0,0 +1,620 @@ +currentDirectory::/home/src/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/projects/project/a.ts] *new* +const a = class { private p = 10; }; +//// [/home/src/projects/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": true } +} + +tsgo -b -verbose -w +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[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 'tsconfig.json'... + +a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 const a = class { private p = 10; }; +   ~ + + a.ts:1:7 - Add a type annotation to the variable a. + 1 const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"pos":6,"end":7,"code":4094,"category":1,"message":"Property 'p' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":6,"end":7,"code":9027,"category":1,"message":"Add a type annotation to the variable a."}]}]]],"affectedFilesPendingEmit":[[2,17]]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": true + }, + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "pos": 6, + "end": 7, + "code": 4094, + "category": 1, + "message": "Property 'p' of exported anonymous class type may not be private or protected.", + "relatedInformation": [ + { + "pos": 6, + "end": 7, + "code": 9027, + "category": 1, + "message": "Add a type annotation to the variable a." + } + ] + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js|DtsEmit", + [ + 2, + 17 + ] + ] + ], + "size": 1341 +} +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: + + +Edit [0]:: Fix error +//// [/home/src/projects/project/a.ts] *modified* +const a = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"312c97b5294d8f3919933705625e91a3-const a = \"hello\";","signature":"64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":true},"affectedFilesPendingEmit":[[2,17]]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": true + }, + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js|DtsEmit", + [ + 2, + 17 + ] + ] + ], + "size": 1117 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [1]:: Emit after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.d.ts] *new* +declare const a = "hello"; + +//// [/home/src/projects/project/a.js] *new* +const a = "hello"; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"312c97b5294d8f3919933705625e91a3-const a = \"hello\";","signature":"64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":true}} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": true + }, + "size": 1081 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: no Emit run after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: Introduce error +//// [/home/src/projects/project/a.ts] *modified* +const a = class { private p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 const a = class { private p = 10; }; +   ~ + + a.ts:1:7 - Add a type annotation to the variable a. + 1 const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };","signature":"26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"pos":6,"end":7,"code":4094,"category":1,"message":"Property 'p' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":6,"end":7,"code":9027,"category":1,"message":"Add a type annotation to the variable a."}]}]]],"affectedFilesPendingEmit":[[2,17]]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": true + }, + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "pos": 6, + "end": 7, + "code": 4094, + "category": 1, + "message": "Property 'p' of exported anonymous class type may not be private or protected.", + "relatedInformation": [ + { + "pos": 6, + "end": 7, + "code": 9027, + "category": 1, + "message": "Add a type annotation to the variable a." + } + ] + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js|DtsEmit", + [ + 2, + 17 + ] + ] + ], + "size": 1614 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [4]:: Emit when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 const a = class { private p = 10; }; +   ~ + + a.ts:1:7 - Add a type annotation to the variable a. + 1 const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/a.d.ts] *modified* +declare const a: { + new (): { + p: number; + }; +}; + +//// [/home/src/projects/project/a.js] *modified* +const a = class { + p = 10; +}; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };","signature":"26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"pos":6,"end":7,"code":4094,"category":1,"message":"Property 'p' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":6,"end":7,"code":9027,"category":1,"message":"Add a type annotation to the variable a."}]}]]]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": true + }, + "emitDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "pos": 6, + "end": 7, + "code": 4094, + "category": 1, + "message": "Property 'p' of exported anonymous class type may not be private or protected.", + "relatedInformation": [ + { + "pos": 6, + "end": 7, + "code": 9027, + "category": 1, + "message": "Add a type annotation to the variable a." + } + ] + } + ] + ] + ], + "size": 1578 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: no Emit run when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": true + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 const a = class { private p = 10; }; +   ~ + + a.ts:1:7 - Add a type annotation to the variable a. + 1 const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-without-dts-enabled-with-incremental-as-modules.js b/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-without-dts-enabled-with-incremental-as-modules.js new file mode 100644 index 0000000000..89195e93aa --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-without-dts-enabled-with-incremental-as-modules.js @@ -0,0 +1,565 @@ +currentDirectory::/home/src/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/projects/project/a.ts] *new* +export const a = class { private p = 10; }; +//// [/home/src/projects/project/b.ts] *new* +export const b = 10; +//// [/home/src/projects/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + +tsgo -b -verbose -w +ExitStatus:: Success +Output:: +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"9c1fc7106f3a21aadb5219db8b3209bc-export const a = class { private p = 10; };","907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false},"affectedFilesPendingEmit":[2,3]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "9c1fc7106f3a21aadb5219db8b3209bc-export const a = class { private p = 10; };", + "signature": "9c1fc7106f3a21aadb5219db8b3209bc-export const a = class { private p = 10; };", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ], + [ + "./b.ts", + "Js", + 3 + ] + ], + "size": 1069 +} +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +*refresh* /home/src/projects/project/b.ts +Signatures:: + + +Edit [0]:: Fix error +//// [/home/src/projects/project/a.ts] *modified* +export const a = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";","signature":"8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n","impliedNodeFormat":1},"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false},"affectedFilesPendingEmit":[2,3]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ], + [ + "./b.ts", + "Js", + 3 + ] + ], + "size": 1172 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [1]:: Emit after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + +//// [/home/src/projects/project/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";","signature":"8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n","impliedNodeFormat":1},"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false}} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "size": 1139 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: no Emit run after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: Introduce error +//// [/home/src/projects/project/a.ts] *modified* +const a = class { private p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };","signature":"26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.","affectsGlobalScope":true,"impliedNodeFormat":1},"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false},"affectedFilesPendingEmit":[2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ] + ], + "size": 1393 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [4]:: Emit when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.js] *modified* +const a = class { + p = 10; +}; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };","signature":"26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.","affectsGlobalScope":true,"impliedNodeFormat":1},"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false}} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "size": 1362 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: no Emit run when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-without-dts-enabled-with-incremental.js b/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-without-dts-enabled-with-incremental.js new file mode 100644 index 0000000000..48624d3c0d --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-without-dts-enabled-with-incremental.js @@ -0,0 +1,499 @@ +currentDirectory::/home/src/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/projects/project/a.ts] *new* +const a = class { private p = 10; }; +//// [/home/src/projects/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + +tsgo -b -verbose -w +ExitStatus:: Success +Output:: +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false},"affectedFilesPendingEmit":[2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ] + ], + "size": 1051 +} +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: + + +Edit [0]:: Fix error +//// [/home/src/projects/project/a.ts] *modified* +const a = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"312c97b5294d8f3919933705625e91a3-const a = \"hello\";","signature":"64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false},"affectedFilesPendingEmit":[2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ] + ], + "size": 1113 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [1]:: Emit after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.js] *new* +const a = "hello"; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"312c97b5294d8f3919933705625e91a3-const a = \"hello\";","signature":"64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false}} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "size": 1082 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: no Emit run after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: Introduce error +//// [/home/src/projects/project/a.ts] *modified* +const a = class { private p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };","signature":"26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false},"affectedFilesPendingEmit":[2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ] + ], + "size": 1324 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [4]:: Emit when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.js] *modified* +const a = class { + p = 10; +}; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };","signature":"26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false}} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "54435c7adb578d59d7e39dd2f567250e-const a = class { private p = 10; };", + "signature": "26341e8dc85f0d296deed3b6fe76a0dd-declare const a: {\n new (): {\n p: number;\n };\n};\n\n(6,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(6,1): error9027: Add a type annotation to the variable a.", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "size": 1293 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: no Emit run when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-without-dts-enabled.js b/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-without-dts-enabled.js new file mode 100644 index 0000000000..45a16017cd --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-without-dts-enabled.js @@ -0,0 +1,257 @@ +currentDirectory::/home/src/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/projects/project/a.ts] *new* +const a = class { private p = 10; }; +//// [/home/src/projects/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +} + +tsgo -b -verbose -w +ExitStatus:: Success +Output:: +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":["./a.ts"]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": "./a.ts" + } + ], + "size": 45 +} +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: + + +Edit [0]:: Fix error +//// [/home/src/projects/project/a.ts] *modified* +const a = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [1]:: Emit after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'a.js' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.js] *new* +const a = "hello"; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: no Emit run after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: Introduce error +//// [/home/src/projects/project/a.ts] *modified* +const a = class { private p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [4]:: Emit when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'a.js' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.js] *modified* +const a = class { + p = 10; +}; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: no Emit run when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors.js b/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors.js new file mode 100644 index 0000000000..6b224e4d9a --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors.js @@ -0,0 +1,328 @@ +currentDirectory::/home/src/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/projects/project/a.ts] *new* +const a = class { private p = 10; }; +//// [/home/src/projects/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": false, + "declaration": true + , "noEmit": true } +} + +tsgo -b -verbose -w +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[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 'tsconfig.json'... + +a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 const a = class { private p = 10; }; +   ~ + + a.ts:1:7 - Add a type annotation to the variable a. + 1 const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./a.ts" + ], + "original": "./a.ts" + } + ], + "size": 59 +} +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: + + +Edit [0]:: Fix error +//// [/home/src/projects/project/a.ts] *modified* +const a = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["./a.ts"]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": "./a.ts" + } + ], + "size": 45 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [1]:: Emit after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": true + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'a.js' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.d.ts] *new* +declare const a = "hello"; + +//// [/home/src/projects/project/a.js] *new* +const a = "hello"; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: no Emit run after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": true + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: Introduce error +//// [/home/src/projects/project/a.ts] *modified* +const a = class { private p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 const a = class { private p = 10; }; +   ~ + + a.ts:1:7 - Add a type annotation to the variable a. + 1 const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./a.ts" + ], + "original": "./a.ts" + } + ], + "size": 59 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [4]:: Emit when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": true + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 const a = class { private p = 10; }; +   ~ + + a.ts:1:7 - Add a type annotation to the variable a. + 1 const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/a.d.ts] *modified* +declare const a: { + new (): { + p: number; + }; +}; + +//// [/home/src/projects/project/a.js] *modified* +const a = class { + p = 10; +}; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: no Emit run when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": true + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 const a = class { private p = 10; }; +   ~ + + a.ts:1:7 - Add a type annotation to the variable a. + 1 const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/semantic-errors-with-incremental-as-modules.js b/testdata/baselines/reference/tsbuildWatch/noEmit/semantic-errors-with-incremental-as-modules.js new file mode 100644 index 0000000000..24ed893968 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/semantic-errors-with-incremental-as-modules.js @@ -0,0 +1,622 @@ +currentDirectory::/home/src/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/projects/project/a.ts] *new* +export const a: number = "hello" +//// [/home/src/projects/project/b.ts] *new* +export const b = 10; +//// [/home/src/projects/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + +tsgo -b -verbose -w +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[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 'tsconfig.json'... + +a.ts:1:14 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 export const a: number = "hello" +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"a49e791c9509caf97ef39f9e765d5015-export const a: number = \"hello\"","907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false},"semanticDiagnosticsPerFile":[[2,[{"pos":13,"end":14,"code":2322,"category":1,"message":"Type 'string' is not assignable to type 'number'."}]]],"affectedFilesPendingEmit":[2,3]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "a49e791c9509caf97ef39f9e765d5015-export const a: number = \"hello\"", + "signature": "a49e791c9509caf97ef39f9e765d5015-export const a: number = \"hello\"", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "pos": 13, + "end": 14, + "code": 2322, + "category": 1, + "message": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ], + [ + "./b.ts", + "Js", + 3 + ] + ], + "size": 1204 +} +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +*refresh* /home/src/projects/project/b.ts +Signatures:: + + +Edit [0]:: Fix error +//// [/home/src/projects/project/a.ts] *modified* +export const a = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";","signature":"8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n","impliedNodeFormat":1},"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false},"affectedFilesPendingEmit":[2,3]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ], + [ + "./b.ts", + "Js", + 3 + ] + ], + "size": 1172 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [1]:: Emit after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + +//// [/home/src/projects/project/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";","signature":"8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n","impliedNodeFormat":1},"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false}} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "size": 1139 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: no Emit run after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: Introduce error +//// [/home/src/projects/project/a.ts] *modified* +const a: number = "hello" + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const a: number = "hello" +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"903d9216256112700b1325b61dcb7717-const a: number = \"hello\"","signature":"a87bf21f13058d40be607df702228523-declare const a: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false},"semanticDiagnosticsPerFile":[[2,[{"pos":6,"end":7,"code":2322,"category":1,"message":"Type 'string' is not assignable to type 'number'."}]]],"affectedFilesPendingEmit":[2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "903d9216256112700b1325b61dcb7717-const a: number = \"hello\"", + "signature": "a87bf21f13058d40be607df702228523-declare const a: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "903d9216256112700b1325b61dcb7717-const a: number = \"hello\"", + "signature": "a87bf21f13058d40be607df702228523-declare const a: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "pos": 6, + "end": 7, + "code": 2322, + "category": 1, + "message": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ] + ], + "size": 1327 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [4]:: Emit when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const a: number = "hello" +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/a.js] *modified* +const a = "hello"; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"903d9216256112700b1325b61dcb7717-const a: number = \"hello\"","signature":"a87bf21f13058d40be607df702228523-declare const a: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false},"semanticDiagnosticsPerFile":[[2,[{"pos":6,"end":7,"code":2322,"category":1,"message":"Type 'string' is not assignable to type 'number'."}]]]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "903d9216256112700b1325b61dcb7717-const a: number = \"hello\"", + "signature": "a87bf21f13058d40be607df702228523-declare const a: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "903d9216256112700b1325b61dcb7717-const a: number = \"hello\"", + "signature": "a87bf21f13058d40be607df702228523-declare const a: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "pos": 6, + "end": 7, + "code": 2322, + "category": 1, + "message": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "size": 1296 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: no Emit run when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const a: number = "hello" +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/semantic-errors-with-incremental.js b/testdata/baselines/reference/tsbuildWatch/noEmit/semantic-errors-with-incremental.js new file mode 100644 index 0000000000..1fbba049e3 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/semantic-errors-with-incremental.js @@ -0,0 +1,554 @@ +currentDirectory::/home/src/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/projects/project/a.ts] *new* +const a: number = "hello" +//// [/home/src/projects/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + +tsgo -b -verbose -w +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[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 'tsconfig.json'... + +a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const a: number = "hello" +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"903d9216256112700b1325b61dcb7717-const a: number = \"hello\"","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false},"semanticDiagnosticsPerFile":[[2,[{"pos":6,"end":7,"code":2322,"category":1,"message":"Type 'string' is not assignable to type 'number'."}]]],"affectedFilesPendingEmit":[2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "903d9216256112700b1325b61dcb7717-const a: number = \"hello\"", + "signature": "903d9216256112700b1325b61dcb7717-const a: number = \"hello\"", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "903d9216256112700b1325b61dcb7717-const a: number = \"hello\"", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "pos": 6, + "end": 7, + "code": 2322, + "category": 1, + "message": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ] + ], + "size": 1184 +} +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: + + +Edit [0]:: Fix error +//// [/home/src/projects/project/a.ts] *modified* +const a = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"312c97b5294d8f3919933705625e91a3-const a = \"hello\";","signature":"64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false},"affectedFilesPendingEmit":[2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ] + ], + "size": 1113 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [1]:: Emit after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.js] *new* +const a = "hello"; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"312c97b5294d8f3919933705625e91a3-const a = \"hello\";","signature":"64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false}} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "size": 1082 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: no Emit run after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: Introduce error +//// [/home/src/projects/project/a.ts] *modified* +const a: number = "hello" + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const a: number = "hello" +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"903d9216256112700b1325b61dcb7717-const a: number = \"hello\"","signature":"a87bf21f13058d40be607df702228523-declare const a: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false},"semanticDiagnosticsPerFile":[[2,[{"pos":6,"end":7,"code":2322,"category":1,"message":"Type 'string' is not assignable to type 'number'."}]]],"affectedFilesPendingEmit":[2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "903d9216256112700b1325b61dcb7717-const a: number = \"hello\"", + "signature": "a87bf21f13058d40be607df702228523-declare const a: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "903d9216256112700b1325b61dcb7717-const a: number = \"hello\"", + "signature": "a87bf21f13058d40be607df702228523-declare const a: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "pos": 6, + "end": 7, + "code": 2322, + "category": 1, + "message": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ] + ], + "size": 1258 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [4]:: Emit when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const a: number = "hello" +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/a.js] *rewrite with same content* +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"903d9216256112700b1325b61dcb7717-const a: number = \"hello\"","signature":"a87bf21f13058d40be607df702228523-declare const a: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false},"semanticDiagnosticsPerFile":[[2,[{"pos":6,"end":7,"code":2322,"category":1,"message":"Type 'string' is not assignable to type 'number'."}]]]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "903d9216256112700b1325b61dcb7717-const a: number = \"hello\"", + "signature": "a87bf21f13058d40be607df702228523-declare const a: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "903d9216256112700b1325b61dcb7717-const a: number = \"hello\"", + "signature": "a87bf21f13058d40be607df702228523-declare const a: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "pos": 6, + "end": 7, + "code": 2322, + "category": 1, + "message": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "size": 1227 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: no Emit run when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const a: number = "hello" +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/semantic-errors.js b/testdata/baselines/reference/tsbuildWatch/noEmit/semantic-errors.js new file mode 100644 index 0000000000..9d815e6d83 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/semantic-errors.js @@ -0,0 +1,298 @@ +currentDirectory::/home/src/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/projects/project/a.ts] *new* +const a: number = "hello" +//// [/home/src/projects/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +} + +tsgo -b -verbose -w +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[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 'tsconfig.json'... + +a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const a: number = "hello" +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":["./a.ts"],"semanticErrors":true} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": "./a.ts" + } + ], + "size": 67, + "semanticErrors": true +} +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: + + +Edit [0]:: Fix error +//// [/home/src/projects/project/a.ts] *modified* +const a = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["./a.ts"]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": "./a.ts" + } + ], + "size": 45 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [1]:: Emit after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'a.js' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.js] *new* +const a = "hello"; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: no Emit run after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: Introduce error +//// [/home/src/projects/project/a.ts] *modified* +const a: number = "hello" + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const a: number = "hello" +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["./a.ts"],"semanticErrors":true} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": "./a.ts" + } + ], + "size": 67, + "semanticErrors": true +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [4]:: Emit when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const a: number = "hello" +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/a.js] *rewrite with same content* +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: no Emit run when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const a: number = "hello" +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/syntax-errors-with-incremental-as-modules.js b/testdata/baselines/reference/tsbuildWatch/noEmit/syntax-errors-with-incremental-as-modules.js new file mode 100644 index 0000000000..737de58a96 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/syntax-errors-with-incremental-as-modules.js @@ -0,0 +1,593 @@ +currentDirectory::/home/src/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/projects/project/a.ts] *new* +export const a = "hello +//// [/home/src/projects/project/b.ts] *new* +export const b = 10; +//// [/home/src/projects/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + +tsgo -b -verbose -w +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[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 'tsconfig.json'... + +a.ts:1:24 - error TS1002: Unterminated string literal. + +1 export const a = "hello +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"1fca32c5d452470ed9d0aa38bbe62e60-export const a = \"hello","907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false},"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[2,3]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "1fca32c5d452470ed9d0aa38bbe62e60-export const a = \"hello", + "signature": "1fca32c5d452470ed9d0aa38bbe62e60-export const a = \"hello", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "semanticDiagnosticsPerFile": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ], + [ + "./b.ts", + "Js", + 3 + ] + ], + "size": 1101 +} +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/projects/project/a.ts +*not cached* /home/src/projects/project/b.ts +Signatures:: + + +Edit [0]:: Fix error +//// [/home/src/projects/project/a.ts] *modified* +export const a = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";","signature":"8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n","impliedNodeFormat":1},"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false},"affectedFilesPendingEmit":[2,3]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ], + [ + "./b.ts", + "Js", + 3 + ] + ], + "size": 1172 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +*refresh* /home/src/projects/project/b.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [1]:: Emit after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = "hello"; + +//// [/home/src/projects/project/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";","signature":"8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n","impliedNodeFormat":1},"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false}} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "270675b5bc3d695752ac89c2c3af7b2e-export const a = \"hello\";", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "size": 1139 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: no Emit run after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: Introduce error +//// [/home/src/projects/project/a.ts] *modified* +const a = "hello + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:17 - error TS1002: Unterminated string literal. + +1 const a = "hello +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello","signature":"8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n","affectsGlobalScope":true,"impliedNodeFormat":1},"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false},"changeFileSet":[2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello", + "signature": "8db48ef76072c70d24f212a9f210f622-export declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "changeFileSet": [ + "./a.ts" + ], + "size": 1189 +} + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/projects/project/a.ts +Signatures:: + + +Edit [4]:: Emit when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:17 - error TS1002: Unterminated string literal. + +1 const a = "hello +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/a.js] *modified* +const a = "hello; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello","signature":"64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n","affectsGlobalScope":true,"impliedNodeFormat":1},"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;"],"options":{"declaration":false},"semanticDiagnosticsPerFile":[1,2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "signature": "907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "options": { + "declaration": false + }, + "semanticDiagnosticsPerFile": [ + "lib.d.ts", + "./a.ts" + ], + "size": 1197 +} + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [5]:: no Emit run when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:17 - error TS1002: Unterminated string literal. + +1 const a = "hello +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/projects/project/a.ts +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/syntax-errors-with-incremental.js b/testdata/baselines/reference/tsbuildWatch/noEmit/syntax-errors-with-incremental.js new file mode 100644 index 0000000000..e9407f92c2 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/syntax-errors-with-incremental.js @@ -0,0 +1,521 @@ +currentDirectory::/home/src/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/projects/project/a.ts] *new* +const a = "hello +//// [/home/src/projects/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + +tsgo -b -verbose -w +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[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 'tsconfig.json'... + +a.ts:1:17 - error TS1002: Unterminated string literal. + +1 const a = "hello +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false},"semanticDiagnosticsPerFile":[1,2],"affectedFilesPendingEmit":[2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello", + "signature": "d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "semanticDiagnosticsPerFile": [ + "lib.d.ts", + "./a.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ] + ], + "size": 1081 +} +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/projects/project/a.ts +Signatures:: + + +Edit [0]:: Fix error +//// [/home/src/projects/project/a.ts] *modified* +const a = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"312c97b5294d8f3919933705625e91a3-const a = \"hello\";","signature":"64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false},"affectedFilesPendingEmit":[2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js", + 2 + ] + ], + "size": 1113 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [1]:: Emit after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.js] *new* +const a = "hello"; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"312c97b5294d8f3919933705625e91a3-const a = \"hello\";","signature":"64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false}} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "312c97b5294d8f3919933705625e91a3-const a = \"hello\";", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "size": 1082 +} + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: no Emit run after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: Introduce error +//// [/home/src/projects/project/a.ts] *modified* +const a = "hello + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:17 - error TS1002: Unterminated string literal. + +1 const a = "hello +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","errors":true,"root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello","signature":"64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false},"changeFileSet":[2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "changeFileSet": [ + "./a.ts" + ], + "size": 1113 +} + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/projects/project/a.ts +Signatures:: + + +Edit [4]:: Emit when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:17 - error TS1002: Unterminated string literal. + +1 const a = "hello +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/a.js] *modified* +const a = "hello; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","errors":true,"root":[2],"fileNames":["lib.d.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello","signature":"64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"declaration":false},"semanticDiagnosticsPerFile":[2]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./a.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./a.ts", + "version": "d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d8a5f356bd133a6882ecbde29426bdcb-const a = \"hello", + "signature": "64868e4042512db835b5b3c3226ab323-declare const a = \"hello\";\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "declaration": false + }, + "semanticDiagnosticsPerFile": [ + "./a.ts" + ], + "size": 1126 +} + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [5]:: no Emit run when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": true, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:17 - error TS1002: Unterminated string literal. + +1 const a = "hello +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/projects/project/a.ts +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/noEmit/syntax-errors.js b/testdata/baselines/reference/tsbuildWatch/noEmit/syntax-errors.js new file mode 100644 index 0000000000..ce2247dff8 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmit/syntax-errors.js @@ -0,0 +1,301 @@ +currentDirectory::/home/src/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/projects/project/a.ts] *new* +const a = "hello +//// [/home/src/projects/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +} + +tsgo -b -verbose -w +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[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 'tsconfig.json'... + +a.ts:1:17 - error TS1002: Unterminated string literal. + +1 const a = "hello +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./a.ts" + ], + "original": "./a.ts" + } + ], + "size": 59 +} +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/projects/project/a.ts +Signatures:: + + +Edit [0]:: Fix error +//// [/home/src/projects/project/a.ts] *modified* +const a = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["./a.ts"]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": "./a.ts" + } + ], + "size": 45 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [1]:: Emit after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'a.js' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/a.js] *new* +const a = "hello"; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: no Emit run after fixing error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'tsconfig.json' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: Introduce error +//// [/home/src/projects/project/a.ts] *modified* +const a = "hello + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'tsconfig.tsbuildinfo' is older than input 'a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:17 - error TS1002: Unterminated string literal. + +1 const a = "hello +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]} +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./a.ts" + ], + "original": "./a.ts" + } + ], + "size": 59 +} + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/projects/project/a.ts +Signatures:: + + +Edit [4]:: Emit when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:17 - error TS1002: Unterminated string literal. + +1 const a = "hello +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/projects/project/a.js] *modified* +const a = "hello; + +//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/projects/project/a.ts +Signatures:: +(computed .d.ts) /home/src/projects/project/a.ts + + +Edit [5]:: no Emit run when error +//// [/home/src/projects/project/tsconfig.json] *modified* +{ + "compilerOptions": { + "incremental": false, + "declaration": false + , "noEmit": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +a.ts:1:17 - error TS1002: Unterminated string literal. + +1 const a = "hello +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/projects/project/a.ts +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError-with-declaration-with-incremental.js b/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError-with-declaration-with-incremental.js new file mode 100644 index 0000000000..11b28b91d7 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError-with-declaration-with-incremental.js @@ -0,0 +1,1015 @@ +currentDirectory::/user/username/projects/noEmitOnError +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] *new* +export interface A { + name: string; +} +//// [/user/username/projects/noEmitOnError/src/main.ts] *new* +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; +//// [/user/username/projects/noEmitOnError/src/other.ts] *new* +console.log("hi"); +export { } +//// [/user/username/projects/noEmitOnError/tsconfig.json] *new* +{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": true, + "noEmitOnError": true, + }, +} + +tsgo -b -w -v +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[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 'tsconfig.json'... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":[[2,4]],"fileNames":["lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}","6ac30e235b3496214b9c209edec4d109-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;","ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }"],"fileIdsList":[[2]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[2,3,4]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../shared/types/db.ts", + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../src/main.ts", + "version": "6ac30e235b3496214b9c209edec4d109-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;", + "signature": "6ac30e235b3496214b9c209edec4d109-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../src/other.ts", + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "../shared/types/db.ts" + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + "Js|Dts", + 2 + ], + [ + "../src/main.ts", + "Js|Dts", + 3 + ], + [ + "../src/other.ts", + "Js|Dts", + 4 + ] + ], + "size": 1369 +} + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /user/username/projects/noEmitOnError/shared/types/db.ts +*not cached* /user/username/projects/noEmitOnError/src/main.ts +*not cached* /user/username/projects/noEmitOnError/src/other.ts +Signatures:: + + +Edit [0]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /user/username/projects/noEmitOnError/shared/types/db.ts +*not cached* /user/username/projects/noEmitOnError/src/main.ts +*not cached* /user/username/projects/noEmitOnError/src/other.ts +Signatures:: + + +Edit [1]:: Fix syntax errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.d.ts] *new* +export interface A { + name: string; +} + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] *new* +export {}; + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const a = { + lastName: 'sdsd' +}; + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.d.ts] *new* +export {}; + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}","signature":"54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n","impliedNodeFormat":1},{"version":"7b22ad4790ccb4d687e7d84c4e640776-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},{"version":"ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../shared/types/db.ts", + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/main.ts", + "version": "7b22ad4790ccb4d687e7d84c4e640776-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7b22ad4790ccb4d687e7d84c4e640776-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/other.ts", + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../shared/types/db.ts" + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "size": 1596 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/noEmitOnError/shared/types/db.ts +*refresh* /user/username/projects/noEmitOnError/src/main.ts +*refresh* /user/username/projects/noEmitOnError/src/other.ts +Signatures:: +(stored at emit) /user/username/projects/noEmitOnError/shared/types/db.ts +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts +(stored at emit) /user/username/projects/noEmitOnError/src/other.ts + + +Edit [2]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + + + +Edit [3]:: semantic errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +const a: string = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project '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] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}","signature":"54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n","impliedNodeFormat":1},{"version":"21728e732a07c83043db4a93ca54350c-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},{"version":"ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"pos":46,"end":47,"code":2322,"category":1,"message":"Type 'number' is not assignable to type 'string'."}]]],"affectedFilesPendingEmit":[3]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../shared/types/db.ts", + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/main.ts", + "version": "21728e732a07c83043db4a93ca54350c-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "21728e732a07c83043db4a93ca54350c-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/other.ts", + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../shared/types/db.ts" + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + [ + "../src/main.ts", + [ + { + "pos": 46, + "end": 47, + "code": 2322, + "category": 1, + "message": "Type 'number' is not assignable to type 'string'." + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + "Js|Dts", + 3 + ] + ], + "size": 1755 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [4]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '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. + + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: Fix semantic errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +const a: string = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] *rewrite with same content* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const a = "hello"; + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}","signature":"54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n","impliedNodeFormat":1},{"version":"53d07f7c18bc0a70f0fe62e902ac491d-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},{"version":"ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../shared/types/db.ts", + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/main.ts", + "version": "53d07f7c18bc0a70f0fe62e902ac491d-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "53d07f7c18bc0a70f0fe62e902ac491d-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/other.ts", + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../shared/types/db.ts" + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "size": 1587 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [6]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + + + +Edit [7]:: dts errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +export const a = class { private p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +2 export const a = class { private p = 10; }; +   ~ + + src/main.ts:2:14 - Add a type annotation to the variable a. + 2 export const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}","signature":"54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n","impliedNodeFormat":1},{"version":"6cc24027429965f7fa7493c1b9efd532-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };","signature":"86ced526ce468674cf13e9bae78ff450-export declare const a: {\n new (): {\n p: number;\n };\n};\n\n(53,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(53,1): error9027: Add a type annotation to the variable a.","impliedNodeFormat":1},{"version":"ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"emitDiagnosticsPerFile":[[3,[{"pos":53,"end":54,"code":4094,"category":1,"message":"Property 'p' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":53,"end":54,"code":9027,"category":1,"message":"Add a type annotation to the variable a."}]}]]],"affectedFilesPendingEmit":[[3,17]]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../shared/types/db.ts", + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/main.ts", + "version": "6cc24027429965f7fa7493c1b9efd532-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };", + "signature": "86ced526ce468674cf13e9bae78ff450-export declare const a: {\n new (): {\n p: number;\n };\n};\n\n(53,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(53,1): error9027: Add a type annotation to the variable a.", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6cc24027429965f7fa7493c1b9efd532-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };", + "signature": "86ced526ce468674cf13e9bae78ff450-export declare const a: {\n new (): {\n p: number;\n };\n};\n\n(53,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(53,1): error9027: Add a type annotation to the variable a.", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/other.ts", + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../shared/types/db.ts" + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "emitDiagnosticsPerFile": [ + [ + "../src/main.ts", + [ + { + "pos": 53, + "end": 54, + "code": 4094, + "category": 1, + "message": "Property 'p' of exported anonymous class type may not be private or protected.", + "relatedInformation": [ + { + "pos": 53, + "end": 54, + "code": 9027, + "category": 1, + "message": "Add a type annotation to the variable a." + } + ] + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + "Js|DtsEmit", + [ + 3, + 17 + ] + ] + ], + "size": 2150 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [8]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +2 export const a = class { private p = 10; }; +   ~ + + src/main.ts:2:14 - Add a type annotation to the variable a. + 2 export const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [9]:: Fix dts errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +export const a = class { p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] *modified* +export declare const a: { + new (): { + p: number; + }; +}; + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +const a = class { + p = 10; +}; +exports.a = a; + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}","signature":"54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n","impliedNodeFormat":1},{"version":"7cd05f722edaaaf0c0efca32b04362e8-import { A } from \"../shared/types/db\";\nexport const a = class { p = 10; };","signature":"1aa32af20adf1f5d970642bd31541eeb-export declare const a: {\n new (): {\n p: number;\n };\n};\n","impliedNodeFormat":1},{"version":"ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../shared/types/db.ts", + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "54943827690173f946e7a76cd9b9eb27-export interface A {\n name: string;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/main.ts", + "version": "7cd05f722edaaaf0c0efca32b04362e8-import { A } from \"../shared/types/db\";\nexport const a = class { p = 10; };", + "signature": "1aa32af20adf1f5d970642bd31541eeb-export declare const a: {\n new (): {\n p: number;\n };\n};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7cd05f722edaaaf0c0efca32b04362e8-import { A } from \"../shared/types/db\";\nexport const a = class { p = 10; };", + "signature": "1aa32af20adf1f5d970642bd31541eeb-export declare const a: {\n new (): {\n p: number;\n };\n};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/other.ts", + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../shared/types/db.ts" + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "size": 1656 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [10]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + diff --git a/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError-with-declaration.js b/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError-with-declaration.js new file mode 100644 index 0000000000..180edba04d --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError-with-declaration.js @@ -0,0 +1,634 @@ +currentDirectory::/user/username/projects/noEmitOnError +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] *new* +export interface A { + name: string; +} +//// [/user/username/projects/noEmitOnError/src/main.ts] *new* +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; +//// [/user/username/projects/noEmitOnError/src/other.ts] *new* +console.log("hi"); +export { } +//// [/user/username/projects/noEmitOnError/tsconfig.json] *new* +{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": true, + "incremental": false, + "noEmitOnError": true, + }, +} + +tsgo -b -w -v +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[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 'tsconfig.json'... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "../shared/types/db.ts" + ], + "original": "../shared/types/db.ts" + }, + { + "files": [ + "../src/main.ts" + ], + "original": "../src/main.ts" + }, + { + "files": [ + "../src/other.ts" + ], + "original": "../src/other.ts" + } + ], + "size": 109 +} + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /user/username/projects/noEmitOnError/shared/types/db.ts +*not cached* /user/username/projects/noEmitOnError/src/main.ts +*not cached* /user/username/projects/noEmitOnError/src/other.ts +Signatures:: + + +Edit [0]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /user/username/projects/noEmitOnError/shared/types/db.ts +*not cached* /user/username/projects/noEmitOnError/src/main.ts +*not cached* /user/username/projects/noEmitOnError/src/other.ts +Signatures:: + + +Edit [1]:: Fix syntax errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.d.ts] *new* +export interface A { + name: string; +} + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] *new* +export {}; + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const a = { + lastName: 'sdsd' +}; + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.d.ts] *new* +export {}; + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts" + ], + "original": "../shared/types/db.ts" + }, + { + "files": [ + "../src/main.ts" + ], + "original": "../src/main.ts" + }, + { + "files": [ + "../src/other.ts" + ], + "original": "../src/other.ts" + } + ], + "size": 95 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/noEmitOnError/shared/types/db.ts +*refresh* /user/username/projects/noEmitOnError/src/main.ts +*refresh* /user/username/projects/noEmitOnError/src/other.ts +Signatures:: +(stored at emit) /user/username/projects/noEmitOnError/shared/types/db.ts +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts +(stored at emit) /user/username/projects/noEmitOnError/src/other.ts + + +Edit [2]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.d.ts] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/other.d.ts] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: semantic errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +const a: string = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project '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] *modified* +{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"semanticErrors":true} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts" + ], + "original": "../shared/types/db.ts" + }, + { + "files": [ + "../src/main.ts" + ], + "original": "../src/main.ts" + }, + { + "files": [ + "../src/other.ts" + ], + "original": "../src/other.ts" + } + ], + "size": 117, + "semanticErrors": true +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [4]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '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. + + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: Fix semantic errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +const a: string = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.d.ts] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] *rewrite with same content* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const a = "hello"; + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.d.ts] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts" + ], + "original": "../shared/types/db.ts" + }, + { + "files": [ + "../src/main.ts" + ], + "original": "../src/main.ts" + }, + { + "files": [ + "../src/other.ts" + ], + "original": "../src/other.ts" + } + ], + "size": 95 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [6]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.d.ts] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/other.d.ts] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [7]:: dts errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +export const a = class { private p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +2 export const a = class { private p = 10; }; +   ~ + + src/main.ts:2:14 - Add a type annotation to the variable a. + 2 export const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "../shared/types/db.ts" + ], + "original": "../shared/types/db.ts" + }, + { + "files": [ + "../src/main.ts" + ], + "original": "../src/main.ts" + }, + { + "files": [ + "../src/other.ts" + ], + "original": "../src/other.ts" + } + ], + "size": 109 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [8]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +2 export const a = class { private p = 10; }; +   ~ + + src/main.ts:2:14 - Add a type annotation to the variable a. + 2 export const a = class { private p = 10; }; +    ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [9]:: Fix dts errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +export const a = class { p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.d.ts] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] *modified* +export declare const a: { + new (): { + p: number; + }; +}; + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +const a = class { + p = 10; +}; +exports.a = a; + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.d.ts] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts" + ], + "original": "../shared/types/db.ts" + }, + { + "files": [ + "../src/main.ts" + ], + "original": "../src/main.ts" + }, + { + "files": [ + "../src/other.ts" + ], + "original": "../src/other.ts" + } + ], + "size": 95 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [10]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.d.ts] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/other.d.ts] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError-with-incremental.js b/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError-with-incremental.js new file mode 100644 index 0000000000..2e165e22e4 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError-with-incremental.js @@ -0,0 +1,892 @@ +currentDirectory::/user/username/projects/noEmitOnError +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] *new* +export interface A { + name: string; +} +//// [/user/username/projects/noEmitOnError/src/main.ts] *new* +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; +//// [/user/username/projects/noEmitOnError/src/other.ts] *new* +console.log("hi"); +export { } +//// [/user/username/projects/noEmitOnError/tsconfig.json] *new* +{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": true, + "noEmitOnError": true, + }, +} + +tsgo -b -w -v +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[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 'tsconfig.json'... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":[[2,4]],"fileNames":["lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}","6ac30e235b3496214b9c209edec4d109-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;","ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }"],"fileIdsList":[[2]],"options":{"declaration":false,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[2,3,4]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../shared/types/db.ts", + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../src/main.ts", + "version": "6ac30e235b3496214b9c209edec4d109-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;", + "signature": "6ac30e235b3496214b9c209edec4d109-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../src/other.ts", + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "../shared/types/db.ts" + ] + ], + "options": { + "declaration": false, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + "Js", + 2 + ], + [ + "../src/main.ts", + "Js", + 3 + ], + [ + "../src/other.ts", + "Js", + 4 + ] + ], + "size": 1370 +} + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /user/username/projects/noEmitOnError/shared/types/db.ts +*not cached* /user/username/projects/noEmitOnError/src/main.ts +*not cached* /user/username/projects/noEmitOnError/src/other.ts +Signatures:: + + +Edit [0]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /user/username/projects/noEmitOnError/shared/types/db.ts +*not cached* /user/username/projects/noEmitOnError/src/main.ts +*not cached* /user/username/projects/noEmitOnError/src/other.ts +Signatures:: + + +Edit [1]:: Fix syntax errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const a = { + lastName: 'sdsd' +}; + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}",{"version":"7b22ad4790ccb4d687e7d84c4e640776-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }"],"fileIdsList":[[2]],"options":{"declaration":false,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../shared/types/db.ts", + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../src/main.ts", + "version": "7b22ad4790ccb4d687e7d84c4e640776-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7b22ad4790ccb4d687e7d84c4e640776-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/other.ts", + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "../shared/types/db.ts" + ] + ], + "options": { + "declaration": false, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "size": 1377 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/noEmitOnError/shared/types/db.ts +*refresh* /user/username/projects/noEmitOnError/src/main.ts +*refresh* /user/username/projects/noEmitOnError/src/other.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [2]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + + + +Edit [3]:: semantic errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +const a: string = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project '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] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}",{"version":"21728e732a07c83043db4a93ca54350c-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }"],"fileIdsList":[[2]],"options":{"declaration":false,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"pos":46,"end":47,"code":2322,"category":1,"message":"Type 'number' is not assignable to type 'string'."}]]],"affectedFilesPendingEmit":[3]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../shared/types/db.ts", + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../src/main.ts", + "version": "21728e732a07c83043db4a93ca54350c-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "21728e732a07c83043db4a93ca54350c-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/other.ts", + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "../shared/types/db.ts" + ] + ], + "options": { + "declaration": false, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + [ + "../src/main.ts", + [ + { + "pos": 46, + "end": 47, + "code": 2322, + "category": 1, + "message": "Type 'number' is not assignable to type 'string'." + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + "Js", + 3 + ] + ], + "size": 1536 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [4]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '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. + + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: Fix semantic errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +const a: string = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const a = "hello"; + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}",{"version":"53d07f7c18bc0a70f0fe62e902ac491d-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }"],"fileIdsList":[[2]],"options":{"declaration":false,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../shared/types/db.ts", + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../src/main.ts", + "version": "53d07f7c18bc0a70f0fe62e902ac491d-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "53d07f7c18bc0a70f0fe62e902ac491d-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/other.ts", + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "../shared/types/db.ts" + ] + ], + "options": { + "declaration": false, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "size": 1368 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [6]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + + + +Edit [7]:: dts errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +export const a = class { private p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +const a = class { + p = 10; +}; +exports.a = a; + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}",{"version":"6cc24027429965f7fa7493c1b9efd532-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };","signature":"86ced526ce468674cf13e9bae78ff450-export declare const a: {\n new (): {\n p: number;\n };\n};\n\n(53,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(53,1): error9027: Add a type annotation to the variable a.","impliedNodeFormat":1},"ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }"],"fileIdsList":[[2]],"options":{"declaration":false,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../shared/types/db.ts", + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../src/main.ts", + "version": "6cc24027429965f7fa7493c1b9efd532-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };", + "signature": "86ced526ce468674cf13e9bae78ff450-export declare const a: {\n new (): {\n p: number;\n };\n};\n\n(53,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(53,1): error9027: Add a type annotation to the variable a.", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6cc24027429965f7fa7493c1b9efd532-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };", + "signature": "86ced526ce468674cf13e9bae78ff450-export declare const a: {\n new (): {\n p: number;\n };\n};\n\n(53,1): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(53,1): error9027: Add a type annotation to the variable a.", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/other.ts", + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "../shared/types/db.ts" + ] + ], + "options": { + "declaration": false, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "size": 1605 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [8]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + + + +Edit [9]:: Fix dts errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +export const a = class { p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *rewrite with same content* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}",{"version":"7cd05f722edaaaf0c0efca32b04362e8-import { A } from \"../shared/types/db\";\nexport const a = class { p = 10; };","signature":"1aa32af20adf1f5d970642bd31541eeb-export declare const a: {\n new (): {\n p: number;\n };\n};\n","impliedNodeFormat":1},"ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }"],"fileIdsList":[[2]],"options":{"declaration":false,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../shared/types/db.ts", + "version": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "signature": "4dba75627964632af83642176cf4b611-export interface A {\n name: string;\n}", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../src/main.ts", + "version": "7cd05f722edaaaf0c0efca32b04362e8-import { A } from \"../shared/types/db\";\nexport const a = class { p = 10; };", + "signature": "1aa32af20adf1f5d970642bd31541eeb-export declare const a: {\n new (): {\n p: number;\n };\n};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7cd05f722edaaaf0c0efca32b04362e8-import { A } from \"../shared/types/db\";\nexport const a = class { p = 10; };", + "signature": "1aa32af20adf1f5d970642bd31541eeb-export declare const a: {\n new (): {\n p: number;\n };\n};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/other.ts", + "version": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "signature": "ac4084c9455da7165ada8cb39f592843-console.log(\"hi\");\nexport { }", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "../shared/types/db.ts" + ] + ], + "options": { + "declaration": false, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "size": 1437 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [10]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[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 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + diff --git a/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError.js b/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError.js new file mode 100644 index 0000000000..3908cd7669 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError.js @@ -0,0 +1,542 @@ +currentDirectory::/user/username/projects/noEmitOnError +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] *new* +export interface A { + name: string; +} +//// [/user/username/projects/noEmitOnError/src/main.ts] *new* +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; +//// [/user/username/projects/noEmitOnError/src/other.ts] *new* +console.log("hi"); +export { } +//// [/user/username/projects/noEmitOnError/tsconfig.json] *new* +{ + "compilerOptions": { + "outDir": "./dev-build", + "declaration": false, + "incremental": false, + "noEmitOnError": true, + }, +} + +tsgo -b -w -v +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[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 'tsconfig.json'... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "../shared/types/db.ts" + ], + "original": "../shared/types/db.ts" + }, + { + "files": [ + "../src/main.ts" + ], + "original": "../src/main.ts" + }, + { + "files": [ + "../src/other.ts" + ], + "original": "../src/other.ts" + } + ], + "size": 109 +} + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /user/username/projects/noEmitOnError/shared/types/db.ts +*not cached* /user/username/projects/noEmitOnError/src/main.ts +*not cached* /user/username/projects/noEmitOnError/src/other.ts +Signatures:: + + +Edit [0]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + +tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /user/username/projects/noEmitOnError/shared/types/db.ts +*not cached* /user/username/projects/noEmitOnError/src/main.ts +*not cached* /user/username/projects/noEmitOnError/src/other.ts +Signatures:: + + +Edit [1]:: Fix syntax errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const a = { + lastName: 'sdsd' +}; + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts" + ], + "original": "../shared/types/db.ts" + }, + { + "files": [ + "../src/main.ts" + ], + "original": "../src/main.ts" + }, + { + "files": [ + "../src/other.ts" + ], + "original": "../src/other.ts" + } + ], + "size": 95 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/noEmitOnError/shared/types/db.ts +*refresh* /user/username/projects/noEmitOnError/src/main.ts +*refresh* /user/username/projects/noEmitOnError/src/other.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [2]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: semantic errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +const a: string = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project '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] *modified* +{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"semanticErrors":true} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts" + ], + "original": "../shared/types/db.ts" + }, + { + "files": [ + "../src/main.ts" + ], + "original": "../src/main.ts" + }, + { + "files": [ + "../src/other.ts" + ], + "original": "../src/other.ts" + } + ], + "size": 117, + "semanticErrors": true +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [4]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '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. + + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: Fix semantic errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +const a: string = "hello"; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const a = "hello"; + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]} +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../shared/types/db.ts" + ], + "original": "../shared/types/db.ts" + }, + { + "files": [ + "../src/main.ts" + ], + "original": "../src/main.ts" + }, + { + "files": [ + "../src/other.ts" + ], + "original": "../src/other.ts" + } + ], + "size": 95 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [6]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [7]:: dts errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +export const a = class { private p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +const a = class { + p = 10; +}; +exports.a = a; + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [8]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [9]:: Fix dts errors +//// [/user/username/projects/noEmitOnError/src/main.ts] *modified* +import { A } from "../shared/types/db"; +export const a = class { p = 10; }; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *rewrite with same content* +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/noEmitOnError/src/main.ts +Signatures:: +(computed .d.ts) /user/username/projects/noEmitOnError/src/main.ts + + +Edit [10]:: No Change +//// [/user/username/projects/noEmitOnError/src/main.ts] *mTime changed* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *mTime changed* +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *mTime changed* + +tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/programUpdates/declarationEmitErrors-introduceError-when-file-with-no-error-changes.js b/testdata/baselines/reference/tsbuildWatch/programUpdates/declarationEmitErrors-introduceError-when-file-with-no-error-changes.js new file mode 100644 index 0000000000..100bdbf0cb --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/programUpdates/declarationEmitErrors-introduceError-when-file-with-no-error-changes.js @@ -0,0 +1,429 @@ +currentDirectory::/user/username/projects/solution +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/solution/app/fileWithError.ts] *new* + export var myClassWithError = class { + tags() { } + + }; +//// [/user/username/projects/solution/app/fileWithoutError.ts] *new* +export class myClass { } +//// [/user/username/projects/solution/app/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true + } +} + +tsgo -b -w app +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/solution/app/fileWithError.d.ts] *new* +export declare var myClassWithError: { + new (): { + tags(): void; + }; +}; + +//// [/user/username/projects/solution/app/fileWithError.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +var myClassWithError = class { + tags() { } +}; +exports.myClassWithError = myClassWithError; + +//// [/user/username/projects/solution/app/fileWithoutError.d.ts] *new* +export declare class myClass { +} + +//// [/user/username/projects/solution/app/fileWithoutError.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClass = void 0; +class myClass { +} +exports.myClass = myClass; + +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./fileWithError.ts","./fileWithoutError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d4354dbd4fafaa0ad3a5b65966837613- export var myClassWithError = class {\n tags() { }\n\n };","signature":"767d370715ef9e7e7e190b09dbf6cb11-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n","impliedNodeFormat":1},{"version":"181818468a51a2348d25d30b10b6b1bb-export class myClass { }","signature":"00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./fileWithoutError.d.ts"} +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithError.ts", + "version": "d4354dbd4fafaa0ad3a5b65966837613- export var myClassWithError = class {\n tags() { }\n\n };", + "signature": "767d370715ef9e7e7e190b09dbf6cb11-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d4354dbd4fafaa0ad3a5b65966837613- export var myClassWithError = class {\n tags() { }\n\n };", + "signature": "767d370715ef9e7e7e190b09dbf6cb11-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithoutError.ts", + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./fileWithoutError.d.ts", + "size": 1460 +} + +app/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/solution/app/fileWithError.ts +*refresh* /user/username/projects/solution/app/fileWithoutError.ts +Signatures:: +(stored at emit) /user/username/projects/solution/app/fileWithError.ts +(stored at emit) /user/username/projects/solution/app/fileWithoutError.ts + + +Edit [0]:: Introduce error +//// [/user/username/projects/solution/app/fileWithError.ts] *modified* +export var myClassWithError = class { + tags() { } + private p = 12 +}; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 export var myClassWithError = class { +   ~~~~~~~~~~~~~~~~ + + app/fileWithError.ts:1:12 - Add a type annotation to the variable myClassWithError. + 1 export var myClassWithError = class { +    ~~~~~~~~~~~~~~~~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/user/username/projects/solution/app/fileWithError.d.ts] *modified* +export declare var myClassWithError: { + new (): { + tags(): void; + p: number; + }; +}; + +//// [/user/username/projects/solution/app/fileWithError.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +var myClassWithError = class { + tags() { } + p = 12; +}; +exports.myClassWithError = myClassWithError; + +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./fileWithError.ts","./fileWithoutError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};","signature":"4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.","impliedNodeFormat":1},{"version":"181818468a51a2348d25d30b10b6b1bb-export class myClass { }","signature":"00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n","impliedNodeFormat":1}],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"pos":11,"end":27,"code":4094,"category":1,"message":"Property 'p' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":11,"end":27,"code":9027,"category":1,"message":"Add a type annotation to the variable myClassWithError."}]}]]],"latestChangedDtsFile":"./fileWithError.d.ts","emitSignatures":[[2,"b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n"]]} +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithError.ts", + "version": "02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};", + "signature": "4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};", + "signature": "4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithoutError.ts", + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "emitDiagnosticsPerFile": [ + [ + "./fileWithError.ts", + [ + { + "pos": 11, + "end": 27, + "code": 4094, + "category": 1, + "message": "Property 'p' of exported anonymous class type may not be private or protected.", + "relatedInformation": [ + { + "pos": 11, + "end": 27, + "code": 9027, + "category": 1, + "message": "Add a type annotation to the variable myClassWithError." + } + ] + } + ] + ] + ], + "latestChangedDtsFile": "./fileWithError.d.ts", + "emitSignatures": [ + { + "file": "./fileWithError.ts", + "signature": "b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n", + "original": [ + 2, + "b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n" + ] + } + ], + "size": 2104 +} + +app/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/solution/app/fileWithError.ts +Signatures:: +(computed .d.ts) /user/username/projects/solution/app/fileWithError.ts + + +Edit [1]:: Change fileWithoutError +//// [/user/username/projects/solution/app/fileWithoutError.ts] *modified* +export class myClass2 { } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 export var myClassWithError = class { +   ~~~~~~~~~~~~~~~~ + + app/fileWithError.ts:1:12 - Add a type annotation to the variable myClassWithError. + 1 export var myClassWithError = class { +    ~~~~~~~~~~~~~~~~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/user/username/projects/solution/app/fileWithoutError.d.ts] *modified* +export declare class myClass2 { +} + +//// [/user/username/projects/solution/app/fileWithoutError.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClass2 = void 0; +class myClass2 { +} +exports.myClass2 = myClass2; + +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./fileWithError.ts","./fileWithoutError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};","signature":"4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.","impliedNodeFormat":1},{"version":"4494620e0f3a6379be16c2477b86b919-export class myClass2 { }","signature":"cdd06be46566b8da2e1a2b5b161ff551-export declare class myClass2 {\n}\n","impliedNodeFormat":1}],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"pos":11,"end":27,"code":4094,"category":1,"message":"Property 'p' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":11,"end":27,"code":9027,"category":1,"message":"Add a type annotation to the variable myClassWithError."}]}]]],"latestChangedDtsFile":"./fileWithoutError.d.ts","emitSignatures":[[2,"b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n"]]} +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithError.ts", + "version": "02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};", + "signature": "4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};", + "signature": "4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithoutError.ts", + "version": "4494620e0f3a6379be16c2477b86b919-export class myClass2 { }", + "signature": "cdd06be46566b8da2e1a2b5b161ff551-export declare class myClass2 {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4494620e0f3a6379be16c2477b86b919-export class myClass2 { }", + "signature": "cdd06be46566b8da2e1a2b5b161ff551-export declare class myClass2 {\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "emitDiagnosticsPerFile": [ + [ + "./fileWithError.ts", + [ + { + "pos": 11, + "end": 27, + "code": 4094, + "category": 1, + "message": "Property 'p' of exported anonymous class type may not be private or protected.", + "relatedInformation": [ + { + "pos": 11, + "end": 27, + "code": 9027, + "category": 1, + "message": "Add a type annotation to the variable myClassWithError." + } + ] + } + ] + ] + ], + "latestChangedDtsFile": "./fileWithoutError.d.ts", + "emitSignatures": [ + { + "file": "./fileWithError.ts", + "signature": "b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n", + "original": [ + 2, + "b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n" + ] + } + ], + "size": 2109 +} + +app/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/solution/app/fileWithoutError.ts +Signatures:: +(computed .d.ts) /user/username/projects/solution/app/fileWithoutError.ts diff --git a/testdata/baselines/reference/tsbuildWatch/programUpdates/declarationEmitErrors-introduceError-when-fixing-errors-only-changed-file-is-emitted.js b/testdata/baselines/reference/tsbuildWatch/programUpdates/declarationEmitErrors-introduceError-when-fixing-errors-only-changed-file-is-emitted.js new file mode 100644 index 0000000000..a1c5d40a3f --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/programUpdates/declarationEmitErrors-introduceError-when-fixing-errors-only-changed-file-is-emitted.js @@ -0,0 +1,394 @@ +currentDirectory::/user/username/projects/solution +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/solution/app/fileWithError.ts] *new* + export var myClassWithError = class { + tags() { } + + }; +//// [/user/username/projects/solution/app/fileWithoutError.ts] *new* +export class myClass { } +//// [/user/username/projects/solution/app/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true + } +} + +tsgo -b -w app +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/solution/app/fileWithError.d.ts] *new* +export declare var myClassWithError: { + new (): { + tags(): void; + }; +}; + +//// [/user/username/projects/solution/app/fileWithError.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +var myClassWithError = class { + tags() { } +}; +exports.myClassWithError = myClassWithError; + +//// [/user/username/projects/solution/app/fileWithoutError.d.ts] *new* +export declare class myClass { +} + +//// [/user/username/projects/solution/app/fileWithoutError.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClass = void 0; +class myClass { +} +exports.myClass = myClass; + +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./fileWithError.ts","./fileWithoutError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d4354dbd4fafaa0ad3a5b65966837613- export var myClassWithError = class {\n tags() { }\n\n };","signature":"767d370715ef9e7e7e190b09dbf6cb11-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n","impliedNodeFormat":1},{"version":"181818468a51a2348d25d30b10b6b1bb-export class myClass { }","signature":"00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./fileWithoutError.d.ts"} +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithError.ts", + "version": "d4354dbd4fafaa0ad3a5b65966837613- export var myClassWithError = class {\n tags() { }\n\n };", + "signature": "767d370715ef9e7e7e190b09dbf6cb11-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d4354dbd4fafaa0ad3a5b65966837613- export var myClassWithError = class {\n tags() { }\n\n };", + "signature": "767d370715ef9e7e7e190b09dbf6cb11-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithoutError.ts", + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./fileWithoutError.d.ts", + "size": 1460 +} + +app/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/solution/app/fileWithError.ts +*refresh* /user/username/projects/solution/app/fileWithoutError.ts +Signatures:: +(stored at emit) /user/username/projects/solution/app/fileWithError.ts +(stored at emit) /user/username/projects/solution/app/fileWithoutError.ts + + +Edit [0]:: Introduce error +//// [/user/username/projects/solution/app/fileWithError.ts] *modified* +export var myClassWithError = class { + tags() { } + private p = 12 +}; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 export var myClassWithError = class { +   ~~~~~~~~~~~~~~~~ + + app/fileWithError.ts:1:12 - Add a type annotation to the variable myClassWithError. + 1 export var myClassWithError = class { +    ~~~~~~~~~~~~~~~~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/user/username/projects/solution/app/fileWithError.d.ts] *modified* +export declare var myClassWithError: { + new (): { + tags(): void; + p: number; + }; +}; + +//// [/user/username/projects/solution/app/fileWithError.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +var myClassWithError = class { + tags() { } + p = 12; +}; +exports.myClassWithError = myClassWithError; + +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./fileWithError.ts","./fileWithoutError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};","signature":"4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.","impliedNodeFormat":1},{"version":"181818468a51a2348d25d30b10b6b1bb-export class myClass { }","signature":"00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n","impliedNodeFormat":1}],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"pos":11,"end":27,"code":4094,"category":1,"message":"Property 'p' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":11,"end":27,"code":9027,"category":1,"message":"Add a type annotation to the variable myClassWithError."}]}]]],"latestChangedDtsFile":"./fileWithError.d.ts","emitSignatures":[[2,"b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n"]]} +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithError.ts", + "version": "02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};", + "signature": "4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};", + "signature": "4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithoutError.ts", + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "emitDiagnosticsPerFile": [ + [ + "./fileWithError.ts", + [ + { + "pos": 11, + "end": 27, + "code": 4094, + "category": 1, + "message": "Property 'p' of exported anonymous class type may not be private or protected.", + "relatedInformation": [ + { + "pos": 11, + "end": 27, + "code": 9027, + "category": 1, + "message": "Add a type annotation to the variable myClassWithError." + } + ] + } + ] + ] + ], + "latestChangedDtsFile": "./fileWithError.d.ts", + "emitSignatures": [ + { + "file": "./fileWithError.ts", + "signature": "b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n", + "original": [ + 2, + "b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n" + ] + } + ], + "size": 2104 +} + +app/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/solution/app/fileWithError.ts +Signatures:: +(computed .d.ts) /user/username/projects/solution/app/fileWithError.ts + + +Edit [1]:: Fix error +//// [/user/username/projects/solution/app/fileWithError.ts] *modified* +export var myClassWithError = class { + tags() { } + +}; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/solution/app/fileWithError.d.ts] *modified* +export declare var myClassWithError: { + new (): { + tags(): void; + }; +}; + +//// [/user/username/projects/solution/app/fileWithError.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +var myClassWithError = class { + tags() { } +}; +exports.myClassWithError = myClassWithError; + +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./fileWithError.ts","./fileWithoutError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f90afddb8044264e464dd4c18c7b59a-export var myClassWithError = class {\n tags() { }\n \n};","signature":"767d370715ef9e7e7e190b09dbf6cb11-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n","impliedNodeFormat":1},{"version":"181818468a51a2348d25d30b10b6b1bb-export class myClass { }","signature":"00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./fileWithError.d.ts"} +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithError.ts", + "version": "4f90afddb8044264e464dd4c18c7b59a-export var myClassWithError = class {\n tags() { }\n \n};", + "signature": "767d370715ef9e7e7e190b09dbf6cb11-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4f90afddb8044264e464dd4c18c7b59a-export var myClassWithError = class {\n tags() { }\n \n};", + "signature": "767d370715ef9e7e7e190b09dbf6cb11-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithoutError.ts", + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./fileWithError.d.ts", + "size": 1419 +} + +app/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/solution/app/fileWithError.ts +Signatures:: +(computed .d.ts) /user/username/projects/solution/app/fileWithError.ts diff --git a/testdata/baselines/reference/tsbuildWatch/programUpdates/declarationEmitErrors-when-file-with-no-error-changes.js b/testdata/baselines/reference/tsbuildWatch/programUpdates/declarationEmitErrors-when-file-with-no-error-changes.js new file mode 100644 index 0000000000..238dfdebf7 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/programUpdates/declarationEmitErrors-when-file-with-no-error-changes.js @@ -0,0 +1,328 @@ +currentDirectory::/user/username/projects/solution +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/solution/app/fileWithError.ts] *new* +export var myClassWithError = class { + tags() { } + private p = 12 +}; +//// [/user/username/projects/solution/app/fileWithoutError.ts] *new* +export class myClass { } +//// [/user/username/projects/solution/app/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true + } +} + +tsgo -b -w app +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 export var myClassWithError = class { +   ~~~~~~~~~~~~~~~~ + + app/fileWithError.ts:1:12 - Add a type annotation to the variable myClassWithError. + 1 export var myClassWithError = class { +    ~~~~~~~~~~~~~~~~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/solution/app/fileWithError.d.ts] *new* +export declare var myClassWithError: { + new (): { + tags(): void; + p: number; + }; +}; + +//// [/user/username/projects/solution/app/fileWithError.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +var myClassWithError = class { + tags() { } + p = 12; +}; +exports.myClassWithError = myClassWithError; + +//// [/user/username/projects/solution/app/fileWithoutError.d.ts] *new* +export declare class myClass { +} + +//// [/user/username/projects/solution/app/fileWithoutError.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClass = void 0; +class myClass { +} +exports.myClass = myClass; + +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./fileWithError.ts","./fileWithoutError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};","signature":"4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.","impliedNodeFormat":1},{"version":"181818468a51a2348d25d30b10b6b1bb-export class myClass { }","signature":"00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n","impliedNodeFormat":1}],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"pos":11,"end":27,"code":4094,"category":1,"message":"Property 'p' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":11,"end":27,"code":9027,"category":1,"message":"Add a type annotation to the variable myClassWithError."}]}]]],"latestChangedDtsFile":"./fileWithoutError.d.ts","emitSignatures":[[2,"b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n"]]} +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithError.ts", + "version": "02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};", + "signature": "4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};", + "signature": "4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithoutError.ts", + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "emitDiagnosticsPerFile": [ + [ + "./fileWithError.ts", + [ + { + "pos": 11, + "end": 27, + "code": 4094, + "category": 1, + "message": "Property 'p' of exported anonymous class type may not be private or protected.", + "relatedInformation": [ + { + "pos": 11, + "end": 27, + "code": 9027, + "category": 1, + "message": "Add a type annotation to the variable myClassWithError." + } + ] + } + ] + ] + ], + "latestChangedDtsFile": "./fileWithoutError.d.ts", + "emitSignatures": [ + { + "file": "./fileWithError.ts", + "signature": "b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n", + "original": [ + 2, + "b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n" + ] + } + ], + "size": 2107 +} + +app/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/solution/app/fileWithError.ts +*refresh* /user/username/projects/solution/app/fileWithoutError.ts +Signatures:: +(stored at emit) /user/username/projects/solution/app/fileWithError.ts +(stored at emit) /user/username/projects/solution/app/fileWithoutError.ts + + +Edit [0]:: Change fileWithoutError +//// [/user/username/projects/solution/app/fileWithoutError.ts] *modified* +export class myClass2 { } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 export var myClassWithError = class { +   ~~~~~~~~~~~~~~~~ + + app/fileWithError.ts:1:12 - Add a type annotation to the variable myClassWithError. + 1 export var myClassWithError = class { +    ~~~~~~~~~~~~~~~~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/user/username/projects/solution/app/fileWithoutError.d.ts] *modified* +export declare class myClass2 { +} + +//// [/user/username/projects/solution/app/fileWithoutError.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClass2 = void 0; +class myClass2 { +} +exports.myClass2 = myClass2; + +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./fileWithError.ts","./fileWithoutError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};","signature":"4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.","impliedNodeFormat":1},{"version":"4494620e0f3a6379be16c2477b86b919-export class myClass2 { }","signature":"cdd06be46566b8da2e1a2b5b161ff551-export declare class myClass2 {\n}\n","impliedNodeFormat":1}],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"pos":11,"end":27,"code":4094,"category":1,"message":"Property 'p' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":11,"end":27,"code":9027,"category":1,"message":"Add a type annotation to the variable myClassWithError."}]}]]],"latestChangedDtsFile":"./fileWithoutError.d.ts","emitSignatures":[[2,"b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n"]]} +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithError.ts", + "version": "02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};", + "signature": "4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};", + "signature": "4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithoutError.ts", + "version": "4494620e0f3a6379be16c2477b86b919-export class myClass2 { }", + "signature": "cdd06be46566b8da2e1a2b5b161ff551-export declare class myClass2 {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4494620e0f3a6379be16c2477b86b919-export class myClass2 { }", + "signature": "cdd06be46566b8da2e1a2b5b161ff551-export declare class myClass2 {\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "emitDiagnosticsPerFile": [ + [ + "./fileWithError.ts", + [ + { + "pos": 11, + "end": 27, + "code": 4094, + "category": 1, + "message": "Property 'p' of exported anonymous class type may not be private or protected.", + "relatedInformation": [ + { + "pos": 11, + "end": 27, + "code": 9027, + "category": 1, + "message": "Add a type annotation to the variable myClassWithError." + } + ] + } + ] + ] + ], + "latestChangedDtsFile": "./fileWithoutError.d.ts", + "emitSignatures": [ + { + "file": "./fileWithError.ts", + "signature": "b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n", + "original": [ + 2, + "b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n" + ] + } + ], + "size": 2109 +} + +app/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/solution/app/fileWithoutError.ts +Signatures:: +(computed .d.ts) /user/username/projects/solution/app/fileWithoutError.ts diff --git a/testdata/baselines/reference/tsbuildWatch/programUpdates/declarationEmitErrors-when-fixing-error-files-all-files-are-emitted.js b/testdata/baselines/reference/tsbuildWatch/programUpdates/declarationEmitErrors-when-fixing-error-files-all-files-are-emitted.js new file mode 100644 index 0000000000..14e00b8d9a --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/programUpdates/declarationEmitErrors-when-fixing-error-files-all-files-are-emitted.js @@ -0,0 +1,293 @@ +currentDirectory::/user/username/projects/solution +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/solution/app/fileWithError.ts] *new* +export var myClassWithError = class { + tags() { } + private p = 12 +}; +//// [/user/username/projects/solution/app/fileWithoutError.ts] *new* +export class myClass { } +//// [/user/username/projects/solution/app/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true + } +} + +tsgo -b -w app +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. + +1 export var myClassWithError = class { +   ~~~~~~~~~~~~~~~~ + + app/fileWithError.ts:1:12 - Add a type annotation to the variable myClassWithError. + 1 export var myClassWithError = class { +    ~~~~~~~~~~~~~~~~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/solution/app/fileWithError.d.ts] *new* +export declare var myClassWithError: { + new (): { + tags(): void; + p: number; + }; +}; + +//// [/user/username/projects/solution/app/fileWithError.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +var myClassWithError = class { + tags() { } + p = 12; +}; +exports.myClassWithError = myClassWithError; + +//// [/user/username/projects/solution/app/fileWithoutError.d.ts] *new* +export declare class myClass { +} + +//// [/user/username/projects/solution/app/fileWithoutError.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClass = void 0; +class myClass { +} +exports.myClass = myClass; + +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./fileWithError.ts","./fileWithoutError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};","signature":"4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.","impliedNodeFormat":1},{"version":"181818468a51a2348d25d30b10b6b1bb-export class myClass { }","signature":"00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n","impliedNodeFormat":1}],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"pos":11,"end":27,"code":4094,"category":1,"message":"Property 'p' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":11,"end":27,"code":9027,"category":1,"message":"Add a type annotation to the variable myClassWithError."}]}]]],"latestChangedDtsFile":"./fileWithoutError.d.ts","emitSignatures":[[2,"b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n"]]} +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithError.ts", + "version": "02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};", + "signature": "4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "02dc54a766c51fbc368b69a386e90b57-export var myClassWithError = class {\n tags() { }\n private p = 12\n};", + "signature": "4763ea6446bf27424942ef44caadabed-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n\n(11,16): error4094: Property 'p' of exported anonymous class type may not be private or protected.\n(11,16): error9027: Add a type annotation to the variable myClassWithError.", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithoutError.ts", + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "emitDiagnosticsPerFile": [ + [ + "./fileWithError.ts", + [ + { + "pos": 11, + "end": 27, + "code": 4094, + "category": 1, + "message": "Property 'p' of exported anonymous class type may not be private or protected.", + "relatedInformation": [ + { + "pos": 11, + "end": 27, + "code": 9027, + "category": 1, + "message": "Add a type annotation to the variable myClassWithError." + } + ] + } + ] + ] + ], + "latestChangedDtsFile": "./fileWithoutError.d.ts", + "emitSignatures": [ + { + "file": "./fileWithError.ts", + "signature": "b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n", + "original": [ + 2, + "b73b369b8f252d3d9d6dcbf326b8e0e8-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n" + ] + } + ], + "size": 2107 +} + +app/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/solution/app/fileWithError.ts +*refresh* /user/username/projects/solution/app/fileWithoutError.ts +Signatures:: +(stored at emit) /user/username/projects/solution/app/fileWithError.ts +(stored at emit) /user/username/projects/solution/app/fileWithoutError.ts + + +Edit [0]:: Fix error +//// [/user/username/projects/solution/app/fileWithError.ts] *modified* +export var myClassWithError = class { + tags() { } + +}; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/solution/app/fileWithError.d.ts] *modified* +export declare var myClassWithError: { + new (): { + tags(): void; + }; +}; + +//// [/user/username/projects/solution/app/fileWithError.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +var myClassWithError = class { + tags() { } +}; +exports.myClassWithError = myClassWithError; + +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./fileWithError.ts","./fileWithoutError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f90afddb8044264e464dd4c18c7b59a-export var myClassWithError = class {\n tags() { }\n \n};","signature":"767d370715ef9e7e7e190b09dbf6cb11-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n","impliedNodeFormat":1},{"version":"181818468a51a2348d25d30b10b6b1bb-export class myClass { }","signature":"00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./fileWithError.d.ts"} +//// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./fileWithError.ts", + "./fileWithoutError.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithError.ts", + "version": "4f90afddb8044264e464dd4c18c7b59a-export var myClassWithError = class {\n tags() { }\n \n};", + "signature": "767d370715ef9e7e7e190b09dbf6cb11-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4f90afddb8044264e464dd4c18c7b59a-export var myClassWithError = class {\n tags() { }\n \n};", + "signature": "767d370715ef9e7e7e190b09dbf6cb11-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./fileWithoutError.ts", + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "181818468a51a2348d25d30b10b6b1bb-export class myClass { }", + "signature": "00d3ac9a4cccbf94649ca3c19d44376a-export declare class myClass {\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./fileWithError.d.ts", + "size": 1419 +} + +app/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/solution/app/fileWithError.ts +Signatures:: +(computed .d.ts) /user/username/projects/solution/app/fileWithError.ts diff --git a/testdata/baselines/reference/tsbuildWatch/programUpdates/tsbuildinfo-has-error.js b/testdata/baselines/reference/tsbuildWatch/programUpdates/tsbuildinfo-has-error.js new file mode 100644 index 0000000000..1aad07451f --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/programUpdates/tsbuildinfo-has-error.js @@ -0,0 +1,91 @@ +currentDirectory::/user/username/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/project/main.ts] *new* +export const x = 10; +//// [/user/username/projects/project/tsconfig.json] *new* +{} +//// [/user/username/projects/project/tsconfig.tsbuildinfo] *new* +Some random string + +tsgo --b -i -w +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/project/main.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + +//// [/user/username/projects/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./main.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"28e8748a7acd58f4f59388926e914f86-export const x = 10;"]} +//// [/user/username/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./main.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./main.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./main.ts", + "version": "28e8748a7acd58f4f59388926e914f86-export const x = 10;", + "signature": "28e8748a7acd58f4f59388926e914f86-export const x = 10;", + "impliedNodeFormat": "CommonJS" + } + ], + "size": 915 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/main.ts +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js b/testdata/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js new file mode 100644 index 0000000000..fc0920fe88 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js @@ -0,0 +1,403 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/App/app.ts] *new* +import { createSomeObject } from "../Library/library"; +createSomeObject().message; +//// [/user/username/projects/sample1/App/tsconfig.json] *new* +{ + "references": [{ "path": "../Library" }] +} +//// [/user/username/projects/sample1/Library/library.ts] *new* +interface SomeObject +{ + message: string; +} + +export function createSomeObject(): SomeObject +{ + return { + message: "new Object" + }; +} +//// [/user/username/projects/sample1/Library/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true + } +} + +tsgo -b -w App +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/App/app.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const library_1 = require("../Library/library"); +(0, library_1.createSomeObject)().message; + +//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":["./app.ts"]} +//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./app.ts" + ], + "original": "./app.ts" + } + ], + "size": 47 +} +//// [/user/username/projects/sample1/Library/library.d.ts] *new* +interface SomeObject { + message: string; +} +export declare function createSomeObject(): SomeObject; +export {}; + +//// [/user/username/projects/sample1/Library/library.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createSomeObject = createSomeObject; +function createSomeObject() { + return { + message: "new Object" + }; +} + +//// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./library.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e7ed447430123527643b512119fcfd4f-interface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}","signature":"4e6561e4d0bb63e65443157d6f0b1d5d-interface SomeObject {\n message: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./library.d.ts"} +//// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./library.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./library.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./library.ts", + "version": "e7ed447430123527643b512119fcfd4f-interface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}", + "signature": "4e6561e4d0bb63e65443157d6f0b1d5d-interface SomeObject {\n message: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7ed447430123527643b512119fcfd4f-interface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}", + "signature": "4e6561e4d0bb63e65443157d6f0b1d5d-interface SomeObject {\n message: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./library.d.ts", + "size": 1326 +} + +Library/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/Library/library.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/Library/library.ts + +App/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/Library/library.d.ts +*refresh* /user/username/projects/sample1/App/app.ts +Signatures:: + + +Edit [0]:: Introduce error +//// [/user/username/projects/sample1/Library/library.ts] *modified* +interface SomeObject +{ + message2: string; +} + +export function createSomeObject(): SomeObject +{ + return { + message2: "new Object" + }; +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +App/app.ts:2:20 - error TS2551: Property 'message' does not exist on type 'SomeObject'. Did you mean 'message2'? + +2 createSomeObject().message; +   ~~~~~~~ + + Library/library.d.ts:2:5 - 'message2' is declared here. + 2 message2: string; +    ~~~~~~~~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/user/username/projects/sample1/App/app.js] *rewrite with same content* +//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["./app.ts"],"semanticErrors":true} +//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./app.ts" + ], + "original": "./app.ts" + } + ], + "size": 69, + "semanticErrors": true +} +//// [/user/username/projects/sample1/Library/library.d.ts] *modified* +interface SomeObject { + message2: string; +} +export declare function createSomeObject(): SomeObject; +export {}; + +//// [/user/username/projects/sample1/Library/library.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createSomeObject = createSomeObject; +function createSomeObject() { + return { + message2: "new Object" + }; +} + +//// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./library.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"81f8dc50fd9871a106f1c06cc8e652ac-interface SomeObject\n{\n message2: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message2: \"new Object\"\n };\n}","signature":"f8bbfda93d56bdf575656b7c6a31c95f-interface SomeObject {\n message2: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./library.d.ts"} +//// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./library.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./library.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./library.ts", + "version": "81f8dc50fd9871a106f1c06cc8e652ac-interface SomeObject\n{\n message2: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message2: \"new Object\"\n };\n}", + "signature": "f8bbfda93d56bdf575656b7c6a31c95f-interface SomeObject {\n message2: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "81f8dc50fd9871a106f1c06cc8e652ac-interface SomeObject\n{\n message2: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message2: \"new Object\"\n };\n}", + "signature": "f8bbfda93d56bdf575656b7c6a31c95f-interface SomeObject {\n message2: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./library.d.ts", + "size": 1329 +} + +Library/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/Library/library.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/Library/library.ts + +App/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/Library/library.d.ts +*refresh* /user/username/projects/sample1/App/app.ts +Signatures:: +(used version) /user/username/projects/sample1/Library/library.d.ts +(computed .d.ts) /user/username/projects/sample1/App/app.ts + + +Edit [1]:: Fix error +//// [/user/username/projects/sample1/Library/library.ts] *modified* +interface SomeObject +{ + message: string; +} + +export function createSomeObject(): SomeObject +{ + return { + message: "new Object" + }; +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/App/app.js] *rewrite with same content* +//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["./app.ts"]} +//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./app.ts" + ], + "original": "./app.ts" + } + ], + "size": 47 +} +//// [/user/username/projects/sample1/Library/library.d.ts] *modified* +interface SomeObject { + message: string; +} +export declare function createSomeObject(): SomeObject; +export {}; + +//// [/user/username/projects/sample1/Library/library.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createSomeObject = createSomeObject; +function createSomeObject() { + return { + message: "new Object" + }; +} + +//// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./library.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e7ed447430123527643b512119fcfd4f-interface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}","signature":"4e6561e4d0bb63e65443157d6f0b1d5d-interface SomeObject {\n message: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./library.d.ts"} +//// [/user/username/projects/sample1/Library/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./library.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./library.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./library.ts", + "version": "e7ed447430123527643b512119fcfd4f-interface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}", + "signature": "4e6561e4d0bb63e65443157d6f0b1d5d-interface SomeObject {\n message: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7ed447430123527643b512119fcfd4f-interface SomeObject\n{\n message: string;\n}\n\nexport function createSomeObject(): SomeObject\n{\n return {\n message: \"new Object\"\n };\n}", + "signature": "4e6561e4d0bb63e65443157d6f0b1d5d-interface SomeObject {\n message: string;\n}\nexport declare function createSomeObject(): SomeObject;\nexport {};\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./library.d.ts", + "size": 1326 +} + +Library/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/Library/library.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/Library/library.ts + +App/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/Library/library.d.ts +*refresh* /user/username/projects/sample1/App/app.ts +Signatures:: +(used version) /user/username/projects/sample1/Library/library.d.ts +(computed .d.ts) /user/username/projects/sample1/App/app.ts diff --git a/testdata/baselines/reference/tsbuildWatch/programUpdates/works-correctly-when-project-with-extended-config-is-removed.js b/testdata/baselines/reference/tsbuildWatch/programUpdates/works-correctly-when-project-with-extended-config-is-removed.js new file mode 100644 index 0000000000..26d41d3ab1 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/programUpdates/works-correctly-when-project-with-extended-config-is-removed.js @@ -0,0 +1,271 @@ +currentDirectory::/user/username/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/project/alpha.tsconfig.json] *new* +{ + "compilerOptions": { + "strict": true, + }, +} +//// [/user/username/projects/project/bravo.tsconfig.json] *new* +{ + "compilerOptions": { + "strict": true, + }, +} +//// [/user/username/projects/project/commonFile1.ts] *new* +let x = 1 +//// [/user/username/projects/project/commonFile2.ts] *new* +let y = 1 +//// [/user/username/projects/project/other.ts] *new* +let z = 0; +//// [/user/username/projects/project/project1.tsconfig.json] *new* +{ + "extends": "./alpha.tsconfig.json", + "compilerOptions": { + "composite": true, + }, + "files": ["commonFile1.ts", "commonFile2.ts"], +} +//// [/user/username/projects/project/project2.tsconfig.json] *new* +{ + "extends": "./bravo.tsconfig.json", + "compilerOptions": { + "composite": true, + }, + "files": ["other.ts"], +} +//// [/user/username/projects/project/tsconfig.json] *new* +{ + "references": [ + { + "path": "./project1.tsconfig.json", + }, + { + "path": "./project2.tsconfig.json", + }, + ], + "files": [], +} + +tsgo -b -w -v +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * project1.tsconfig.json + * project2.tsconfig.json + * tsconfig.json + +[HH:MM:SS AM] Project 'project1.tsconfig.json' is out of date because output file 'project1.tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project1.tsconfig.json'... + +[HH:MM:SS AM] Project 'project2.tsconfig.json' is out of date because output file 'project2.tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project2.tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/project/commonFile1.d.ts] *new* +declare let x: number; + +//// [/user/username/projects/project/commonFile1.js] *new* +let x = 1; + +//// [/user/username/projects/project/commonFile2.d.ts] *new* +declare let y: number; + +//// [/user/username/projects/project/commonFile2.js] *new* +let y = 1; + +//// [/user/username/projects/project/other.d.ts] *new* +declare let z: number; + +//// [/user/username/projects/project/other.js] *new* +let z = 0; + +//// [/user/username/projects/project/project1.tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./commonFile1.ts","./commonFile2.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4e1a8b13d3ccc04f0aaac579ade4a50b-let x = 1","signature":"0e529fdc590223d6038e844fdfd212cd-declare let x: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"06ce815ba25b02847f0b8550f82f5a25-let y = 1","signature":"114cede92fdd1b7222858083021aeba2-declare let y: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"strict":true},"latestChangedDtsFile":"./commonFile2.d.ts"} +//// [/user/username/projects/project/project1.tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./commonFile1.ts", + "./commonFile2.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./commonFile1.ts", + "./commonFile2.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./commonFile1.ts", + "version": "4e1a8b13d3ccc04f0aaac579ade4a50b-let x = 1", + "signature": "0e529fdc590223d6038e844fdfd212cd-declare let x: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4e1a8b13d3ccc04f0aaac579ade4a50b-let x = 1", + "signature": "0e529fdc590223d6038e844fdfd212cd-declare let x: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./commonFile2.ts", + "version": "06ce815ba25b02847f0b8550f82f5a25-let y = 1", + "signature": "114cede92fdd1b7222858083021aeba2-declare let y: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06ce815ba25b02847f0b8550f82f5a25-let y = 1", + "signature": "114cede92fdd1b7222858083021aeba2-declare let y: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "strict": true + }, + "latestChangedDtsFile": "./commonFile2.d.ts", + "size": 1330 +} +//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7148e8559d706b66aaba2a2423755c63-let z = 0;","signature":"879426698e1db06899fd57775c19b230-declare let z: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"strict":true},"latestChangedDtsFile":"./other.d.ts"} +//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./other.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./other.ts", + "version": "7148e8559d706b66aaba2a2423755c63-let z = 0;", + "signature": "879426698e1db06899fd57775c19b230-declare let z: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7148e8559d706b66aaba2a2423755c63-let z = 0;", + "signature": "879426698e1db06899fd57775c19b230-declare let z: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "strict": true + }, + "latestChangedDtsFile": "./other.d.ts", + "size": 1119 +} + +project1.tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/commonFile1.ts +*refresh* /user/username/projects/project/commonFile2.ts +Signatures:: +(stored at emit) /user/username/projects/project/commonFile1.ts +(stored at emit) /user/username/projects/project/commonFile2.ts + +project2.tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/other.ts +Signatures:: +(stored at emit) /user/username/projects/project/other.ts + + +Edit [0]:: Remove project2 from base config +//// [/user/username/projects/project/tsconfig.json] *modified* +{ + "references": [ + { + "path": "./project1.tsconfig.json", + }, + ], + "files": [], +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * project1.tsconfig.json + * tsconfig.json + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + diff --git a/testdata/baselines/reference/tsbuildWatch/programUpdates/works-when-noUnusedParameters-changes-to-false.js b/testdata/baselines/reference/tsbuildWatch/programUpdates/works-when-noUnusedParameters-changes-to-false.js new file mode 100644 index 0000000000..1b377d6a30 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/programUpdates/works-when-noUnusedParameters-changes-to-false.js @@ -0,0 +1,110 @@ +currentDirectory::/user/username/projects/myproject +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/myproject/index.ts] *new* +const fn = (a: string, b: string) => b; +//// [/user/username/projects/myproject/tsconfig.json] *new* +{ + "compilerOptions": { + "noUnusedParameters": true, + }, +} + +tsgo -b -w +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +index.ts:1:13 - error TS6133: 'a' is declared but its value is never read. + +1 const fn = (a: string, b: string) => b; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/myproject/index.js] *new* +const fn = (a, b) => b; + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":["./index.ts"],"semanticErrors":true} +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": "./index.ts" + } + ], + "size": 71, + "semanticErrors": true +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/myproject/index.ts +Signatures:: + + +Edit [0]:: Change tsconfig to set noUnusedParameters to false +//// [/user/username/projects/myproject/tsconfig.json] *modified* +{ + "compilerOptions": { + "noUnusedParameters": false, + }, +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/myproject/index.js] *mTime changed* +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["./index.ts"]} +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": "./index.ts" + } + ], + "size": 49 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/myproject/index.ts +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js b/testdata/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js new file mode 100644 index 0000000000..7d01cdb130 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js @@ -0,0 +1,811 @@ +currentDirectory::/user/username/projects/project +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/project/alpha.tsconfig.json] *new* +{} +//// [/user/username/projects/project/bravo.tsconfig.json] *new* +{ + "extends": "./alpha.tsconfig.json", +} +//// [/user/username/projects/project/commonFile1.ts] *new* +let x = 1 +//// [/user/username/projects/project/commonFile2.ts] *new* +let y = 1 +//// [/user/username/projects/project/extendsConfig1.tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + }, +} +//// [/user/username/projects/project/extendsConfig2.tsconfig.json] *new* +{ + "compilerOptions": { + "strictNullChecks": false, + }, +} +//// [/user/username/projects/project/extendsConfig3.tsconfig.json] *new* +{ + "compilerOptions": { + "noImplicitAny": true, + }, +} +//// [/user/username/projects/project/other.ts] *new* +let z = 0; +//// [/user/username/projects/project/other2.ts] *new* +let k = 0; +//// [/user/username/projects/project/project1.tsconfig.json] *new* +{ + "extends": "./alpha.tsconfig.json", + "compilerOptions": { + "composite": true, + }, + "files": ["commonFile1.ts", "commonFile2.ts"], +} +//// [/user/username/projects/project/project2.tsconfig.json] *new* +{ + "extends": "./bravo.tsconfig.json", + "compilerOptions": { + "composite": true, + }, + "files": ["other.ts"], +} +//// [/user/username/projects/project/project3.tsconfig.json] *new* +{ + "extends": [ + "./extendsConfig1.tsconfig.json", + "./extendsConfig2.tsconfig.json", + "./extendsConfig3.tsconfig.json", + ], + "compilerOptions": { + "composite": false, + }, + "files": ["other2.ts"], +} + +tsgo -b -w -v project1.tsconfig.json project2.tsconfig.json project3.tsconfig.json +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * project1.tsconfig.json + * project2.tsconfig.json + * project3.tsconfig.json + +[HH:MM:SS AM] Project 'project1.tsconfig.json' is out of date because output file 'project1.tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project1.tsconfig.json'... + +[HH:MM:SS AM] Project 'project2.tsconfig.json' is out of date because output file 'project2.tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project2.tsconfig.json'... + +[HH:MM:SS AM] Project 'project3.tsconfig.json' is out of date because output file 'project3.tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project3.tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/project/commonFile1.d.ts] *new* +declare let x: number; + +//// [/user/username/projects/project/commonFile1.js] *new* +let x = 1; + +//// [/user/username/projects/project/commonFile2.d.ts] *new* +declare let y: number; + +//// [/user/username/projects/project/commonFile2.js] *new* +let y = 1; + +//// [/user/username/projects/project/other.d.ts] *new* +declare let z: number; + +//// [/user/username/projects/project/other.js] *new* +let z = 0; + +//// [/user/username/projects/project/other2.js] *new* +let k = 0; + +//// [/user/username/projects/project/project1.tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./commonFile1.ts","./commonFile2.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4e1a8b13d3ccc04f0aaac579ade4a50b-let x = 1","signature":"0e529fdc590223d6038e844fdfd212cd-declare let x: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"06ce815ba25b02847f0b8550f82f5a25-let y = 1","signature":"114cede92fdd1b7222858083021aeba2-declare let y: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./commonFile2.d.ts"} +//// [/user/username/projects/project/project1.tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./commonFile1.ts", + "./commonFile2.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./commonFile1.ts", + "./commonFile2.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./commonFile1.ts", + "version": "4e1a8b13d3ccc04f0aaac579ade4a50b-let x = 1", + "signature": "0e529fdc590223d6038e844fdfd212cd-declare let x: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4e1a8b13d3ccc04f0aaac579ade4a50b-let x = 1", + "signature": "0e529fdc590223d6038e844fdfd212cd-declare let x: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./commonFile2.ts", + "version": "06ce815ba25b02847f0b8550f82f5a25-let y = 1", + "signature": "114cede92fdd1b7222858083021aeba2-declare let y: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06ce815ba25b02847f0b8550f82f5a25-let y = 1", + "signature": "114cede92fdd1b7222858083021aeba2-declare let y: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./commonFile2.d.ts", + "size": 1316 +} +//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7148e8559d706b66aaba2a2423755c63-let z = 0;","signature":"879426698e1db06899fd57775c19b230-declare let z: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./other.d.ts"} +//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./other.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./other.ts", + "version": "7148e8559d706b66aaba2a2423755c63-let z = 0;", + "signature": "879426698e1db06899fd57775c19b230-declare let z: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7148e8559d706b66aaba2a2423755c63-let z = 0;", + "signature": "879426698e1db06899fd57775c19b230-declare let z: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./other.d.ts", + "size": 1105 +} +//// [/user/username/projects/project/project3.tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":["./other2.ts"]} +//// [/user/username/projects/project/project3.tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./other2.ts" + ], + "original": "./other2.ts" + } + ], + "size": 50 +} + +project1.tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/commonFile1.ts +*refresh* /user/username/projects/project/commonFile2.ts +Signatures:: +(stored at emit) /user/username/projects/project/commonFile1.ts +(stored at emit) /user/username/projects/project/commonFile2.ts + +project2.tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/other.ts +Signatures:: +(stored at emit) /user/username/projects/project/other.ts + +project3.tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/other2.ts +Signatures:: + + +Edit [0]:: Modify alpha config +//// [/user/username/projects/project/alpha.tsconfig.json] *modified* +{ + "compilerOptions": { + "strict": true + } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * project1.tsconfig.json + * project2.tsconfig.json + * project3.tsconfig.json + +[HH:MM:SS AM] Project 'project1.tsconfig.json' is out of date because output 'project1.tsconfig.tsbuildinfo' is older than input 'alpha.tsconfig.json' + +[HH:MM:SS AM] Building project 'project1.tsconfig.json'... + +[HH:MM:SS AM] Project 'project2.tsconfig.json' is out of date because output 'project2.tsconfig.tsbuildinfo' is older than input 'alpha.tsconfig.json' + +[HH:MM:SS AM] Building project 'project2.tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/project/commonFile1.js] *rewrite with same content* +//// [/user/username/projects/project/commonFile2.js] *rewrite with same content* +//// [/user/username/projects/project/other.js] *rewrite with same content* +//// [/user/username/projects/project/project1.tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./commonFile1.ts","./commonFile2.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4e1a8b13d3ccc04f0aaac579ade4a50b-let x = 1","signature":"0e529fdc590223d6038e844fdfd212cd-declare let x: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"06ce815ba25b02847f0b8550f82f5a25-let y = 1","signature":"114cede92fdd1b7222858083021aeba2-declare let y: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"strict":true},"latestChangedDtsFile":"./commonFile2.d.ts"} +//// [/user/username/projects/project/project1.tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./commonFile1.ts", + "./commonFile2.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./commonFile1.ts", + "./commonFile2.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./commonFile1.ts", + "version": "4e1a8b13d3ccc04f0aaac579ade4a50b-let x = 1", + "signature": "0e529fdc590223d6038e844fdfd212cd-declare let x: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4e1a8b13d3ccc04f0aaac579ade4a50b-let x = 1", + "signature": "0e529fdc590223d6038e844fdfd212cd-declare let x: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./commonFile2.ts", + "version": "06ce815ba25b02847f0b8550f82f5a25-let y = 1", + "signature": "114cede92fdd1b7222858083021aeba2-declare let y: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06ce815ba25b02847f0b8550f82f5a25-let y = 1", + "signature": "114cede92fdd1b7222858083021aeba2-declare let y: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "strict": true + }, + "latestChangedDtsFile": "./commonFile2.d.ts", + "size": 1330 +} +//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7148e8559d706b66aaba2a2423755c63-let z = 0;","signature":"879426698e1db06899fd57775c19b230-declare let z: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"strict":true},"latestChangedDtsFile":"./other.d.ts"} +//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./other.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./other.ts", + "version": "7148e8559d706b66aaba2a2423755c63-let z = 0;", + "signature": "879426698e1db06899fd57775c19b230-declare let z: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7148e8559d706b66aaba2a2423755c63-let z = 0;", + "signature": "879426698e1db06899fd57775c19b230-declare let z: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "strict": true + }, + "latestChangedDtsFile": "./other.d.ts", + "size": 1119 +} + +project1.tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/commonFile1.ts +*refresh* /user/username/projects/project/commonFile2.ts +Signatures:: + +project2.tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/other.ts +Signatures:: + + +Edit [1]:: change bravo config +//// [/user/username/projects/project/bravo.tsconfig.json] *modified* +{ + "extends": "./alpha.tsconfig.json", + "compilerOptions": { "strict": false } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * project1.tsconfig.json + * project2.tsconfig.json + * project3.tsconfig.json + +[HH:MM:SS AM] Project 'project2.tsconfig.json' is out of date because output 'project2.tsconfig.tsbuildinfo' is older than input 'bravo.tsconfig.json' + +[HH:MM:SS AM] Building project 'project2.tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/project/other.js] *rewrite with same content* +//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.d.ts","./other.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7148e8559d706b66aaba2a2423755c63-let z = 0;","signature":"879426698e1db06899fd57775c19b230-declare let z: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"strict":false},"latestChangedDtsFile":"./other.d.ts"} +//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./other.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "lib.d.ts", + "./other.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./other.ts", + "version": "7148e8559d706b66aaba2a2423755c63-let z = 0;", + "signature": "879426698e1db06899fd57775c19b230-declare let z: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7148e8559d706b66aaba2a2423755c63-let z = 0;", + "signature": "879426698e1db06899fd57775c19b230-declare let z: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "strict": false + }, + "latestChangedDtsFile": "./other.d.ts", + "size": 1120 +} + +project2.tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/other.ts +Signatures:: + + +Edit [2]:: project 2 extends alpha +//// [/user/username/projects/project/project2.tsconfig.json] *modified* +{ + "extends": "./alpha.tsconfig.json", +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * project1.tsconfig.json + * project2.tsconfig.json + * project3.tsconfig.json + +[HH:MM:SS AM] Project 'project2.tsconfig.json' is out of date because output 'other2.js' is older than input 'project2.tsconfig.json' + +[HH:MM:SS AM] Building project 'project2.tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/project/commonFile1.js] *rewrite with same content* +//// [/user/username/projects/project/commonFile2.js] *rewrite with same content* +//// [/user/username/projects/project/other.js] *rewrite with same content* +//// [/user/username/projects/project/other2.js] *rewrite with same content* +//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["./commonFile1.ts","./commonFile2.ts","./other.ts","./other2.ts"]} +//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./commonFile1.ts" + ], + "original": "./commonFile1.ts" + }, + { + "files": [ + "./commonFile2.ts" + ], + "original": "./commonFile2.ts" + }, + { + "files": [ + "./other.ts" + ], + "original": "./other.ts" + }, + { + "files": [ + "./other2.ts" + ], + "original": "./other2.ts" + } + ], + "size": 101 +} + +project2.tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/commonFile1.ts +*refresh* /user/username/projects/project/commonFile2.ts +*refresh* /user/username/projects/project/other.ts +*refresh* /user/username/projects/project/other2.ts +Signatures:: +(computed .d.ts) /user/username/projects/project/commonFile1.ts +(computed .d.ts) /user/username/projects/project/commonFile2.ts +(computed .d.ts) /user/username/projects/project/other2.ts + + +Edit [3]:: update aplha config +//// [/user/username/projects/project/alpha.tsconfig.json] *modified* +{} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * project1.tsconfig.json + * project2.tsconfig.json + * project3.tsconfig.json + +[HH:MM:SS AM] Project 'project1.tsconfig.json' is out of date because output 'project1.tsconfig.tsbuildinfo' is older than input 'alpha.tsconfig.json' + +[HH:MM:SS AM] Building project 'project1.tsconfig.json'... + +[HH:MM:SS AM] Project 'project2.tsconfig.json' is out of date because output 'project2.tsconfig.tsbuildinfo' is older than input 'alpha.tsconfig.json' + +[HH:MM:SS AM] Building project 'project2.tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/project/commonFile1.js] *rewrite with same content* +//// [/user/username/projects/project/commonFile2.js] *rewrite with same content* +//// [/user/username/projects/project/other.js] *rewrite with same content* +//// [/user/username/projects/project/other2.js] *rewrite with same content* +//// [/user/username/projects/project/project1.tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","./commonFile1.ts","./commonFile2.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4e1a8b13d3ccc04f0aaac579ade4a50b-let x = 1","signature":"0e529fdc590223d6038e844fdfd212cd-declare let x: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"06ce815ba25b02847f0b8550f82f5a25-let y = 1","signature":"114cede92fdd1b7222858083021aeba2-declare let y: number;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./commonFile2.d.ts"} +//// [/user/username/projects/project/project1.tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./commonFile1.ts", + "./commonFile2.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./commonFile1.ts", + "./commonFile2.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./commonFile1.ts", + "version": "4e1a8b13d3ccc04f0aaac579ade4a50b-let x = 1", + "signature": "0e529fdc590223d6038e844fdfd212cd-declare let x: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4e1a8b13d3ccc04f0aaac579ade4a50b-let x = 1", + "signature": "0e529fdc590223d6038e844fdfd212cd-declare let x: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./commonFile2.ts", + "version": "06ce815ba25b02847f0b8550f82f5a25-let y = 1", + "signature": "114cede92fdd1b7222858083021aeba2-declare let y: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06ce815ba25b02847f0b8550f82f5a25-let y = 1", + "signature": "114cede92fdd1b7222858083021aeba2-declare let y: number;\n", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./commonFile2.d.ts", + "size": 1316 +} +//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo] *rewrite with same content* +//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +project1.tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/commonFile1.ts +*refresh* /user/username/projects/project/commonFile2.ts +Signatures:: + +project2.tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/commonFile1.ts +*refresh* /user/username/projects/project/commonFile2.ts +*refresh* /user/username/projects/project/other.ts +*refresh* /user/username/projects/project/other2.ts +Signatures:: + + +Edit [4]:: Modify extendsConfigFile2 +//// [/user/username/projects/project/extendsConfig2.tsconfig.json] *modified* +{ + "compilerOptions": { "strictNullChecks": true } +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * project1.tsconfig.json + * project2.tsconfig.json + * project3.tsconfig.json + +[HH:MM:SS AM] Project 'project3.tsconfig.json' is out of date because output 'project3.tsconfig.tsbuildinfo' is older than input 'extendsConfig2.tsconfig.json' + +[HH:MM:SS AM] Building project 'project3.tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'project3.tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/project/other2.js] *mTime changed* +//// [/user/username/projects/project/project3.tsconfig.tsbuildinfo] *rewrite with same content* +//// [/user/username/projects/project/project3.tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +project3.tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/other2.ts +Signatures:: + + +Edit [5]:: Modify project 3 +//// [/user/username/projects/project/project3.tsconfig.json] *modified* +{ + "extends": ["./extendsConfig1.tsconfig.json", "./extendsConfig2.tsconfig.json"], + "compilerOptions": { "composite": false }, + "files": ["other2.ts"], +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * project1.tsconfig.json + * project2.tsconfig.json + * project3.tsconfig.json + +[HH:MM:SS AM] Project 'project3.tsconfig.json' is out of date because output 'project3.tsconfig.tsbuildinfo' is older than input 'project3.tsconfig.json' + +[HH:MM:SS AM] Building project 'project3.tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'project3.tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/project/other2.js] *mTime changed* +//// [/user/username/projects/project/project3.tsconfig.tsbuildinfo] *rewrite with same content* +//// [/user/username/projects/project/project3.tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +project3.tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/project/other2.ts +Signatures:: + + +Edit [6]:: Delete extendedConfigFile2 and report error +//// [/user/username/projects/project/extendsConfig2.tsconfig.json] *deleted* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * project1.tsconfig.json + * project2.tsconfig.json + * project3.tsconfig.json + +[HH:MM:SS AM] Project 'project3.tsconfig.json' is up to date because newest input 'other2.ts' is older than output 'project3.tsconfig.tsbuildinfo' + +error TS5083: Cannot read file '/user/username/projects/project/extendsConfig2.tsconfig.json'. +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + diff --git a/testdata/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js b/testdata/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js new file mode 100644 index 0000000000..b5d91adde7 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js @@ -0,0 +1,536 @@ +currentDirectory::/user/username/projects/reexport +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/reexport/src/main/index.ts] *new* +import { Session } from "../pure"; + +export const session: Session = { + foo: 1 +}; +//// [/user/username/projects/reexport/src/main/tsconfig.json] *new* +{ + "compilerOptions": { + "outDir": "../../out", + "rootDir": "../", + }, + "include": ["**/*.ts"], + "references": [{ "path": "../pure" }], +} +//// [/user/username/projects/reexport/src/pure/index.ts] *new* +export * from "./session"; +//// [/user/username/projects/reexport/src/pure/session.ts] *new* +export interface Session { + foo: number; + // bar: number; +} +//// [/user/username/projects/reexport/src/pure/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "outDir": "../../out", + "rootDir": "../", + }, + "include": ["**/*.ts"], +} +//// [/user/username/projects/reexport/src/tsconfig.json] *new* +{ + "files": [], + "include": [], + "references": [{ "path": "./pure" }, { "path": "./main" }], +} + +tsgo -b -w -verbose src +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * src/pure/tsconfig.json + * src/main/tsconfig.json + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/pure/tsconfig.json' is out of date because output file 'out/pure/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'src/pure/tsconfig.json'... + +[HH:MM:SS AM] Project 'src/main/tsconfig.json' is out of date because output file 'out/main/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'src/main/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/reexport/out/main/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.session = void 0; +exports.session = { + foo: 1 +}; + +//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":["../../src/main/index.ts"]} +//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../src/main/index.ts" + ], + "original": "../../src/main/index.ts" + } + ], + "size": 62 +} +//// [/user/username/projects/reexport/out/pure/index.d.ts] *new* +export * from "./session"; + +//// [/user/username/projects/reexport/out/pure/index.js] *new* +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./session"), exports); + +//// [/user/username/projects/reexport/out/pure/session.d.ts] *new* +export interface Session { + foo: number; +} + +//// [/user/username/projects/reexport/out/pure/session.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/user/username/projects/reexport/out/pure/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","../../src/pure/session.ts","../../src/pure/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1beb34deefa28062ed4b4b605c69e42f-export interface Session {\n foo: number;\n // bar: number;\n}","signature":"90b43415bdb2993dfd8c888e444ab471-export interface Session {\n foo: number;\n}\n","impliedNodeFormat":1},{"version":"c3b7227625b1dcb56b6fb13c17c504fe-export * from \"./session\";","signature":"14ab788547e1e852fa86d4bf1731e8c8-export * from \"./session\";\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"outDir":"..","rootDir":"../../src"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/reexport/out/pure/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../src/pure/session.ts", + "../../src/pure/index.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../../src/pure/session.ts", + "../../src/pure/index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../src/pure/session.ts", + "version": "1beb34deefa28062ed4b4b605c69e42f-export interface Session {\n foo: number;\n // bar: number;\n}", + "signature": "90b43415bdb2993dfd8c888e444ab471-export interface Session {\n foo: number;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "1beb34deefa28062ed4b4b605c69e42f-export interface Session {\n foo: number;\n // bar: number;\n}", + "signature": "90b43415bdb2993dfd8c888e444ab471-export interface Session {\n foo: number;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../src/pure/index.ts", + "version": "c3b7227625b1dcb56b6fb13c17c504fe-export * from \"./session\";", + "signature": "14ab788547e1e852fa86d4bf1731e8c8-export * from \"./session\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c3b7227625b1dcb56b6fb13c17c504fe-export * from \"./session\";", + "signature": "14ab788547e1e852fa86d4bf1731e8c8-export * from \"./session\";\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../src/pure/session.ts" + ] + ], + "options": { + "composite": true, + "outDir": "..", + "rootDir": "../../src" + }, + "referencedMap": { + "../../src/pure/index.ts": [ + "../../src/pure/session.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1463 +} + +src/pure/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/reexport/src/pure/session.ts +*refresh* /user/username/projects/reexport/src/pure/index.ts +Signatures:: +(stored at emit) /user/username/projects/reexport/src/pure/session.ts +(stored at emit) /user/username/projects/reexport/src/pure/index.ts + +src/main/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/reexport/out/pure/session.d.ts +*refresh* /user/username/projects/reexport/out/pure/index.d.ts +*refresh* /user/username/projects/reexport/src/main/index.ts +Signatures:: + + +Edit [0]:: Introduce error +//// [/user/username/projects/reexport/src/pure/session.ts] *modified* +export interface Session { + foo: number; + bar: number; +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * src/pure/tsconfig.json + * src/main/tsconfig.json + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/pure/tsconfig.json' is out of date because output 'out/pure/tsconfig.tsbuildinfo' is older than input 'src/pure/session.ts' + +[HH:MM:SS AM] Building project 'src/pure/tsconfig.json'... + +[HH:MM:SS AM] Project 'src/main/tsconfig.json' is out of date because output 'out/main/index.js' is older than input 'src/pure/tsconfig.json' + +[HH:MM:SS AM] Building project 'src/main/tsconfig.json'... + +src/main/index.ts:3:14 - error TS2741: Property 'bar' is missing in type '{ foo: number; }' but required in type 'Session'. + +3 export const session: Session = { +   ~~~~~~~ + + out/pure/session.d.ts:3:5 - 'bar' is declared here. + 3 bar: number; +    ~~~ + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'src/main/tsconfig.json'... + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/user/username/projects/reexport/out/main/index.js] *mTime changed* +//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["../../src/main/index.ts"],"semanticErrors":true} +//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../src/main/index.ts" + ], + "original": "../../src/main/index.ts" + } + ], + "size": 84, + "semanticErrors": true +} +//// [/user/username/projects/reexport/out/pure/index.js] *rewrite with same content* +//// [/user/username/projects/reexport/out/pure/session.d.ts] *modified* +export interface Session { + foo: number; + bar: number; +} + +//// [/user/username/projects/reexport/out/pure/session.js] *rewrite with same content* +//// [/user/username/projects/reexport/out/pure/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","../../src/pure/session.ts","../../src/pure/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f993dc94313f77cb079d7ee366b10997-export interface Session {\n foo: number;\n bar: number;\n}","signature":"5daeec8bad73c67127f3b3aae951c919-export interface Session {\n foo: number;\n bar: number;\n}\n","impliedNodeFormat":1},{"version":"c3b7227625b1dcb56b6fb13c17c504fe-export * from \"./session\";","signature":"14ab788547e1e852fa86d4bf1731e8c8-export * from \"./session\";\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"outDir":"..","rootDir":"../../src"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./session.d.ts"} +//// [/user/username/projects/reexport/out/pure/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../src/pure/session.ts", + "../../src/pure/index.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../../src/pure/session.ts", + "../../src/pure/index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../src/pure/session.ts", + "version": "f993dc94313f77cb079d7ee366b10997-export interface Session {\n foo: number;\n bar: number;\n}", + "signature": "5daeec8bad73c67127f3b3aae951c919-export interface Session {\n foo: number;\n bar: number;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "f993dc94313f77cb079d7ee366b10997-export interface Session {\n foo: number;\n bar: number;\n}", + "signature": "5daeec8bad73c67127f3b3aae951c919-export interface Session {\n foo: number;\n bar: number;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../src/pure/index.ts", + "version": "c3b7227625b1dcb56b6fb13c17c504fe-export * from \"./session\";", + "signature": "14ab788547e1e852fa86d4bf1731e8c8-export * from \"./session\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c3b7227625b1dcb56b6fb13c17c504fe-export * from \"./session\";", + "signature": "14ab788547e1e852fa86d4bf1731e8c8-export * from \"./session\";\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../src/pure/session.ts" + ] + ], + "options": { + "composite": true, + "outDir": "..", + "rootDir": "../../src" + }, + "referencedMap": { + "../../src/pure/index.ts": [ + "../../src/pure/session.ts" + ] + }, + "latestChangedDtsFile": "./session.d.ts", + "size": 1480 +} + +src/pure/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/reexport/src/pure/session.ts +*refresh* /user/username/projects/reexport/src/pure/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/reexport/src/pure/session.ts +(computed .d.ts) /user/username/projects/reexport/src/pure/index.ts + +src/main/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/reexport/out/pure/session.d.ts +*refresh* /user/username/projects/reexport/out/pure/index.d.ts +*refresh* /user/username/projects/reexport/src/main/index.ts +Signatures:: +(used version) /user/username/projects/reexport/out/pure/session.d.ts +(used version) /user/username/projects/reexport/out/pure/index.d.ts +(used version) /user/username/projects/reexport/src/main/index.ts + + +Edit [1]:: Fix error +//// [/user/username/projects/reexport/src/pure/session.ts] *modified* +export interface Session { + foo: number; + // bar: number; +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * src/pure/tsconfig.json + * src/main/tsconfig.json + * src/tsconfig.json + +[HH:MM:SS AM] Project 'src/pure/tsconfig.json' is out of date because output 'out/pure/tsconfig.tsbuildinfo' is older than input 'src/pure/session.ts' + +[HH:MM:SS AM] Building project 'src/pure/tsconfig.json'... + +[HH:MM:SS AM] Project 'src/main/tsconfig.json' is out of date because it has errors. + +[HH:MM:SS AM] Building project 'src/main/tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'src/main/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/reexport/out/main/index.js] *mTime changed* +//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":["../../src/main/index.ts"]} +//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../src/main/index.ts" + ], + "original": "../../src/main/index.ts" + } + ], + "size": 62 +} +//// [/user/username/projects/reexport/out/pure/index.js] *rewrite with same content* +//// [/user/username/projects/reexport/out/pure/session.d.ts] *modified* +export interface Session { + foo: number; +} + +//// [/user/username/projects/reexport/out/pure/session.js] *rewrite with same content* +//// [/user/username/projects/reexport/out/pure/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","../../src/pure/session.ts","../../src/pure/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1beb34deefa28062ed4b4b605c69e42f-export interface Session {\n foo: number;\n // bar: number;\n}","signature":"90b43415bdb2993dfd8c888e444ab471-export interface Session {\n foo: number;\n}\n","impliedNodeFormat":1},{"version":"c3b7227625b1dcb56b6fb13c17c504fe-export * from \"./session\";","signature":"14ab788547e1e852fa86d4bf1731e8c8-export * from \"./session\";\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"outDir":"..","rootDir":"../../src"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./session.d.ts"} +//// [/user/username/projects/reexport/out/pure/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../src/pure/session.ts", + "../../src/pure/index.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../../src/pure/session.ts", + "../../src/pure/index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../src/pure/session.ts", + "version": "1beb34deefa28062ed4b4b605c69e42f-export interface Session {\n foo: number;\n // bar: number;\n}", + "signature": "90b43415bdb2993dfd8c888e444ab471-export interface Session {\n foo: number;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "1beb34deefa28062ed4b4b605c69e42f-export interface Session {\n foo: number;\n // bar: number;\n}", + "signature": "90b43415bdb2993dfd8c888e444ab471-export interface Session {\n foo: number;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../src/pure/index.ts", + "version": "c3b7227625b1dcb56b6fb13c17c504fe-export * from \"./session\";", + "signature": "14ab788547e1e852fa86d4bf1731e8c8-export * from \"./session\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c3b7227625b1dcb56b6fb13c17c504fe-export * from \"./session\";", + "signature": "14ab788547e1e852fa86d4bf1731e8c8-export * from \"./session\";\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../src/pure/session.ts" + ] + ], + "options": { + "composite": true, + "outDir": "..", + "rootDir": "../../src" + }, + "referencedMap": { + "../../src/pure/index.ts": [ + "../../src/pure/session.ts" + ] + }, + "latestChangedDtsFile": "./session.d.ts", + "size": 1465 +} + +src/pure/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/reexport/src/pure/session.ts +*refresh* /user/username/projects/reexport/src/pure/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/reexport/src/pure/session.ts +(computed .d.ts) /user/username/projects/reexport/src/pure/index.ts + +src/main/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/reexport/out/pure/session.d.ts +*refresh* /user/username/projects/reexport/out/pure/index.d.ts +*refresh* /user/username/projects/reexport/src/main/index.ts +Signatures:: +(used version) /user/username/projects/reexport/out/pure/session.d.ts +(used version) /user/username/projects/reexport/out/pure/index.d.ts +(used version) /user/username/projects/reexport/src/main/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/roots/when-root-file-is-from-referenced-project-and-shared-is-first.js b/testdata/baselines/reference/tsbuildWatch/roots/when-root-file-is-from-referenced-project-and-shared-is-first.js new file mode 100644 index 0000000000..3c26c1fb21 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/roots/when-root-file-is-from-referenced-project-and-shared-is-first.js @@ -0,0 +1,867 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/projects/server/src/server.ts] *new* +import { MyClass } from ':shared/myClass.js'; +console.log('Hello, world!'); +//// [/home/src/workspaces/solution/projects/server/tsconfig.json] *new* +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "..", + "outDir": "./dist", + "paths": { + ":shared/*": ["./src/../../shared/src/*"], + }, + }, + "include": [ "../shared/src/**/*.ts", "src/**/*.ts" ], + "references": [ + { "path": "../shared" }, + ], +} +//// [/home/src/workspaces/solution/projects/shared/src/logging.ts] *new* +export function log(str: string) { + console.log(str); +} +//// [/home/src/workspaces/solution/projects/shared/src/myClass.ts] *new* +export class MyClass { } +//// [/home/src/workspaces/solution/projects/shared/src/random.ts] *new* +export function randomFn(str: string) { + console.log(str); +} +//// [/home/src/workspaces/solution/projects/shared/tsconfig.json] *new* +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + }, + "include": ["src/**/*.ts"], +} +//// [/home/src/workspaces/solution/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "projects/server" }, + { "path": "projects/shared" }, + ], +} + +tsgo --b -w projects/server -v --traceResolution --explainFiles +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * projects/shared/tsconfig.json + * projects/server/tsconfig.json + +[HH:MM:SS AM] Project 'projects/shared/tsconfig.json' is out of date because output file 'projects/shared/dist/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'projects/shared/tsconfig.json'... + +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +projects/shared/src/logging.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +projects/shared/src/myClass.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +projects/shared/src/random.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +[HH:MM:SS AM] Project 'projects/server/tsconfig.json' is out of date because output file 'projects/server/dist/server/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'projects/server/tsconfig.json'... + +======== Resolving module ':shared/myClass.js' from '/home/src/workspaces/solution/projects/server/src/server.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +'paths' option is specified, looking for a pattern to match module name ':shared/myClass.js'. +Module name ':shared/myClass.js', matched pattern ':shared/*'. +Trying substitution './src/../../shared/src/*', candidate module location: './src/../../shared/src/myClass.js'. +Loading module as file / folder, candidate module location '/home/src/workspaces/solution/projects/shared/src/myClass.js', target file types: TypeScript, JavaScript, Declaration, JSON. +File name '/home/src/workspaces/solution/projects/shared/src/myClass.js' has a '.js' extension - stripping it. +File '/home/src/workspaces/solution/projects/shared/src/myClass.ts' exists - use it as a name resolution result. +======== Module name ':shared/myClass.js' was successfully resolved to '/home/src/workspaces/solution/projects/shared/src/myClass.ts'. ======== +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +projects/shared/dist/src/logging.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/logging.ts' +projects/shared/dist/src/myClass.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/myClass.ts' +projects/shared/dist/src/random.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/random.ts' +projects/server/src/server.ts + Matched by include pattern 'src/**/*.ts' in 'projects/server/tsconfig.json' +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/home/src/workspaces/solution/projects/server/dist/server/src/server.d.ts] *new* +export {}; + +//// [/home/src/workspaces/solution/projects/server/dist/server/src/server.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log('Hello, world!'); + +//// [/home/src/workspaces/solution/projects/server/dist/server/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.d.ts","../../../shared/dist/src/logging.d.ts","../../../shared/dist/src/myClass.d.ts","../../../shared/dist/src/random.d.ts","../../src/server.ts","../../../shared/src/logging.ts","../../../shared/src/myClass.ts","../../../shared/src/random.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"380f2d6d625cf989bc9f9bcd67ce3afe-export declare function log(str: string): void;\n","21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n","1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n",{"version":"12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[3]],"options":{"composite":true,"outDir":"..","rootDir":"../../.."},"referencedMap":[[5,1]],"latestChangedDtsFile":"./src/server.d.ts","resolvedRoot":[[2,6],[3,7],[4,8]]} +//// [/home/src/workspaces/solution/projects/server/dist/server/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../../shared/dist/src/logging.d.ts", + "../../../shared/dist/src/myClass.d.ts", + "../../../shared/dist/src/random.d.ts", + "../../src/server.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../../../shared/dist/src/logging.d.ts", + "../../../shared/dist/src/myClass.d.ts", + "../../../shared/dist/src/random.d.ts", + "../../src/server.ts", + "../../../shared/src/logging.ts", + "../../../shared/src/myClass.ts", + "../../../shared/src/random.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../../shared/dist/src/logging.d.ts", + "version": "380f2d6d625cf989bc9f9bcd67ce3afe-export declare function log(str: string): void;\n", + "signature": "380f2d6d625cf989bc9f9bcd67ce3afe-export declare function log(str: string): void;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../../shared/dist/src/myClass.d.ts", + "version": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../../shared/dist/src/random.d.ts", + "version": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "signature": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../src/server.ts", + "version": "12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../../shared/dist/src/myClass.d.ts" + ] + ], + "options": { + "composite": true, + "outDir": "..", + "rootDir": "../../.." + }, + "referencedMap": { + "../../src/server.ts": [ + "../../../shared/dist/src/myClass.d.ts" + ] + }, + "latestChangedDtsFile": "./src/server.d.ts", + "resolvedRoot": [ + [ + "../../../shared/dist/src/logging.d.ts", + "../../../shared/src/logging.ts" + ], + [ + "../../../shared/dist/src/myClass.d.ts", + "../../../shared/src/myClass.ts" + ], + [ + "../../../shared/dist/src/random.d.ts", + "../../../shared/src/random.ts" + ] + ], + "size": 1728 +} +//// [/home/src/workspaces/solution/projects/shared/dist/src/logging.d.ts] *new* +export declare function log(str: string): void; + +//// [/home/src/workspaces/solution/projects/shared/dist/src/logging.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.log = log; +function log(str) { + console.log(str); +} + +//// [/home/src/workspaces/solution/projects/shared/dist/src/myClass.d.ts] *new* +export declare class MyClass { +} + +//// [/home/src/workspaces/solution/projects/shared/dist/src/myClass.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MyClass = void 0; +class MyClass { +} +exports.MyClass = MyClass; + +//// [/home/src/workspaces/solution/projects/shared/dist/src/random.d.ts] *new* +export declare function randomFn(str: string): void; + +//// [/home/src/workspaces/solution/projects/shared/dist/src/random.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.randomFn = randomFn; +function randomFn(str) { + console.log(str); +} + +//// [/home/src/workspaces/solution/projects/shared/dist/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../src/logging.ts","../src/myClass.ts","../src/random.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e8c4594410128d4531f2321647cc451d-export function log(str: string) {\n console.log(str);\n}","signature":"380f2d6d625cf989bc9f9bcd67ce3afe-export declare function log(str: string): void;\n","impliedNodeFormat":1},{"version":"22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }","signature":"21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n","impliedNodeFormat":1},{"version":"4f1c4e78a007da37552cba1c9b98db63-export function randomFn(str: string) {\n console.log(str);\n}","signature":"1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./src/random.d.ts"} +//// [/home/src/workspaces/solution/projects/shared/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../src/logging.ts", + "../src/myClass.ts", + "../src/random.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../src/logging.ts", + "../src/myClass.ts", + "../src/random.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/logging.ts", + "version": "e8c4594410128d4531f2321647cc451d-export function log(str: string) {\n console.log(str);\n}", + "signature": "380f2d6d625cf989bc9f9bcd67ce3afe-export declare function log(str: string): void;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e8c4594410128d4531f2321647cc451d-export function log(str: string) {\n console.log(str);\n}", + "signature": "380f2d6d625cf989bc9f9bcd67ce3afe-export declare function log(str: string): void;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/myClass.ts", + "version": "22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/random.ts", + "version": "4f1c4e78a007da37552cba1c9b98db63-export function randomFn(str: string) {\n console.log(str);\n}", + "signature": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4f1c4e78a007da37552cba1c9b98db63-export function randomFn(str: string) {\n console.log(str);\n}", + "signature": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "outDir": "./" + }, + "latestChangedDtsFile": "./src/random.d.ts", + "size": 1637 +} + +projects/shared/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/projects/shared/src/logging.ts +*refresh* /home/src/workspaces/solution/projects/shared/src/myClass.ts +*refresh* /home/src/workspaces/solution/projects/shared/src/random.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/projects/shared/src/logging.ts +(stored at emit) /home/src/workspaces/solution/projects/shared/src/myClass.ts +(stored at emit) /home/src/workspaces/solution/projects/shared/src/random.ts + +projects/server/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/projects/shared/dist/src/logging.d.ts +*refresh* /home/src/workspaces/solution/projects/shared/dist/src/myClass.d.ts +*refresh* /home/src/workspaces/solution/projects/shared/dist/src/random.d.ts +*refresh* /home/src/workspaces/solution/projects/server/src/server.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/projects/server/src/server.ts + + +Edit [0]:: no change + + +Output:: + + + +Edit [1]:: edit logging file +//// [/home/src/workspaces/solution/projects/shared/src/logging.ts] *modified* +export function log(str: string) { + console.log(str); +}export const x = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * projects/shared/tsconfig.json + * projects/server/tsconfig.json + +[HH:MM:SS AM] Project 'projects/shared/tsconfig.json' is out of date because output 'projects/shared/dist/tsconfig.tsbuildinfo' is older than input 'projects/shared/src/logging.ts' + +[HH:MM:SS AM] Building project 'projects/shared/tsconfig.json'... + +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +projects/shared/src/logging.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +projects/shared/src/myClass.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +projects/shared/src/random.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +[HH:MM:SS AM] Project 'projects/server/tsconfig.json' is out of date because output 'projects/server/dist/server/tsconfig.tsbuildinfo' is older than input 'projects/shared/src/logging.ts' + +[HH:MM:SS AM] Building project 'projects/server/tsconfig.json'... + +======== Resolving module ':shared/myClass.js' from '/home/src/workspaces/solution/projects/server/src/server.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +'paths' option is specified, looking for a pattern to match module name ':shared/myClass.js'. +Module name ':shared/myClass.js', matched pattern ':shared/*'. +Trying substitution './src/../../shared/src/*', candidate module location: './src/../../shared/src/myClass.js'. +Loading module as file / folder, candidate module location '/home/src/workspaces/solution/projects/shared/src/myClass.js', target file types: TypeScript, JavaScript, Declaration, JSON. +File name '/home/src/workspaces/solution/projects/shared/src/myClass.js' has a '.js' extension - stripping it. +File '/home/src/workspaces/solution/projects/shared/src/myClass.ts' exists - use it as a name resolution result. +======== Module name ':shared/myClass.js' was successfully resolved to '/home/src/workspaces/solution/projects/shared/src/myClass.ts'. ======== +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +projects/shared/dist/src/logging.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/logging.ts' +projects/shared/dist/src/myClass.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/myClass.ts' +projects/shared/dist/src/random.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/random.ts' +projects/server/src/server.ts + Matched by include pattern 'src/**/*.ts' in 'projects/server/tsconfig.json' +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/workspaces/solution/projects/server/dist/server/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.d.ts","../../../shared/dist/src/logging.d.ts","../../../shared/dist/src/myClass.d.ts","../../../shared/dist/src/random.d.ts","../../src/server.ts","../../../shared/src/logging.ts","../../../shared/src/myClass.ts","../../../shared/src/random.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n","21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n","1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n",{"version":"12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[3]],"options":{"composite":true,"outDir":"..","rootDir":"../../.."},"referencedMap":[[5,1]],"latestChangedDtsFile":"./src/server.d.ts","resolvedRoot":[[2,6],[3,7],[4,8]]} +//// [/home/src/workspaces/solution/projects/server/dist/server/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../../shared/dist/src/logging.d.ts", + "../../../shared/dist/src/myClass.d.ts", + "../../../shared/dist/src/random.d.ts", + "../../src/server.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../../../shared/dist/src/logging.d.ts", + "../../../shared/dist/src/myClass.d.ts", + "../../../shared/dist/src/random.d.ts", + "../../src/server.ts", + "../../../shared/src/logging.ts", + "../../../shared/src/myClass.ts", + "../../../shared/src/random.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../../shared/dist/src/logging.d.ts", + "version": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "signature": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../../shared/dist/src/myClass.d.ts", + "version": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../../shared/dist/src/random.d.ts", + "version": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "signature": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../src/server.ts", + "version": "12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../../shared/dist/src/myClass.d.ts" + ] + ], + "options": { + "composite": true, + "outDir": "..", + "rootDir": "../../.." + }, + "referencedMap": { + "../../src/server.ts": [ + "../../../shared/dist/src/myClass.d.ts" + ] + }, + "latestChangedDtsFile": "./src/server.d.ts", + "resolvedRoot": [ + [ + "../../../shared/dist/src/logging.d.ts", + "../../../shared/src/logging.ts" + ], + [ + "../../../shared/dist/src/myClass.d.ts", + "../../../shared/src/myClass.ts" + ], + [ + "../../../shared/dist/src/random.d.ts", + "../../../shared/src/random.ts" + ] + ], + "size": 1758 +} +//// [/home/src/workspaces/solution/projects/shared/dist/src/logging.d.ts] *modified* +export declare function log(str: string): void; +export declare const x = 10; + +//// [/home/src/workspaces/solution/projects/shared/dist/src/logging.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.log = log; +function log(str) { + console.log(str); +} +exports.x = 10; + +//// [/home/src/workspaces/solution/projects/shared/dist/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../src/logging.ts","../src/myClass.ts","../src/random.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"107fb48a395fd47390346ab424ebcc12-export function log(str: string) {\n console.log(str);\n}export const x = 10;","signature":"5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n","impliedNodeFormat":1},{"version":"22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }","signature":"21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n","impliedNodeFormat":1},{"version":"4f1c4e78a007da37552cba1c9b98db63-export function randomFn(str: string) {\n console.log(str);\n}","signature":"1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./src/logging.d.ts"} +//// [/home/src/workspaces/solution/projects/shared/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../src/logging.ts", + "../src/myClass.ts", + "../src/random.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../src/logging.ts", + "../src/myClass.ts", + "../src/random.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/logging.ts", + "version": "107fb48a395fd47390346ab424ebcc12-export function log(str: string) {\n console.log(str);\n}export const x = 10;", + "signature": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "107fb48a395fd47390346ab424ebcc12-export function log(str: string) {\n console.log(str);\n}export const x = 10;", + "signature": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/myClass.ts", + "version": "22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/random.ts", + "version": "4f1c4e78a007da37552cba1c9b98db63-export function randomFn(str: string) {\n console.log(str);\n}", + "signature": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4f1c4e78a007da37552cba1c9b98db63-export function randomFn(str: string) {\n console.log(str);\n}", + "signature": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "outDir": "./" + }, + "latestChangedDtsFile": "./src/logging.d.ts", + "size": 1688 +} + +projects/shared/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/projects/shared/src/logging.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/projects/shared/src/logging.ts + +projects/server/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/projects/shared/dist/src/logging.d.ts +Signatures:: +(used version) /home/src/workspaces/solution/projects/shared/dist/src/logging.d.ts + + +Edit [2]:: no change + + +Output:: + + + +Edit [3]:: delete random file +//// [/home/src/workspaces/solution/projects/shared/src/random.ts] *deleted* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * projects/shared/tsconfig.json + * projects/server/tsconfig.json + +[HH:MM:SS AM] Project 'projects/shared/tsconfig.json' is out of date because buildinfo file 'projects/shared/dist/tsconfig.tsbuildinfo' indicates that file 'projects/shared/src/random.ts' was root file of compilation but not any more. + +[HH:MM:SS AM] Building project 'projects/shared/tsconfig.json'... + +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +projects/shared/src/logging.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +projects/shared/src/myClass.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +[HH:MM:SS AM] Project 'projects/server/tsconfig.json' is out of date because buildinfo file 'projects/server/dist/server/tsconfig.tsbuildinfo' indicates that file 'projects/shared/src/random.ts' was root file of compilation but not any more. + +[HH:MM:SS AM] Building project 'projects/server/tsconfig.json'... + +======== Resolving module ':shared/myClass.js' from '/home/src/workspaces/solution/projects/server/src/server.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +'paths' option is specified, looking for a pattern to match module name ':shared/myClass.js'. +Module name ':shared/myClass.js', matched pattern ':shared/*'. +Trying substitution './src/../../shared/src/*', candidate module location: './src/../../shared/src/myClass.js'. +Loading module as file / folder, candidate module location '/home/src/workspaces/solution/projects/shared/src/myClass.js', target file types: TypeScript, JavaScript, Declaration, JSON. +File name '/home/src/workspaces/solution/projects/shared/src/myClass.js' has a '.js' extension - stripping it. +File '/home/src/workspaces/solution/projects/shared/src/myClass.ts' exists - use it as a name resolution result. +======== Module name ':shared/myClass.js' was successfully resolved to '/home/src/workspaces/solution/projects/shared/src/myClass.ts'. ======== +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +projects/shared/dist/src/logging.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/logging.ts' +projects/shared/dist/src/myClass.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/myClass.ts' +projects/server/src/server.ts + Matched by include pattern 'src/**/*.ts' in 'projects/server/tsconfig.json' +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/workspaces/solution/projects/server/dist/server/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../../../shared/dist/src/logging.d.ts","../../../shared/dist/src/myClass.d.ts","../../src/server.ts","../../../shared/src/logging.ts","../../../shared/src/myClass.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n","21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n",{"version":"12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[3]],"options":{"composite":true,"outDir":"..","rootDir":"../../.."},"referencedMap":[[4,1]],"latestChangedDtsFile":"./src/server.d.ts","resolvedRoot":[[2,5],[3,6]]} +//// [/home/src/workspaces/solution/projects/server/dist/server/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../../shared/dist/src/logging.d.ts", + "../../../shared/dist/src/myClass.d.ts", + "../../src/server.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../../../shared/dist/src/logging.d.ts", + "../../../shared/dist/src/myClass.d.ts", + "../../src/server.ts", + "../../../shared/src/logging.ts", + "../../../shared/src/myClass.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../../shared/dist/src/logging.d.ts", + "version": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "signature": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../../shared/dist/src/myClass.d.ts", + "version": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../src/server.ts", + "version": "12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../../shared/dist/src/myClass.d.ts" + ] + ], + "options": { + "composite": true, + "outDir": "..", + "rootDir": "../../.." + }, + "referencedMap": { + "../../src/server.ts": [ + "../../../shared/dist/src/myClass.d.ts" + ] + }, + "latestChangedDtsFile": "./src/server.d.ts", + "resolvedRoot": [ + [ + "../../../shared/dist/src/logging.d.ts", + "../../../shared/src/logging.ts" + ], + [ + "../../../shared/dist/src/myClass.d.ts", + "../../../shared/src/myClass.ts" + ] + ], + "size": 1591 +} +//// [/home/src/workspaces/solution/projects/shared/dist/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","../src/logging.ts","../src/myClass.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"107fb48a395fd47390346ab424ebcc12-export function log(str: string) {\n console.log(str);\n}export const x = 10;","signature":"5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n","impliedNodeFormat":1},{"version":"22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }","signature":"21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./src/logging.d.ts"} +//// [/home/src/workspaces/solution/projects/shared/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../src/logging.ts", + "../src/myClass.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../src/logging.ts", + "../src/myClass.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/logging.ts", + "version": "107fb48a395fd47390346ab424ebcc12-export function log(str: string) {\n console.log(str);\n}export const x = 10;", + "signature": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "107fb48a395fd47390346ab424ebcc12-export function log(str: string) {\n console.log(str);\n}export const x = 10;", + "signature": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/myClass.ts", + "version": "22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "outDir": "./" + }, + "latestChangedDtsFile": "./src/logging.d.ts", + "size": 1432 +} + +projects/shared/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + +projects/server/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [4]:: no change + + +Output:: + diff --git a/testdata/baselines/reference/tsbuildWatch/roots/when-root-file-is-from-referenced-project.js b/testdata/baselines/reference/tsbuildWatch/roots/when-root-file-is-from-referenced-project.js new file mode 100644 index 0000000000..22b038f81c --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/roots/when-root-file-is-from-referenced-project.js @@ -0,0 +1,867 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/projects/server/src/server.ts] *new* +import { MyClass } from ':shared/myClass.js'; +console.log('Hello, world!'); +//// [/home/src/workspaces/solution/projects/server/tsconfig.json] *new* +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "..", + "outDir": "./dist", + "paths": { + ":shared/*": ["./src/../../shared/src/*"], + }, + }, + "include": [ "src/**/*.ts", "../shared/src/**/*.ts" ], + "references": [ + { "path": "../shared" }, + ], +} +//// [/home/src/workspaces/solution/projects/shared/src/logging.ts] *new* +export function log(str: string) { + console.log(str); +} +//// [/home/src/workspaces/solution/projects/shared/src/myClass.ts] *new* +export class MyClass { } +//// [/home/src/workspaces/solution/projects/shared/src/random.ts] *new* +export function randomFn(str: string) { + console.log(str); +} +//// [/home/src/workspaces/solution/projects/shared/tsconfig.json] *new* +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + }, + "include": ["src/**/*.ts"], +} +//// [/home/src/workspaces/solution/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "projects/server" }, + { "path": "projects/shared" }, + ], +} + +tsgo --b -w projects/server -v --traceResolution --explainFiles +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * projects/shared/tsconfig.json + * projects/server/tsconfig.json + +[HH:MM:SS AM] Project 'projects/shared/tsconfig.json' is out of date because output file 'projects/shared/dist/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'projects/shared/tsconfig.json'... + +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +projects/shared/src/logging.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +projects/shared/src/myClass.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +projects/shared/src/random.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +[HH:MM:SS AM] Project 'projects/server/tsconfig.json' is out of date because output file 'projects/server/dist/server/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'projects/server/tsconfig.json'... + +======== Resolving module ':shared/myClass.js' from '/home/src/workspaces/solution/projects/server/src/server.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +'paths' option is specified, looking for a pattern to match module name ':shared/myClass.js'. +Module name ':shared/myClass.js', matched pattern ':shared/*'. +Trying substitution './src/../../shared/src/*', candidate module location: './src/../../shared/src/myClass.js'. +Loading module as file / folder, candidate module location '/home/src/workspaces/solution/projects/shared/src/myClass.js', target file types: TypeScript, JavaScript, Declaration, JSON. +File name '/home/src/workspaces/solution/projects/shared/src/myClass.js' has a '.js' extension - stripping it. +File '/home/src/workspaces/solution/projects/shared/src/myClass.ts' exists - use it as a name resolution result. +======== Module name ':shared/myClass.js' was successfully resolved to '/home/src/workspaces/solution/projects/shared/src/myClass.ts'. ======== +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +projects/shared/dist/src/myClass.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/myClass.ts' +projects/server/src/server.ts + Matched by include pattern 'src/**/*.ts' in 'projects/server/tsconfig.json' +projects/shared/dist/src/logging.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/logging.ts' +projects/shared/dist/src/random.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/random.ts' +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/home/src/workspaces/solution/projects/server/dist/server/src/server.d.ts] *new* +export {}; + +//// [/home/src/workspaces/solution/projects/server/dist/server/src/server.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log('Hello, world!'); + +//// [/home/src/workspaces/solution/projects/server/dist/server/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.d.ts","../../../shared/dist/src/myClass.d.ts","../../src/server.ts","../../../shared/dist/src/logging.d.ts","../../../shared/dist/src/random.d.ts","../../../shared/src/myClass.ts","../../../shared/src/logging.ts","../../../shared/src/random.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n",{"version":"12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"380f2d6d625cf989bc9f9bcd67ce3afe-export declare function log(str: string): void;\n","1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n"],"fileIdsList":[[2]],"options":{"composite":true,"outDir":"..","rootDir":"../../.."},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/server.d.ts","resolvedRoot":[[2,6],[4,7],[5,8]]} +//// [/home/src/workspaces/solution/projects/server/dist/server/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../../shared/dist/src/myClass.d.ts", + "../../src/server.ts", + "../../../shared/dist/src/logging.d.ts", + "../../../shared/dist/src/random.d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../../../shared/dist/src/myClass.d.ts", + "../../src/server.ts", + "../../../shared/dist/src/logging.d.ts", + "../../../shared/dist/src/random.d.ts", + "../../../shared/src/myClass.ts", + "../../../shared/src/logging.ts", + "../../../shared/src/random.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../../shared/dist/src/myClass.d.ts", + "version": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../src/server.ts", + "version": "12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../../shared/dist/src/logging.d.ts", + "version": "380f2d6d625cf989bc9f9bcd67ce3afe-export declare function log(str: string): void;\n", + "signature": "380f2d6d625cf989bc9f9bcd67ce3afe-export declare function log(str: string): void;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../../shared/dist/src/random.d.ts", + "version": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "signature": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "../../../shared/dist/src/myClass.d.ts" + ] + ], + "options": { + "composite": true, + "outDir": "..", + "rootDir": "../../.." + }, + "referencedMap": { + "../../src/server.ts": [ + "../../../shared/dist/src/myClass.d.ts" + ] + }, + "latestChangedDtsFile": "./src/server.d.ts", + "resolvedRoot": [ + [ + "../../../shared/dist/src/myClass.d.ts", + "../../../shared/src/myClass.ts" + ], + [ + "../../../shared/dist/src/logging.d.ts", + "../../../shared/src/logging.ts" + ], + [ + "../../../shared/dist/src/random.d.ts", + "../../../shared/src/random.ts" + ] + ], + "size": 1728 +} +//// [/home/src/workspaces/solution/projects/shared/dist/src/logging.d.ts] *new* +export declare function log(str: string): void; + +//// [/home/src/workspaces/solution/projects/shared/dist/src/logging.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.log = log; +function log(str) { + console.log(str); +} + +//// [/home/src/workspaces/solution/projects/shared/dist/src/myClass.d.ts] *new* +export declare class MyClass { +} + +//// [/home/src/workspaces/solution/projects/shared/dist/src/myClass.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MyClass = void 0; +class MyClass { +} +exports.MyClass = MyClass; + +//// [/home/src/workspaces/solution/projects/shared/dist/src/random.d.ts] *new* +export declare function randomFn(str: string): void; + +//// [/home/src/workspaces/solution/projects/shared/dist/src/random.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.randomFn = randomFn; +function randomFn(str) { + console.log(str); +} + +//// [/home/src/workspaces/solution/projects/shared/dist/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../src/logging.ts","../src/myClass.ts","../src/random.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e8c4594410128d4531f2321647cc451d-export function log(str: string) {\n console.log(str);\n}","signature":"380f2d6d625cf989bc9f9bcd67ce3afe-export declare function log(str: string): void;\n","impliedNodeFormat":1},{"version":"22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }","signature":"21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n","impliedNodeFormat":1},{"version":"4f1c4e78a007da37552cba1c9b98db63-export function randomFn(str: string) {\n console.log(str);\n}","signature":"1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./src/random.d.ts"} +//// [/home/src/workspaces/solution/projects/shared/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../src/logging.ts", + "../src/myClass.ts", + "../src/random.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../src/logging.ts", + "../src/myClass.ts", + "../src/random.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/logging.ts", + "version": "e8c4594410128d4531f2321647cc451d-export function log(str: string) {\n console.log(str);\n}", + "signature": "380f2d6d625cf989bc9f9bcd67ce3afe-export declare function log(str: string): void;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e8c4594410128d4531f2321647cc451d-export function log(str: string) {\n console.log(str);\n}", + "signature": "380f2d6d625cf989bc9f9bcd67ce3afe-export declare function log(str: string): void;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/myClass.ts", + "version": "22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/random.ts", + "version": "4f1c4e78a007da37552cba1c9b98db63-export function randomFn(str: string) {\n console.log(str);\n}", + "signature": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4f1c4e78a007da37552cba1c9b98db63-export function randomFn(str: string) {\n console.log(str);\n}", + "signature": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "outDir": "./" + }, + "latestChangedDtsFile": "./src/random.d.ts", + "size": 1637 +} + +projects/shared/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/projects/shared/src/logging.ts +*refresh* /home/src/workspaces/solution/projects/shared/src/myClass.ts +*refresh* /home/src/workspaces/solution/projects/shared/src/random.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/projects/shared/src/logging.ts +(stored at emit) /home/src/workspaces/solution/projects/shared/src/myClass.ts +(stored at emit) /home/src/workspaces/solution/projects/shared/src/random.ts + +projects/server/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/projects/shared/dist/src/myClass.d.ts +*refresh* /home/src/workspaces/solution/projects/server/src/server.ts +*refresh* /home/src/workspaces/solution/projects/shared/dist/src/logging.d.ts +*refresh* /home/src/workspaces/solution/projects/shared/dist/src/random.d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/projects/server/src/server.ts + + +Edit [0]:: no change + + +Output:: + + + +Edit [1]:: edit logging file +//// [/home/src/workspaces/solution/projects/shared/src/logging.ts] *modified* +export function log(str: string) { + console.log(str); +}export const x = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * projects/shared/tsconfig.json + * projects/server/tsconfig.json + +[HH:MM:SS AM] Project 'projects/shared/tsconfig.json' is out of date because output 'projects/shared/dist/tsconfig.tsbuildinfo' is older than input 'projects/shared/src/logging.ts' + +[HH:MM:SS AM] Building project 'projects/shared/tsconfig.json'... + +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +projects/shared/src/logging.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +projects/shared/src/myClass.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +projects/shared/src/random.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +[HH:MM:SS AM] Project 'projects/server/tsconfig.json' is out of date because output 'projects/server/dist/server/tsconfig.tsbuildinfo' is older than input 'projects/shared/src/logging.ts' + +[HH:MM:SS AM] Building project 'projects/server/tsconfig.json'... + +======== Resolving module ':shared/myClass.js' from '/home/src/workspaces/solution/projects/server/src/server.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +'paths' option is specified, looking for a pattern to match module name ':shared/myClass.js'. +Module name ':shared/myClass.js', matched pattern ':shared/*'. +Trying substitution './src/../../shared/src/*', candidate module location: './src/../../shared/src/myClass.js'. +Loading module as file / folder, candidate module location '/home/src/workspaces/solution/projects/shared/src/myClass.js', target file types: TypeScript, JavaScript, Declaration, JSON. +File name '/home/src/workspaces/solution/projects/shared/src/myClass.js' has a '.js' extension - stripping it. +File '/home/src/workspaces/solution/projects/shared/src/myClass.ts' exists - use it as a name resolution result. +======== Module name ':shared/myClass.js' was successfully resolved to '/home/src/workspaces/solution/projects/shared/src/myClass.ts'. ======== +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +projects/shared/dist/src/myClass.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/myClass.ts' +projects/server/src/server.ts + Matched by include pattern 'src/**/*.ts' in 'projects/server/tsconfig.json' +projects/shared/dist/src/logging.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/logging.ts' +projects/shared/dist/src/random.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/random.ts' +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/workspaces/solution/projects/server/dist/server/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.d.ts","../../../shared/dist/src/myClass.d.ts","../../src/server.ts","../../../shared/dist/src/logging.d.ts","../../../shared/dist/src/random.d.ts","../../../shared/src/myClass.ts","../../../shared/src/logging.ts","../../../shared/src/random.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n",{"version":"12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n","1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n"],"fileIdsList":[[2]],"options":{"composite":true,"outDir":"..","rootDir":"../../.."},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/server.d.ts","resolvedRoot":[[2,6],[4,7],[5,8]]} +//// [/home/src/workspaces/solution/projects/server/dist/server/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../../shared/dist/src/myClass.d.ts", + "../../src/server.ts", + "../../../shared/dist/src/logging.d.ts", + "../../../shared/dist/src/random.d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../../../shared/dist/src/myClass.d.ts", + "../../src/server.ts", + "../../../shared/dist/src/logging.d.ts", + "../../../shared/dist/src/random.d.ts", + "../../../shared/src/myClass.ts", + "../../../shared/src/logging.ts", + "../../../shared/src/random.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../../shared/dist/src/myClass.d.ts", + "version": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../src/server.ts", + "version": "12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../../shared/dist/src/logging.d.ts", + "version": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "signature": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../../shared/dist/src/random.d.ts", + "version": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "signature": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "../../../shared/dist/src/myClass.d.ts" + ] + ], + "options": { + "composite": true, + "outDir": "..", + "rootDir": "../../.." + }, + "referencedMap": { + "../../src/server.ts": [ + "../../../shared/dist/src/myClass.d.ts" + ] + }, + "latestChangedDtsFile": "./src/server.d.ts", + "resolvedRoot": [ + [ + "../../../shared/dist/src/myClass.d.ts", + "../../../shared/src/myClass.ts" + ], + [ + "../../../shared/dist/src/logging.d.ts", + "../../../shared/src/logging.ts" + ], + [ + "../../../shared/dist/src/random.d.ts", + "../../../shared/src/random.ts" + ] + ], + "size": 1758 +} +//// [/home/src/workspaces/solution/projects/shared/dist/src/logging.d.ts] *modified* +export declare function log(str: string): void; +export declare const x = 10; + +//// [/home/src/workspaces/solution/projects/shared/dist/src/logging.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.log = log; +function log(str) { + console.log(str); +} +exports.x = 10; + +//// [/home/src/workspaces/solution/projects/shared/dist/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../src/logging.ts","../src/myClass.ts","../src/random.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"107fb48a395fd47390346ab424ebcc12-export function log(str: string) {\n console.log(str);\n}export const x = 10;","signature":"5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n","impliedNodeFormat":1},{"version":"22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }","signature":"21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n","impliedNodeFormat":1},{"version":"4f1c4e78a007da37552cba1c9b98db63-export function randomFn(str: string) {\n console.log(str);\n}","signature":"1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./src/logging.d.ts"} +//// [/home/src/workspaces/solution/projects/shared/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../src/logging.ts", + "../src/myClass.ts", + "../src/random.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../src/logging.ts", + "../src/myClass.ts", + "../src/random.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/logging.ts", + "version": "107fb48a395fd47390346ab424ebcc12-export function log(str: string) {\n console.log(str);\n}export const x = 10;", + "signature": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "107fb48a395fd47390346ab424ebcc12-export function log(str: string) {\n console.log(str);\n}export const x = 10;", + "signature": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/myClass.ts", + "version": "22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/random.ts", + "version": "4f1c4e78a007da37552cba1c9b98db63-export function randomFn(str: string) {\n console.log(str);\n}", + "signature": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4f1c4e78a007da37552cba1c9b98db63-export function randomFn(str: string) {\n console.log(str);\n}", + "signature": "1d6adcd8c4dee61b744fc1ff84370372-export declare function randomFn(str: string): void;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "outDir": "./" + }, + "latestChangedDtsFile": "./src/logging.d.ts", + "size": 1688 +} + +projects/shared/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/projects/shared/src/logging.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/projects/shared/src/logging.ts + +projects/server/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/projects/shared/dist/src/logging.d.ts +Signatures:: +(used version) /home/src/workspaces/solution/projects/shared/dist/src/logging.d.ts + + +Edit [2]:: no change + + +Output:: + + + +Edit [3]:: delete random file +//// [/home/src/workspaces/solution/projects/shared/src/random.ts] *deleted* + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * projects/shared/tsconfig.json + * projects/server/tsconfig.json + +[HH:MM:SS AM] Project 'projects/shared/tsconfig.json' is out of date because buildinfo file 'projects/shared/dist/tsconfig.tsbuildinfo' indicates that file 'projects/shared/src/random.ts' was root file of compilation but not any more. + +[HH:MM:SS AM] Building project 'projects/shared/tsconfig.json'... + +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +projects/shared/src/logging.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +projects/shared/src/myClass.ts + Matched by include pattern 'src/**/*.ts' in 'projects/shared/tsconfig.json' +[HH:MM:SS AM] Project 'projects/server/tsconfig.json' is out of date because buildinfo file 'projects/server/dist/server/tsconfig.tsbuildinfo' indicates that file 'projects/shared/src/random.ts' was root file of compilation but not any more. + +[HH:MM:SS AM] Building project 'projects/server/tsconfig.json'... + +======== Resolving module ':shared/myClass.js' from '/home/src/workspaces/solution/projects/server/src/server.ts'. ======== +Module resolution kind is not specified, using 'Bundler'. +Resolving in CJS mode with conditions 'require', 'types'. +'paths' option is specified, looking for a pattern to match module name ':shared/myClass.js'. +Module name ':shared/myClass.js', matched pattern ':shared/*'. +Trying substitution './src/../../shared/src/*', candidate module location: './src/../../shared/src/myClass.js'. +Loading module as file / folder, candidate module location '/home/src/workspaces/solution/projects/shared/src/myClass.js', target file types: TypeScript, JavaScript, Declaration, JSON. +File name '/home/src/workspaces/solution/projects/shared/src/myClass.js' has a '.js' extension - stripping it. +File '/home/src/workspaces/solution/projects/shared/src/myClass.ts' exists - use it as a name resolution result. +======== Module name ':shared/myClass.js' was successfully resolved to '/home/src/workspaces/solution/projects/shared/src/myClass.ts'. ======== +../../tslibs/TS/Lib/lib.d.ts + Default library for target 'ES5' +projects/shared/dist/src/myClass.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/myClass.ts' +projects/server/src/server.ts + Matched by include pattern 'src/**/*.ts' in 'projects/server/tsconfig.json' +projects/shared/dist/src/logging.d.ts + Matched by include pattern '../shared/src/**/*.ts' in 'projects/server/tsconfig.json' + File is output of project reference source 'projects/shared/src/logging.ts' +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/workspaces/solution/projects/server/dist/server/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../../../shared/dist/src/myClass.d.ts","../../src/server.ts","../../../shared/dist/src/logging.d.ts","../../../shared/src/myClass.ts","../../../shared/src/logging.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n",{"version":"12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n"],"fileIdsList":[[2]],"options":{"composite":true,"outDir":"..","rootDir":"../../.."},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/server.d.ts","resolvedRoot":[[2,5],[4,6]]} +//// [/home/src/workspaces/solution/projects/server/dist/server/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../../shared/dist/src/myClass.d.ts", + "../../src/server.ts", + "../../../shared/dist/src/logging.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../../../shared/dist/src/myClass.d.ts", + "../../src/server.ts", + "../../../shared/dist/src/logging.d.ts", + "../../../shared/src/myClass.ts", + "../../../shared/src/logging.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../../shared/dist/src/myClass.d.ts", + "version": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../src/server.ts", + "version": "12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "12354a7ec5afade35d10a2c1fa79eb29-import { MyClass } from ':shared/myClass.js';\nconsole.log('Hello, world!');", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../../shared/dist/src/logging.d.ts", + "version": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "signature": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "../../../shared/dist/src/myClass.d.ts" + ] + ], + "options": { + "composite": true, + "outDir": "..", + "rootDir": "../../.." + }, + "referencedMap": { + "../../src/server.ts": [ + "../../../shared/dist/src/myClass.d.ts" + ] + }, + "latestChangedDtsFile": "./src/server.d.ts", + "resolvedRoot": [ + [ + "../../../shared/dist/src/myClass.d.ts", + "../../../shared/src/myClass.ts" + ], + [ + "../../../shared/dist/src/logging.d.ts", + "../../../shared/src/logging.ts" + ] + ], + "size": 1591 +} +//// [/home/src/workspaces/solution/projects/shared/dist/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.d.ts","../src/logging.ts","../src/myClass.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"107fb48a395fd47390346ab424ebcc12-export function log(str: string) {\n console.log(str);\n}export const x = 10;","signature":"5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n","impliedNodeFormat":1},{"version":"22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }","signature":"21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./src/logging.d.ts"} +//// [/home/src/workspaces/solution/projects/shared/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../src/logging.ts", + "../src/myClass.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../src/logging.ts", + "../src/myClass.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/logging.ts", + "version": "107fb48a395fd47390346ab424ebcc12-export function log(str: string) {\n console.log(str);\n}export const x = 10;", + "signature": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "107fb48a395fd47390346ab424ebcc12-export function log(str: string) {\n console.log(str);\n}export const x = 10;", + "signature": "5178e2a779ca8b29fb07201995347a09-export declare function log(str: string): void;\nexport declare const x = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/myClass.ts", + "version": "22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "22f018e389f527d25fc2ad2b2c6c9702-export class MyClass { }", + "signature": "21b0030a128ccc5aedc6fdbe3cdf12e3-export declare class MyClass {\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "outDir": "./" + }, + "latestChangedDtsFile": "./src/logging.d.ts", + "size": 1432 +} + +projects/shared/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + +projects/server/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [4]:: no change + + +Output:: + diff --git a/testdata/baselines/reference/tsbuildWatch/sample/builds-when-new-file-is-added,-and-its-subsequent-updates-with-circular-references.js b/testdata/baselines/reference/tsbuildWatch/sample/builds-when-new-file-is-added,-and-its-subsequent-updates-with-circular-references.js new file mode 100644 index 0000000000..4ecab36d83 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/builds-when-new-file-is-added,-and-its-subsequent-updates-with-circular-references.js @@ -0,0 +1,689 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true + }, + "references": [ + { "path": "../tests", "circular": true } + ], +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b -w tests +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; + +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; + +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1769 +} +//// [/user/username/projects/sample1/logic/index.d.ts] *new* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/logic/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *new* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1801 +} +//// [/user/username/projects/sample1/tests/index.d.ts] *new* +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +const c = require("../core/index"); +const logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1960 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/tests/index.ts + + +Edit [0]:: Change to new File and build core +//// [/user/username/projects/sample1/core/newfile.ts] *new* +export const newFileConst = 30; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/newfile.d.ts] *new* +export declare const newFileConst = 30; + +//// [/user/username/projects/sample1/core/newfile.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.newFileConst = void 0; +exports.newFileConst = 30; + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./newfile.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"046181f7f382942435700923f254abbd-export const newFileConst = 30;","signature":"a58a2a5c0f75f5061a8fd33d410e8e87-export declare const newFileConst = 30;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./newfile.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./newfile.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./newfile.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./newfile.ts", + "version": "046181f7f382942435700923f254abbd-export const newFileConst = 30;", + "signature": "a58a2a5c0f75f5061a8fd33d410e8e87-export declare const newFileConst = 30;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "046181f7f382942435700923f254abbd-export const newFileConst = 30;", + "signature": "a58a2a5c0f75f5061a8fd33d410e8e87-export declare const newFileConst = 30;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true + }, + "latestChangedDtsFile": "./newfile.d.ts", + "size": 1976 +} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *mTime changed* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *mTime changed* + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/newfile.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/newfile.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + +tests/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [1]:: Change to new File and build core +//// [/user/username/projects/sample1/core/newfile.ts] *modified* + +export class someClass2 { } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/newfile.d.ts] *modified* +export declare class someClass2 { +} + +//// [/user/username/projects/sample1/core/newfile.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someClass2 = void 0; +class someClass2 { +} +exports.someClass2 = someClass2; + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./newfile.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"be01929bbca74e4343ac8d7aa9c08b55-\nexport class someClass2 { }","signature":"6235ba91ce253ead4599fe030935931e-export declare class someClass2 {\n}\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./newfile.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./newfile.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./newfile.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./newfile.ts", + "version": "be01929bbca74e4343ac8d7aa9c08b55-\nexport class someClass2 { }", + "signature": "6235ba91ce253ead4599fe030935931e-export declare class someClass2 {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "be01929bbca74e4343ac8d7aa9c08b55-\nexport class someClass2 { }", + "signature": "6235ba91ce253ead4599fe030935931e-export declare class someClass2 {\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true + }, + "latestChangedDtsFile": "./newfile.d.ts", + "size": 1971 +} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *mTime changed* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *mTime changed* + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/newfile.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/newfile.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + +tests/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/sample/builds-when-new-file-is-added,-and-its-subsequent-updates.js b/testdata/baselines/reference/tsbuildWatch/sample/builds-when-new-file-is-added,-and-its-subsequent-updates.js new file mode 100644 index 0000000000..16f7da7a0d --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/builds-when-new-file-is-added,-and-its-subsequent-updates.js @@ -0,0 +1,702 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b -w tests +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] *new* +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *new* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1818 +} +//// [/user/username/projects/sample1/logic/index.d.ts] *new* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/logic/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *new* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1879 +} +//// [/user/username/projects/sample1/tests/index.d.ts] *new* +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +const c = require("../core/index"); +const logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2038 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/tests/index.ts + + +Edit [0]:: Change to new File and build core +//// [/user/username/projects/sample1/core/newfile.ts] *new* +export const newFileConst = 30; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/newfile.d.ts] *new* +export declare const newFileConst = 30; +//# sourceMappingURL=newfile.d.ts.map +//// [/user/username/projects/sample1/core/newfile.d.ts.map] *new* +{"version":3,"file":"newfile.d.ts","sourceRoot":"","sources":["newfile.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,KAAK,CAAC"} +//// [/user/username/projects/sample1/core/newfile.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.newFileConst = void 0; +exports.newFileConst = 30; + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./newfile.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"046181f7f382942435700923f254abbd-export const newFileConst = 30;","signature":"a58a2a5c0f75f5061a8fd33d410e8e87-export declare const newFileConst = 30;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./newfile.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./newfile.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./newfile.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./newfile.ts", + "version": "046181f7f382942435700923f254abbd-export const newFileConst = 30;", + "signature": "a58a2a5c0f75f5061a8fd33d410e8e87-export declare const newFileConst = 30;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "046181f7f382942435700923f254abbd-export const newFileConst = 30;", + "signature": "a58a2a5c0f75f5061a8fd33d410e8e87-export declare const newFileConst = 30;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./newfile.d.ts", + "size": 2025 +} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *mTime changed* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *mTime changed* + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/newfile.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/newfile.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + +tests/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [1]:: Change to new File and build core +//// [/user/username/projects/sample1/core/newfile.ts] *modified* + +export class someClass2 { } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/newfile.d.ts] *modified* +export declare class someClass2 { +} +//# sourceMappingURL=newfile.d.ts.map +//// [/user/username/projects/sample1/core/newfile.d.ts.map] *modified* +{"version":3,"file":"newfile.d.ts","sourceRoot":"","sources":["newfile.ts"],"names":[],"mappings":"AACA,qBAAa,UAAU;CAAI"} +//// [/user/username/projects/sample1/core/newfile.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someClass2 = void 0; +class someClass2 { +} +exports.someClass2 = someClass2; + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./newfile.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"be01929bbca74e4343ac8d7aa9c08b55-\nexport class someClass2 { }","signature":"6235ba91ce253ead4599fe030935931e-export declare class someClass2 {\n}\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./newfile.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./newfile.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./newfile.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./newfile.ts", + "version": "be01929bbca74e4343ac8d7aa9c08b55-\nexport class someClass2 { }", + "signature": "6235ba91ce253ead4599fe030935931e-export declare class someClass2 {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "be01929bbca74e4343ac8d7aa9c08b55-\nexport class someClass2 { }", + "signature": "6235ba91ce253ead4599fe030935931e-export declare class someClass2 {\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./newfile.d.ts", + "size": 2020 +} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *mTime changed* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *mTime changed* + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/newfile.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/newfile.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + +tests/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuildWatch/sample/change-builds-changes-and-reports-found-errors-message-with-circular-references.js b/testdata/baselines/reference/tsbuildWatch/sample/change-builds-changes-and-reports-found-errors-message-with-circular-references.js new file mode 100644 index 0000000000..c3368f7f8f --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/change-builds-changes-and-reports-found-errors-message-with-circular-references.js @@ -0,0 +1,1348 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true + }, + "references": [ + { "path": "../tests", "circular": true } + ], +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b -w tests +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; + +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; + +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1769 +} +//// [/user/username/projects/sample1/logic/index.d.ts] *new* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/logic/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *new* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1801 +} +//// [/user/username/projects/sample1/tests/index.d.ts] *new* +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +const c = require("../core/index"); +const logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1960 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/tests/index.ts + + +Edit [0]:: Make change to core +//// [/user/username/projects/sample1/core/index.ts] *modified* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/index.d.ts] *modified* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +export declare class someClass { +} + +//// [/user/username/projects/sample1/core/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someClass = exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +class someClass { +} +exports.someClass = someClass; + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"ce98c7b232474711a6089b586825cf2a-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nexport class someClass { }","signature":"f678e4b80b87bcfac584b8a641b31960-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "ce98c7b232474711a6089b586825cf2a-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nexport class someClass { }", + "signature": "f678e4b80b87bcfac584b8a641b31960-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "ce98c7b232474711a6089b586825cf2a-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nexport class someClass { }", + "signature": "f678e4b80b87bcfac584b8a641b31960-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1834 +} +//// [/user/username/projects/sample1/logic/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/logic/index.js.map] *rewrite with same content* +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"f678e4b80b87bcfac584b8a641b31960-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n","5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "f678e4b80b87bcfac584b8a641b31960-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n", + "signature": "f678e4b80b87bcfac584b8a641b31960-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1838 +} +//// [/user/username/projects/sample1/tests/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"f678e4b80b87bcfac584b8a641b31960-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n","5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "f678e4b80b87bcfac584b8a641b31960-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n", + "signature": "f678e4b80b87bcfac584b8a641b31960-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1997 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(used version) /user/username/projects/sample1/core/index.d.ts +(computed .d.ts) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(used version) /user/username/projects/sample1/core/index.d.ts +(computed .d.ts) /user/username/projects/sample1/tests/index.ts + + +Edit [1]:: Revert core file +//// [/user/username/projects/sample1/core/index.ts] *modified* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/index.d.ts] *modified* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; + +//// [/user/username/projects/sample1/core/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1769 +} +//// [/user/username/projects/sample1/logic/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/logic/index.js.map] *rewrite with same content* +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1801 +} +//// [/user/username/projects/sample1/tests/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1960 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(used version) /user/username/projects/sample1/core/index.d.ts +(computed .d.ts) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(used version) /user/username/projects/sample1/core/index.d.ts +(computed .d.ts) /user/username/projects/sample1/tests/index.ts + + +Edit [2]:: Make two changes +//// [/user/username/projects/sample1/core/index.ts] *modified* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { } +export class someClass2 { } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/index.d.ts] *modified* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +export declare class someClass { +} +export declare class someClass2 { +} + +//// [/user/username/projects/sample1/core/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someClass2 = exports.someClass = exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +class someClass { +} +exports.someClass = someClass; +class someClass2 { +} +exports.someClass2 = someClass2; + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"3682101db2184c6bccaa98c1c1ac0791-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nexport class someClass { }\nexport class someClass2 { }","signature":"6b05b9011aa41b6b276b3708df078d1d-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "3682101db2184c6bccaa98c1c1ac0791-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nexport class someClass { }\nexport class someClass2 { }", + "signature": "6b05b9011aa41b6b276b3708df078d1d-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "3682101db2184c6bccaa98c1c1ac0791-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nexport class someClass { }\nexport class someClass2 { }", + "signature": "6b05b9011aa41b6b276b3708df078d1d-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1901 +} +//// [/user/username/projects/sample1/logic/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/logic/index.js.map] *rewrite with same content* +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"6b05b9011aa41b6b276b3708df078d1d-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n","5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "6b05b9011aa41b6b276b3708df078d1d-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n", + "signature": "6b05b9011aa41b6b276b3708df078d1d-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1876 +} +//// [/user/username/projects/sample1/tests/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"6b05b9011aa41b6b276b3708df078d1d-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n","5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "6b05b9011aa41b6b276b3708df078d1d-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n", + "signature": "6b05b9011aa41b6b276b3708df078d1d-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2035 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(used version) /user/username/projects/sample1/core/index.d.ts +(computed .d.ts) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(used version) /user/username/projects/sample1/core/index.d.ts +(computed .d.ts) /user/username/projects/sample1/tests/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/sample/change-builds-changes-and-reports-found-errors-message.js b/testdata/baselines/reference/tsbuildWatch/sample/change-builds-changes-and-reports-found-errors-message.js new file mode 100644 index 0000000000..ef0e973e10 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/change-builds-changes-and-reports-found-errors-message.js @@ -0,0 +1,1365 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b -w tests +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] *new* +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *new* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1818 +} +//// [/user/username/projects/sample1/logic/index.d.ts] *new* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/logic/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *new* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1879 +} +//// [/user/username/projects/sample1/tests/index.d.ts] *new* +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +const c = require("../core/index"); +const logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2038 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/tests/index.ts + + +Edit [0]:: Make change to core +//// [/user/username/projects/sample1/core/index.ts] *modified* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/index.d.ts] *modified* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +export declare class someClass { +} +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *modified* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAChE,qBAAa,SAAS;CAAI"} +//// [/user/username/projects/sample1/core/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someClass = exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +class someClass { +} +exports.someClass = someClass; + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"ce98c7b232474711a6089b586825cf2a-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nexport class someClass { }","signature":"f678e4b80b87bcfac584b8a641b31960-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "ce98c7b232474711a6089b586825cf2a-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nexport class someClass { }", + "signature": "f678e4b80b87bcfac584b8a641b31960-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "ce98c7b232474711a6089b586825cf2a-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nexport class someClass { }", + "signature": "f678e4b80b87bcfac584b8a641b31960-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1883 +} +//// [/user/username/projects/sample1/logic/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/logic/index.js.map] *rewrite with same content* +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"4c69c21de8985cc5cf2addb044c738b6-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "4c69c21de8985cc5cf2addb044c738b6-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n//# sourceMappingURL=index.d.ts.map", + "signature": "4c69c21de8985cc5cf2addb044c738b6-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1916 +} +//// [/user/username/projects/sample1/tests/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"4c69c21de8985cc5cf2addb044c738b6-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "4c69c21de8985cc5cf2addb044c738b6-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n//# sourceMappingURL=index.d.ts.map", + "signature": "4c69c21de8985cc5cf2addb044c738b6-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2075 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(used version) /user/username/projects/sample1/core/index.d.ts +(computed .d.ts) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(used version) /user/username/projects/sample1/core/index.d.ts +(computed .d.ts) /user/username/projects/sample1/tests/index.ts + + +Edit [1]:: Revert core file +//// [/user/username/projects/sample1/core/index.ts] *modified* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/index.d.ts] *modified* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *modified* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} +//// [/user/username/projects/sample1/core/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1818 +} +//// [/user/username/projects/sample1/logic/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/logic/index.js.map] *rewrite with same content* +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1879 +} +//// [/user/username/projects/sample1/tests/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2038 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(used version) /user/username/projects/sample1/core/index.d.ts +(computed .d.ts) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(used version) /user/username/projects/sample1/core/index.d.ts +(computed .d.ts) /user/username/projects/sample1/tests/index.ts + + +Edit [2]:: Make two changes +//// [/user/username/projects/sample1/core/index.ts] *modified* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +export class someClass { } +export class someClass2 { } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/index.d.ts] *modified* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +export declare class someClass { +} +export declare class someClass2 { +} +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *modified* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAChE,qBAAa,SAAS;CAAI;AAC1B,qBAAa,UAAU;CAAI"} +//// [/user/username/projects/sample1/core/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someClass2 = exports.someClass = exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +class someClass { +} +exports.someClass = someClass; +class someClass2 { +} +exports.someClass2 = someClass2; + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"3682101db2184c6bccaa98c1c1ac0791-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nexport class someClass { }\nexport class someClass2 { }","signature":"6b05b9011aa41b6b276b3708df078d1d-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "3682101db2184c6bccaa98c1c1ac0791-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nexport class someClass { }\nexport class someClass2 { }", + "signature": "6b05b9011aa41b6b276b3708df078d1d-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "3682101db2184c6bccaa98c1c1ac0791-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nexport class someClass { }\nexport class someClass2 { }", + "signature": "6b05b9011aa41b6b276b3708df078d1d-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1950 +} +//// [/user/username/projects/sample1/logic/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/logic/index.js.map] *rewrite with same content* +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"d4da7cae37db82b1a9affca237e15204-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "d4da7cae37db82b1a9affca237e15204-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n//# sourceMappingURL=index.d.ts.map", + "signature": "d4da7cae37db82b1a9affca237e15204-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1954 +} +//// [/user/username/projects/sample1/tests/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"d4da7cae37db82b1a9affca237e15204-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "d4da7cae37db82b1a9affca237e15204-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n//# sourceMappingURL=index.d.ts.map", + "signature": "d4da7cae37db82b1a9affca237e15204-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\nexport declare class someClass {\n}\nexport declare class someClass2 {\n}\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2113 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(used version) /user/username/projects/sample1/core/index.d.ts +(computed .d.ts) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(used version) /user/username/projects/sample1/core/index.d.ts +(computed .d.ts) /user/username/projects/sample1/tests/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/sample/incremental-updates-in-verbose-mode.js b/testdata/baselines/reference/tsbuildWatch/sample/incremental-updates-in-verbose-mode.js new file mode 100644 index 0000000000..9eb820ff03 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/incremental-updates-in-verbose-mode.js @@ -0,0 +1,815 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b -w tests --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output file 'core/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'core/tsconfig.json'... + +[HH:MM:SS AM] Project 'logic/tsconfig.json' is out of date because output file 'logic/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'logic/tsconfig.json'... + +[HH:MM:SS AM] Project 'tests/tsconfig.json' is out of date because output file 'tests/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'tests/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] *new* +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *new* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1818 +} +//// [/user/username/projects/sample1/logic/index.d.ts] *new* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/logic/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *new* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1879 +} +//// [/user/username/projects/sample1/tests/index.d.ts] *new* +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +const c = require("../core/index"); +const logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2038 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/tests/index.ts + + +Edit [0]:: Make non dts change +//// [/user/username/projects/sample1/logic/index.ts] *modified* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +function someFn() { } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'logic/tsconfig.json' is out of date because output 'logic/tsconfig.tsbuildinfo' is older than input 'logic/index.ts' + +[HH:MM:SS AM] Building project 'logic/tsconfig.json'... + +[HH:MM:SS AM] Project 'tests/tsconfig.json' is up to date with .d.ts files from its dependencies + +[HH:MM:SS AM] Updating output timestamps of project 'tests/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/logic/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +function someFn() { } +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *modified* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC;AACrB,SAAS,MAAM,GAAG,EAAC,CAAE"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"56bc284b087dd9cc90ffa4704740b86c-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nfunction someFn() { }","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "56bc284b087dd9cc90ffa4704740b86c-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nfunction someFn() { }", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "56bc284b087dd9cc90ffa4704740b86c-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nfunction someFn() { }", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1902 +} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *mTime changed* + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/logic/index.ts + + +Edit [1]:: Make dts change +//// [/user/username/projects/sample1/logic/index.ts] *modified* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +export function someFn() { } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'logic/tsconfig.json' is out of date because output 'logic/tsconfig.tsbuildinfo' is older than input 'logic/index.ts' + +[HH:MM:SS AM] Building project 'logic/tsconfig.json'... + +[HH:MM:SS AM] Project 'tests/tsconfig.json' is out of date because output 'tests/index.js' is older than input 'logic/tsconfig.json' + +[HH:MM:SS AM] Building project 'tests/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/logic/index.d.ts] *modified* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; +export declare function someFn(): void; + +//// [/user/username/projects/sample1/logic/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +exports.someFn = someFn; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +function someFn() { } +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *modified* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC;AACrB,kBAAyB,EAAC,CAAE"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"d749596c6d4d5a27ed436fc0d564335c-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nexport function someFn() { }","signature":"2e576d48e524436cd9a1f5da08ccc740-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare function someFn(): void;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "d749596c6d4d5a27ed436fc0d564335c-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nexport function someFn() { }", + "signature": "2e576d48e524436cd9a1f5da08ccc740-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare function someFn(): void;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d749596c6d4d5a27ed436fc0d564335c-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nexport function someFn() { }", + "signature": "2e576d48e524436cd9a1f5da08ccc740-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare function someFn(): void;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1950 +} +//// [/user/username/projects/sample1/tests/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","2e576d48e524436cd9a1f5da08ccc740-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare function someFn(): void;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "2e576d48e524436cd9a1f5da08ccc740-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare function someFn(): void;\n", + "signature": "2e576d48e524436cd9a1f5da08ccc740-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\nexport declare function someFn(): void;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2079 +} + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(used version) /user/username/projects/sample1/logic/index.d.ts +(computed .d.ts) /user/username/projects/sample1/tests/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/sample/non-local-change-does-not-start-build-of-referencing-projects-with-circular-references.js b/testdata/baselines/reference/tsbuildWatch/sample/non-local-change-does-not-start-build-of-referencing-projects-with-circular-references.js new file mode 100644 index 0000000000..5c7569ea6b --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/non-local-change-does-not-start-build-of-referencing-projects-with-circular-references.js @@ -0,0 +1,540 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true + }, + "references": [ + { "path": "../tests", "circular": true } + ], +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b -w tests +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; + +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; + +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1769 +} +//// [/user/username/projects/sample1/logic/index.d.ts] *new* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/logic/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *new* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1801 +} +//// [/user/username/projects/sample1/tests/index.d.ts] *new* +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +const c = require("../core/index"); +const logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1960 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/tests/index.ts + + +Edit [0]:: Make local change to core +//// [/user/username/projects/sample1/core/index.ts] *modified* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +function foo() { } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +function foo() { } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2701734db0c9484494be1001fea37913-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nfunction foo() { }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2701734db0c9484494be1001fea37913-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nfunction foo() { }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2701734db0c9484494be1001fea37913-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nfunction foo() { }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1789 +} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *mTime changed* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *mTime changed* + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/sample/non-local-change-does-not-start-build-of-referencing-projects.js b/testdata/baselines/reference/tsbuildWatch/sample/non-local-change-does-not-start-build-of-referencing-projects.js new file mode 100644 index 0000000000..89d76bca33 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/non-local-change-does-not-start-build-of-referencing-projects.js @@ -0,0 +1,548 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b -w tests +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] *new* +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *new* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1818 +} +//// [/user/username/projects/sample1/logic/index.d.ts] *new* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/logic/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *new* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1879 +} +//// [/user/username/projects/sample1/tests/index.d.ts] *new* +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +const c = require("../core/index"); +const logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2038 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/tests/index.ts + + +Edit [0]:: Make local change to core +//// [/user/username/projects/sample1/core/index.ts] *modified* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +function foo() { } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/index.d.ts.map] *rewrite with same content* +//// [/user/username/projects/sample1/core/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +function foo() { } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2701734db0c9484494be1001fea37913-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nfunction foo() { }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2701734db0c9484494be1001fea37913-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nfunction foo() { }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2701734db0c9484494be1001fea37913-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nfunction foo() { }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1838 +} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *mTime changed* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *mTime changed* + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/sample/reportErrors-when-preserveWatchOutput-is-not-used.js b/testdata/baselines/reference/tsbuildWatch/sample/reportErrors-when-preserveWatchOutput-is-not-used.js new file mode 100644 index 0000000000..1597a6769e --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/reportErrors-when-preserveWatchOutput-is-not-used.js @@ -0,0 +1,832 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo -b -w tests +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] *new* +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *new* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1818 +} +//// [/user/username/projects/sample1/logic/index.d.ts] *new* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/logic/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *new* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1879 +} +//// [/user/username/projects/sample1/tests/index.d.ts] *new* +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +const c = require("../core/index"); +const logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2038 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/tests/index.ts + + +Edit [0]:: change logic +//// [/user/username/projects/sample1/logic/index.ts] *modified* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +let y: string = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +logic/index.ts:7:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +7 let y: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/user/username/projects/sample1/logic/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +let y = 10; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *modified* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC;AACrB,IAAI,CAAC,GAAW,EAAE,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"3abed61bf6897ffa70a069303f7ee37f-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nlet y: string = 10;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":177,"end":178,"code":2322,"category":1,"message":"Type 'number' is not assignable to type 'string'."}]]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "3abed61bf6897ffa70a069303f7ee37f-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nlet y: string = 10;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "3abed61bf6897ffa70a069303f7ee37f-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nlet y: string = 10;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "pos": 177, + "end": 178, + "code": 2322, + "category": 1, + "message": "Type 'number' is not assignable to type 'string'." + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "size": 2046 +} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *mTime changed* + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/logic/index.ts + + +Edit [1]:: change core +//// [/user/username/projects/sample1/core/index.ts] *modified* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +let x: string = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +core/index.ts:4:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +4 let x: string = 10; +   ~ + +logic/index.ts:7:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +7 let y: string = 10; +   ~ + +[HH:MM:SS AM] Found 2 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/index.d.ts.map] *rewrite with same content* +//// [/user/username/projects/sample1/core/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +let x = 10; + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"bd46ecaf1bd821bbf62f3d94c22c2a57-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nlet x: string = 10;","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"pos":182,"end":183,"code":2322,"category":1,"message":"Type 'number' is not assignable to type 'string'."}]]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "bd46ecaf1bd821bbf62f3d94c22c2a57-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nlet x: string = 10;", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bd46ecaf1bd821bbf62f3d94c22c2a57-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nlet x: string = 10;", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "pos": 182, + "end": 183, + "code": 2322, + "category": 1, + "message": "Type 'number' is not assignable to type 'string'." + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "size": 1985 +} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *mTime changed* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *mTime changed* + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: fix error in logic +//// [/user/username/projects/sample1/logic/index.ts] *modified* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +core/index.ts:4:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +4 let x: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/user/username/projects/sample1/logic/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *modified* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1879 +} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *mTime changed* + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/logic/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/sample/reportErrors-when-preserveWatchOutput-is-passed-on-command-line.js b/testdata/baselines/reference/tsbuildWatch/sample/reportErrors-when-preserveWatchOutput-is-passed-on-command-line.js new file mode 100644 index 0000000000..7f1d0027b3 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/reportErrors-when-preserveWatchOutput-is-passed-on-command-line.js @@ -0,0 +1,832 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo -b -w tests --preserveWatchOutput +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] *new* +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *new* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1818 +} +//// [/user/username/projects/sample1/logic/index.d.ts] *new* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/logic/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *new* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1879 +} +//// [/user/username/projects/sample1/tests/index.d.ts] *new* +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +const c = require("../core/index"); +const logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2038 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/tests/index.ts + + +Edit [0]:: change logic +//// [/user/username/projects/sample1/logic/index.ts] *modified* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +let y: string = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +logic/index.ts:7:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +7 let y: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/user/username/projects/sample1/logic/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +let y = 10; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *modified* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC;AACrB,IAAI,CAAC,GAAW,EAAE,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"3abed61bf6897ffa70a069303f7ee37f-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nlet y: string = 10;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":177,"end":178,"code":2322,"category":1,"message":"Type 'number' is not assignable to type 'string'."}]]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "3abed61bf6897ffa70a069303f7ee37f-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nlet y: string = 10;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "3abed61bf6897ffa70a069303f7ee37f-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nlet y: string = 10;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "pos": 177, + "end": 178, + "code": 2322, + "category": 1, + "message": "Type 'number' is not assignable to type 'string'." + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "size": 2046 +} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *mTime changed* + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/logic/index.ts + + +Edit [1]:: change core +//// [/user/username/projects/sample1/core/index.ts] *modified* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +let x: string = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +core/index.ts:4:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +4 let x: string = 10; +   ~ + +logic/index.ts:7:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +7 let y: string = 10; +   ~ + +[HH:MM:SS AM] Found 2 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/index.d.ts.map] *rewrite with same content* +//// [/user/username/projects/sample1/core/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +let x = 10; + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"bd46ecaf1bd821bbf62f3d94c22c2a57-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nlet x: string = 10;","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"pos":182,"end":183,"code":2322,"category":1,"message":"Type 'number' is not assignable to type 'string'."}]]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "bd46ecaf1bd821bbf62f3d94c22c2a57-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nlet x: string = 10;", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bd46ecaf1bd821bbf62f3d94c22c2a57-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nlet x: string = 10;", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "pos": 182, + "end": 183, + "code": 2322, + "category": 1, + "message": "Type 'number' is not assignable to type 'string'." + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "size": 1985 +} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *mTime changed* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *mTime changed* + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: fix error in logic +//// [/user/username/projects/sample1/logic/index.ts] *modified* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +core/index.ts:4:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +4 let x: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/user/username/projects/sample1/logic/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *modified* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1879 +} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *mTime changed* + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/logic/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/sample/reportErrors-when-stopBuildOnErrors-is-passed-on-command-line.js b/testdata/baselines/reference/tsbuildWatch/sample/reportErrors-when-stopBuildOnErrors-is-passed-on-command-line.js new file mode 100644 index 0000000000..bb6fe8e3ae --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/reportErrors-when-stopBuildOnErrors-is-passed-on-command-line.js @@ -0,0 +1,742 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo -b -w tests --stopBuildOnErrors +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] *new* +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *new* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1818 +} +//// [/user/username/projects/sample1/logic/index.d.ts] *new* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/logic/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *new* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1879 +} +//// [/user/username/projects/sample1/tests/index.d.ts] *new* +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +const c = require("../core/index"); +const logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2038 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/tests/index.ts + + +Edit [0]:: change logic +//// [/user/username/projects/sample1/logic/index.ts] *modified* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +let y: string = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +logic/index.ts:7:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +7 let y: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/user/username/projects/sample1/logic/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +let y = 10; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *modified* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC;AACrB,IAAI,CAAC,GAAW,EAAE,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"3abed61bf6897ffa70a069303f7ee37f-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nlet y: string = 10;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":177,"end":178,"code":2322,"category":1,"message":"Type 'number' is not assignable to type 'string'."}]]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "3abed61bf6897ffa70a069303f7ee37f-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nlet y: string = 10;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "3abed61bf6897ffa70a069303f7ee37f-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\nlet y: string = 10;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "pos": 177, + "end": 178, + "code": 2322, + "category": 1, + "message": "Type 'number' is not assignable to type 'string'." + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "size": 2046 +} + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/logic/index.ts + + +Edit [1]:: change core +//// [/user/username/projects/sample1/core/index.ts] *modified* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +let x: string = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +core/index.ts:4:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +4 let x: string = 10; +   ~ + +logic/index.ts:7:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +7 let y: string = 10; +   ~ + +[HH:MM:SS AM] Found 2 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/index.d.ts.map] *rewrite with same content* +//// [/user/username/projects/sample1/core/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +let x = 10; + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"bd46ecaf1bd821bbf62f3d94c22c2a57-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nlet x: string = 10;","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"pos":182,"end":183,"code":2322,"category":1,"message":"Type 'number' is not assignable to type 'string'."}]]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "bd46ecaf1bd821bbf62f3d94c22c2a57-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nlet x: string = 10;", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bd46ecaf1bd821bbf62f3d94c22c2a57-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nlet x: string = 10;", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "pos": 182, + "end": 183, + "code": 2322, + "category": 1, + "message": "Type 'number' is not assignable to type 'string'." + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "size": 1985 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/index.ts + + +Diff:: Clean build will stop on error in core and will not report error in logic +Watch build will retain previous errors from logic and report it +--- nonIncremental.output.txt ++++ incremental.output.txt +@@ -3,3 +3,8 @@ + 4 let x: string = 10; +    ~ + ++logic/index.ts:7:5 - error TS2322: Type 'number' is not assignable to type 'string'. ++ ++7 let y: string = 10; ++   ~ ++ + +Edit [2]:: fix error in logic +//// [/user/username/projects/sample1/logic/index.ts] *modified* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +core/index.ts:4:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +4 let x: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + diff --git a/testdata/baselines/reference/tsbuildWatch/sample/should-not-trigger-recompilation-because-of-program-emit-with-outDir-specified.js b/testdata/baselines/reference/tsbuildWatch/sample/should-not-trigger-recompilation-because-of-program-emit-with-outDir-specified.js new file mode 100644 index 0000000000..bf6b1a70c2 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/should-not-trigger-recompilation-because-of-program-emit-with-outDir-specified.js @@ -0,0 +1,350 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "outDir": "outDir" + } +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b -w core --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output file 'core/outDir/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'core/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/outDir/anotherModule.d.ts] *new* +export declare const World = "hello"; + +//// [/user/username/projects/sample1/core/outDir/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/outDir/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; + +//// [/user/username/projects/sample1/core/outDir/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/outDir/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","../anotherModule.ts","../index.ts","../some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../anotherModule.ts", + "../index.ts", + "../some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../anotherModule.ts", + "../index.ts", + "../some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "outDir": "./" + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1767 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + + +Edit [0]:: no change + + +Output:: + + + +Edit [1]:: Add new file +//// [/user/username/projects/sample1/core/file3.ts] *new* +export const y = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output 'core/outDir/tsconfig.tsbuildinfo' is older than input 'core/file3.ts' + +[HH:MM:SS AM] Building project 'core/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/outDir/file3.d.ts] *new* +export declare const y = 10; + +//// [/user/username/projects/sample1/core/outDir/file3.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.y = void 0; +exports.y = 10; + +//// [/user/username/projects/sample1/core/outDir/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.d.ts","../anotherModule.ts","../file3.ts","../index.ts","../some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;","signature":"7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./file3.d.ts"} +//// [/user/username/projects/sample1/core/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../anotherModule.ts", + "../file3.ts", + "../index.ts", + "../some_decl.d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "../anotherModule.ts", + "../file3.ts", + "../index.ts", + "../some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../file3.ts", + "version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "signature": "7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "signature": "7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "outDir": "./" + }, + "latestChangedDtsFile": "./file3.d.ts", + "size": 1949 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/file3.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/file3.ts + + +Edit [2]:: no change + + +Output:: + diff --git a/testdata/baselines/reference/tsbuildWatch/sample/should-not-trigger-recompilation-because-of-program-emit.js b/testdata/baselines/reference/tsbuildWatch/sample/should-not-trigger-recompilation-because-of-program-emit.js new file mode 100644 index 0000000000..c7580e8511 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/should-not-trigger-recompilation-because-of-program-emit.js @@ -0,0 +1,362 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b -w core --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output file 'core/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'core/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] *new* +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *new* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1818 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + + +Edit [0]:: no change + + +Output:: + + + +Edit [1]:: Add new file +//// [/user/username/projects/sample1/core/file3.ts] *new* +export const y = 10; + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output 'core/tsconfig.tsbuildinfo' is older than input 'core/file3.ts' + +[HH:MM:SS AM] Building project 'core/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/file3.d.ts] *new* +export declare const y = 10; +//# sourceMappingURL=file3.d.ts.map +//// [/user/username/projects/sample1/core/file3.d.ts.map] *new* +{"version":3,"file":"file3.d.ts","sourceRoot":"","sources":["file3.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +//// [/user/username/projects/sample1/core/file3.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.y = void 0; +exports.y = 10; + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.d.ts","./anotherModule.ts","./file3.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;","signature":"7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./file3.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./file3.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./file3.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./file3.ts", + "version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "signature": "7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;", + "signature": "7ab1b6e8968172bdd365c972b27a69e2-export declare const y = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./file3.d.ts", + "size": 1999 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/file3.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/file3.ts + + +Edit [2]:: no change + + +Output:: + diff --git a/testdata/baselines/reference/tsbuildWatch/sample/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors-when-test-does-not-reference-core.js b/testdata/baselines/reference/tsbuildWatch/sample/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors-when-test-does-not-reference-core.js new file mode 100644 index 0000000000..080b2d9e4e --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors-when-test-does-not-reference-core.js @@ -0,0 +1,610 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }multiply(); +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b tests --verbose --stopBuildOnErrors --watch +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output file 'core/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'core/tsconfig.json'... + +core/index.ts:3:65 - error TS2554: Expected 2 arguments, but got 0. + +3 export function multiply(a: number, b: number) { return a * b; }multiply(); +   ~~~~~~~~ + + core/index.ts:3:26 - An argument for 'a' was not provided. + 3 export function multiply(a: number, b: number) { return a * b; }multiply(); +    ~~~~~~~~~ + +[HH:MM:SS AM] Project 'logic/tsconfig.json' can't be built because its dependency 'core' has errors + +[HH:MM:SS AM] Skipping build of project 'logic/tsconfig.json' because its dependency 'core' has errors + +[HH:MM:SS AM] Project 'tests/tsconfig.json' can't be built because its dependency 'logic' was not built + +[HH:MM:SS AM] Skipping build of project 'tests/tsconfig.json' because its dependency 'logic' was not built + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] *new* +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *new* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +multiply(); + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"4bf9c557eaa1c988144310898522b7b5-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }multiply();","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"pos":177,"end":185,"code":2554,"category":1,"message":"Expected 2 arguments, but got 0.","relatedInformation":[{"pos":138,"end":147,"code":6210,"category":3,"message":"An argument for 'a' was not provided."}]}]]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "4bf9c557eaa1c988144310898522b7b5-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }multiply();", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4bf9c557eaa1c988144310898522b7b5-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }multiply();", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "pos": 177, + "end": 185, + "code": 2554, + "category": 1, + "message": "Expected 2 arguments, but got 0.", + "relatedInformation": [ + { + "pos": 138, + "end": 147, + "code": 6210, + "category": 3, + "message": "An argument for 'a' was not provided." + } + ] + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "size": 2078 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + + +Edit [0]:: fix error +//// [/user/username/projects/sample1/core/index.ts] *modified* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because buildinfo file 'core/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'core/tsconfig.json'... + +[HH:MM:SS AM] Project 'logic/tsconfig.json' is out of date because output file 'logic/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'logic/tsconfig.json'... + +[HH:MM:SS AM] Project 'tests/tsconfig.json' is out of date because output file 'tests/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'tests/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/index.d.ts.map] *rewrite with same content* +//// [/user/username/projects/sample1/core/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1818 +} +//// [/user/username/projects/sample1/logic/index.d.ts] *new* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/logic/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *new* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1879 +} +//// [/user/username/projects/sample1/tests/index.d.ts] *new* +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +const c = require("../core/index"); +const logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2038 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/tests/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/sample/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors.js b/testdata/baselines/reference/tsbuildWatch/sample/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors.js new file mode 100644 index 0000000000..b9b4ba3e5e --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors.js @@ -0,0 +1,611 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; }multiply(); +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b tests --verbose --stopBuildOnErrors --watch +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output file 'core/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'core/tsconfig.json'... + +core/index.ts:3:65 - error TS2554: Expected 2 arguments, but got 0. + +3 export function multiply(a: number, b: number) { return a * b; }multiply(); +   ~~~~~~~~ + + core/index.ts:3:26 - An argument for 'a' was not provided. + 3 export function multiply(a: number, b: number) { return a * b; }multiply(); +    ~~~~~~~~~ + +[HH:MM:SS AM] Project 'logic/tsconfig.json' can't be built because its dependency 'core' has errors + +[HH:MM:SS AM] Skipping build of project 'logic/tsconfig.json' because its dependency 'core' has errors + +[HH:MM:SS AM] Project 'tests/tsconfig.json' can't be built because its dependency 'core' has errors + +[HH:MM:SS AM] Skipping build of project 'tests/tsconfig.json' because its dependency 'core' has errors + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] *new* +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *new* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +multiply(); + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"4bf9c557eaa1c988144310898522b7b5-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }multiply();","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"pos":177,"end":185,"code":2554,"category":1,"message":"Expected 2 arguments, but got 0.","relatedInformation":[{"pos":138,"end":147,"code":6210,"category":3,"message":"An argument for 'a' was not provided."}]}]]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "4bf9c557eaa1c988144310898522b7b5-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }multiply();", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4bf9c557eaa1c988144310898522b7b5-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }multiply();", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "pos": 177, + "end": 185, + "code": 2554, + "category": 1, + "message": "Expected 2 arguments, but got 0.", + "relatedInformation": [ + { + "pos": 138, + "end": 147, + "code": 6210, + "category": 3, + "message": "An argument for 'a' was not provided." + } + ] + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "size": 2078 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + + +Edit [0]:: fix error +//// [/user/username/projects/sample1/core/index.ts] *modified* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because buildinfo file 'core/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'core/tsconfig.json'... + +[HH:MM:SS AM] Project 'logic/tsconfig.json' is out of date because output file 'logic/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'logic/tsconfig.json'... + +[HH:MM:SS AM] Project 'tests/tsconfig.json' is out of date because output file 'tests/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'tests/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/core/index.d.ts.map] *rewrite with same content* +//// [/user/username/projects/sample1/core/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1818 +} +//// [/user/username/projects/sample1/logic/index.d.ts] *new* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/logic/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *new* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1879 +} +//// [/user/username/projects/sample1/tests/index.d.ts] *new* +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +const c = require("../core/index"); +const logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2038 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /user/username/projects/sample1/core/index.ts +Signatures:: +(computed .d.ts) /user/username/projects/sample1/core/index.ts + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/tests/index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/sample/watches-config-files-that-are-not-present.js b/testdata/baselines/reference/tsbuildWatch/sample/watches-config-files-that-are-not-present.js new file mode 100644 index 0000000000..d33181dc37 --- /dev/null +++ b/testdata/baselines/reference/tsbuildWatch/sample/watches-config-files-that-are-not-present.js @@ -0,0 +1,580 @@ +currentDirectory::/user/username/projects/sample1 +useCaseSensitiveFileNames::true +Input:: +//// [/user/username/projects/sample1/core/anotherModule.ts] *new* +export const World = "hello"; +//// [/user/username/projects/sample1/core/index.ts] *new* +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +//// [/user/username/projects/sample1/core/some_decl.d.ts] *new* +declare const dts: any; +//// [/user/username/projects/sample1/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +} +//// [/user/username/projects/sample1/logic/index.ts] *new* +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/index.ts] *new* +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; +//// [/user/username/projects/sample1/tests/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + { "path": "../logic" }, + ], + "files": ["index.ts"], + "compilerOptions": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b -w tests +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +error TS6053: File '/user/username/projects/sample1/logic/tsconfig.json' not found. +tests/tsconfig.json:4:9 - error TS6053: File '/user/username/projects/sample1/logic' not found. + +4 { "path": "../logic" }, +   ~~~~~~~~~~~~~~~~~~~~~~ + +[HH:MM:SS AM] Found 2 errors. Watching for file changes. + +//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* +/// +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 {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/user/username/projects/sample1/core/anotherModule.d.ts] *new* +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] *new* +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +//// [/user/username/projects/sample1/core/anotherModule.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + +//// [/user/username/projects/sample1/core/index.d.ts] *new* +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map +//// [/user/username/projects/sample1/core/index.d.ts.map] *new* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} +//// [/user/username/projects/sample1/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./anotherModule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"19cd44ed7278957051fca663f821c916-export const World = \"hello\";","signature":"5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n","impliedNodeFormat":1},{"version":"2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }","signature":"da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1},{"version":"6ceab83400a6167be2fb5feab881ded0-declare const dts: any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.d.ts", + "./anotherModule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./anotherModule.ts", + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "19cd44ed7278957051fca663f821c916-export const World = \"hello\";", + "signature": "5aad0de3e7b08bb6e110c7b97361b89e-export declare const World = \"hello\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "2753a1085d587a7d57069e1105af24ec-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }", + "signature": "da642d80443e7ccd327091080a82a43c-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./some_decl.d.ts", + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "signature": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6ceab83400a6167be2fb5feab881ded0-declare const dts: any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1818 +} +//// [/user/username/projects/sample1/logic/index.d.ts] *new* +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/logic/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/index.d.ts] *new* +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + +//// [/user/username/projects/sample1/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +const c = require("../core/index"); +const logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +const mod = require("../core/anotherModule"); +exports.m = mod; + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1},{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.ts", + "./index.ts" + ], + "latestChangedDtsFile": "./index.d.ts", + "size": 2352 +} + +core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.ts +*refresh* /user/username/projects/sample1/core/index.ts +*refresh* /user/username/projects/sample1/core/some_decl.d.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/core/anotherModule.ts +(stored at emit) /user/username/projects/sample1/core/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /user/username/projects/sample1/core/index.d.ts +*not cached* /user/username/projects/sample1/core/anotherModule.d.ts +*not cached* /user/username/projects/sample1/logic/index.ts +*not cached* /user/username/projects/sample1/tests/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts +(stored at emit) /user/username/projects/sample1/tests/index.ts + + +Edit [0]:: Write logic +//// [/user/username/projects/sample1/logic/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "skipDefaultLibCheck": true, + }, + "references": [ + { "path": "../core" }, + ], +} + + +Output:: +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + +//// [/user/username/projects/sample1/logic/index.d.ts] *rewrite with same content* +//// [/user/username/projects/sample1/logic/index.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +const c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +const mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map +//// [/user/username/projects/sample1/logic/index.js.map] *new* +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,MAAY,CAAC,4BAAsB;AACnC,2BAAkC;IAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAAA,CAC7B;AACD,MAAY,GAAG,oCAA8B;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map",{"version":"590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "590556060bc156a64834010df8cda255-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1879 +} +//// [/user/username/projects/sample1/tests/index.js] *rewrite with same content* +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.d.ts","../core/index.d.ts","../core/anotherModule.d.ts","../logic/index.d.ts","./index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map","5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map","487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;","signature":"4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2,3,4]],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "lib.d.ts", + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "lib.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../core/index.d.ts", + "version": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "signature": "fc70810d80f598d415c6f21c113a400b-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n//# sourceMappingURL=index.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../core/anotherModule.d.ts", + "version": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "5ef600f6f6585506cfe942fc161e76c5-export declare const World = \"hello\";\n//# sourceMappingURL=anotherModule.d.ts.map", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../logic/index.d.ts", + "version": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "487f7216384ec40e22ff7dc40c01be4b-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./index.ts", + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7fa4162f733e6b9e7f7d9d9410e62f61-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;", + "signature": "4b3c99afe665034856f74c660f74d6fd-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../core/anotherModule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anotherModule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anotherModule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2038 +} + +logic/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.ts +Signatures:: +(stored at emit) /user/username/projects/sample1/logic/index.ts + +tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /user/username/projects/sample1/core/index.d.ts +*refresh* /user/username/projects/sample1/core/anotherModule.d.ts +*refresh* /user/username/projects/sample1/logic/index.d.ts +*refresh* /user/username/projects/sample1/tests/index.ts +Signatures:: +(used version) /user/username/projects/sample1/logic/index.d.ts +(computed .d.ts) /user/username/projects/sample1/tests/index.ts diff --git a/testdata/baselines/reference/tsc/declarationEmit/reports-dts-generation-errors-with-incremental.js b/testdata/baselines/reference/tsc/declarationEmit/reports-dts-generation-errors-with-incremental.js index d7050ec3e8..4cd9f7b922 100644 --- a/testdata/baselines/reference/tsc/declarationEmit/reports-dts-generation-errors-with-incremental.js +++ b/testdata/baselines/reference/tsc/declarationEmit/reports-dts-generation-errors-with-incremental.js @@ -204,7 +204,6 @@ Output:: 2 export const api = ky.extend({});    ~~~ -TSFILE: /home/src/workspaces/project/tsconfig.tsbuildinfo ../../tslibs/TS/Lib/lib.esnext.full.d.ts Default library for target 'ESNext' node_modules/ky/distribution/index.d.ts @@ -216,8 +215,6 @@ index.ts Found 1 error in index.ts:2 -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: @@ -241,7 +238,6 @@ Output:: 2 export const api = ky.extend({});    ~~~ -TSFILE: /home/src/workspaces/project/tsconfig.tsbuildinfo ../../tslibs/TS/Lib/lib.esnext.full.d.ts Default library for target 'ESNext' node_modules/ky/distribution/index.d.ts @@ -253,8 +249,6 @@ index.ts Found 1 error in index.ts:2 -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: diff --git a/testdata/baselines/reference/tsc/declarationEmit/when-pkg-references-sibling-package-through-indirect-symlink.js b/testdata/baselines/reference/tsc/declarationEmit/when-pkg-references-sibling-package-through-indirect-symlink.js index 69a543c78f..75149f241c 100644 --- a/testdata/baselines/reference/tsc/declarationEmit/when-pkg-references-sibling-package-through-indirect-symlink.js +++ b/testdata/baselines/reference/tsc/declarationEmit/when-pkg-references-sibling-package-through-indirect-symlink.js @@ -96,7 +96,6 @@ interface Symbol { readonly [Symbol.toStringTag]: string; } declare const console: { log(msg: any): void; }; -//// [/user/username/projects/myproject/pkg2/node_modules/@raymondfeng/pkg1] *deleted* //// [/user/username/projects/myproject/pkg3/dist/index.d.ts] *new* export * from './keys'; @@ -130,5 +129,4 @@ exports.ADMIN = void 0; const pkg2_1 = require("@raymondfeng/pkg2"); exports.ADMIN = pkg2_1.MetadataAccessor.create('1'); -//// [/user/username/projects/myproject/pkg3/node_modules/@raymondfeng/pkg2] *deleted* diff --git a/testdata/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-with-indirect-link.js b/testdata/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-with-indirect-link.js index 0d5bb3bf95..5cfa0d4d57 100644 --- a/testdata/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-with-indirect-link.js +++ b/testdata/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package-with-indirect-link.js @@ -197,7 +197,6 @@ interface Symbol { readonly [Symbol.toStringTag]: string; } declare const console: { log(msg: any): void; }; -//// [/temp/yarn/data/link/plugin-two] *deleted* //// [/user/username/projects/myproject/plugin-one/index.d.ts] *new* export declare const actions: { featureOne: import("typescript-fsa").ActionCreator<{ @@ -214,5 +213,4 @@ const action = (0, typescript_fsa_1.actionCreatorFactory)("somekey"); const featureOne = action("feature-one"); exports.actions = { featureOne }; -//// [/user/username/projects/myproject/plugin-one/node_modules/plugin-two] *deleted* diff --git a/testdata/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package.js b/testdata/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package.js index 4cd10abfa2..83b1575d13 100644 --- a/testdata/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package.js +++ b/testdata/baselines/reference/tsc/declarationEmit/when-same-version-is-referenced-through-source-and-another-symlinked-package.js @@ -209,5 +209,4 @@ export {}; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -//// [/user/username/projects/myproject/plugin-one/node_modules/plugin-two] *deleted* diff --git a/testdata/baselines/reference/tsc/extends/resolves-the-symlink-path.js b/testdata/baselines/reference/tsc/extends/resolves-the-symlink-path.js index 05d6d6bee7..05b91aca0f 100644 --- a/testdata/baselines/reference/tsc/extends/resolves-the-symlink-path.js +++ b/testdata/baselines/reference/tsc/extends/resolves-the-symlink-path.js @@ -47,7 +47,6 @@ interface Symbol { readonly [Symbol.toStringTag]: string; } declare const console: { log(msg: any): void; }; -//// [/users/user/projects/myproject/node_modules/@something/tsconfig-node] *deleted* //// [/users/user/projects/myproject/src/index.d.ts] *new* export declare const x = 10; diff --git a/testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field-with-declaration-emit-enabled.js b/testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field-with-declaration-emit-enabled.js index 302f4a812c..6733ef2ba7 100644 --- a/testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field-with-declaration-emit-enabled.js +++ b/testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field-with-declaration-emit-enabled.js @@ -360,8 +360,6 @@ Errors Files 1 MessageablePerson.ts:6 1 main.ts:3 -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: diff --git a/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js b/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js index a218d66471..15244da570 100644 --- a/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js +++ b/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js @@ -278,17 +278,10 @@ Resolving real path for '/home/src/projects/component-type-checker/node_modules/ Imported via "@component-type-checker/components" from file 'src/app.tsx' with packageId '@component-type-checker/components@0.0.1+@component-type-checker/button@0.0.2' src/app.tsx Matched by include pattern 'src' in 'tsconfig.json' -//// [/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+components@0.0.1_@component-type-checker+button@0.0.1/node_modules/@component-type-checker/button] *deleted* -//// [/home/src/projects/component-type-checker/node_modules/.pnpm/@component-type-checker+components@0.0.1_@component-type-checker+button@0.0.2/node_modules/@component-type-checker/button] *deleted* //// [/home/src/projects/component-type-checker/packages/app/dist/app.js] *new* import { createButton } from "@component-type-checker/button"; const button = createButton(); -//// [/home/src/projects/component-type-checker/packages/app/node_modules/@component-type-checker/button] *deleted* -//// [/home/src/projects/component-type-checker/packages/app/node_modules/@component-type-checker/components] *deleted* -//// [/home/src/projects/component-type-checker/packages/app/node_modules/@component-type-checker/sdk] *deleted* -//// [/home/src/projects/component-type-checker/packages/sdk/node_modules/@component-type-checker/button] *deleted* -//// [/home/src/projects/component-type-checker/packages/sdk/node_modules/@component-type-checker/components] *deleted* //// [/home/src/tslibs/TS/Lib/lib.es5.d.ts] *Lib* /// interface Boolean {} diff --git a/testdata/baselines/reference/tsc/noCheck/dts-errors-with-incremental.js b/testdata/baselines/reference/tsc/noCheck/dts-errors-with-incremental.js index 459fb46b4b..31b85a5cb9 100644 --- a/testdata/baselines/reference/tsc/noCheck/dts-errors-with-incremental.js +++ b/testdata/baselines/reference/tsc/noCheck/dts-errors-with-incremental.js @@ -196,8 +196,6 @@ Output:: Found 1 error in a.ts:1 -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: @@ -565,8 +563,6 @@ Output:: Found 1 error in a.ts:1 -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: diff --git a/testdata/baselines/reference/tsc/noEmit/dts-errors-with-incremental-as-modules.js b/testdata/baselines/reference/tsc/noEmit/dts-errors-with-incremental-as-modules.js index 854835b970..0813159493 100644 --- a/testdata/baselines/reference/tsc/noEmit/dts-errors-with-incremental-as-modules.js +++ b/testdata/baselines/reference/tsc/noEmit/dts-errors-with-incremental-as-modules.js @@ -171,8 +171,6 @@ Output:: Found 1 error in a.ts:1 -//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: @@ -651,8 +649,6 @@ Output:: Found 1 error in a.ts:1 -//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: diff --git a/testdata/baselines/reference/tsc/noEmit/dts-errors-with-incremental.js b/testdata/baselines/reference/tsc/noEmit/dts-errors-with-incremental.js index 0a87ea4533..21f7e2d3af 100644 --- a/testdata/baselines/reference/tsc/noEmit/dts-errors-with-incremental.js +++ b/testdata/baselines/reference/tsc/noEmit/dts-errors-with-incremental.js @@ -155,8 +155,6 @@ Output:: Found 1 error in a.ts:1 -//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: @@ -560,8 +558,6 @@ Output:: Found 1 error in a.ts:1 -//// [/home/src/projects/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics:: diff --git a/testdata/baselines/reference/tsc/noEmitOnError/dts-errors-with-declaration-with-incremental.js b/testdata/baselines/reference/tsc/noEmitOnError/dts-errors-with-declaration-with-incremental.js index d2ce772b4f..9ad5ae42c0 100644 --- a/testdata/baselines/reference/tsc/noEmitOnError/dts-errors-with-declaration-with-incremental.js +++ b/testdata/baselines/reference/tsc/noEmitOnError/dts-errors-with-declaration-with-incremental.js @@ -208,8 +208,6 @@ Output:: Found 1 error in src/main.ts:2 -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* tsconfig.json:: SemanticDiagnostics::