From 0bbafc486fbea0d2f1e87ce71ea36d0747ca48db Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 23 Jul 2025 10:05:51 -0700 Subject: [PATCH 1/5] test runner --- internal/execute/tsctestrunner_test.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/internal/execute/tsctestrunner_test.go b/internal/execute/tsctestrunner_test.go index 6599851803..90a3bba99a 100644 --- a/internal/execute/tsctestrunner_test.go +++ b/internal/execute/tsctestrunner_test.go @@ -160,13 +160,21 @@ func getDiffForIncremental(incrementalSys *testSys, nonIncrementalSys *testSys) func (test *tscInput) getBaselineSubFolder() string { commandName := "tsc" if slices.ContainsFunc(test.commandLineArgs, func(arg string) bool { - return arg == "--build" || arg == "-b" + switch arg { + case "-b", "--b", "-build", "--build": + return true + } + return false }) { commandName = "tsbuild" } w := "" if slices.ContainsFunc(test.commandLineArgs, func(arg string) bool { - return arg == "--watch" || arg == "-w" + switch arg { + case "-w", "--w", "-watch", "--watch": + return true + } + return false }) { w = "Watch" } From 21536c83521a5d9da97f8fd935fa10132d5cffc0 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 23 Jul 2025 12:19:04 -0700 Subject: [PATCH 2/5] Add commandline --build parsing --- internal/core/buildoptions.go | 15 ++ internal/core/compileroptions.go | 3 +- internal/core/projectreference.go | 4 +- internal/outputpaths/outputpaths.go | 2 +- internal/tsoptions/commandlineparser.go | 52 ++++- internal/tsoptions/commandlineparser_test.go | 180 +++++++++++++++--- internal/tsoptions/decls_test.go | 2 +- internal/tsoptions/declscompiler.go | 4 +- internal/tsoptions/errors.go | 2 + internal/tsoptions/namemap.go | 1 + internal/tsoptions/parsedbuildcommandline.go | 33 ++++ internal/tsoptions/parsedcommandline.go | 9 +- internal/tsoptions/parsinghelpers.go | 40 +++- ...does-not-add-color-when-NO_COLOR-is-set.js | 72 +++---- .../reference/tsc/commandLine/help.js | 72 +++---- ...when-host-cannot-provide-terminal-width.js | 72 +++---- ...tatus.DiagnosticsPresent_OutputsSkipped.js | 72 +++---- ...h-interval-option-without-tsconfig.json.js | 72 +++---- ...--clean and --force together is invalid.js | 14 ++ ...clean and --verbose together is invalid.js | 14 ++ ...--clean and --watch together is invalid.js | 14 ++ .../--watch and --dry together is invalid.js | 14 ++ ...le flags with input projects at the end.js | 13 ++ ...gs with input projects in the beginning.js | 13 ++ ...flags with input projects in the middle.js | 13 ++ .../Parse multiple options.js | 13 ++ .../Parse option with invalid option.js | 14 ++ .../errors on invalid excludeDirectories.js | 14 ++ .../errors on invalid excludeFiles.js | 14 ++ .../errors on missing argument.js | 15 ++ .../parseBuildOptions/parse --excludeFiles.js | 13 ++ .../parse --fallbackPolling.js | 13 ++ .../parse --synchronousWatchDirectory.js | 13 ++ .../parse --watchDirectory.js | 13 ++ .../parseBuildOptions/parse --watchFile.js | 13 ++ .../parse build with --incremental.js | 13 ++ .../parse build with --locale en-us.js | 13 ++ .../parse build with --tsBuildInfoFile.js | 14 ++ .../parse build without any options .js | 13 ++ ...mmon may not be used with --build flags.js | 14 ++ ...Handles did you mean for misspelt flags.js | 0 ...les may only be used with --build flags.js | 0 .../Parse --lib option with extra comma.js | 0 ... --lib option with trailing white-space.js | 0 .../Parse empty options of --jsx.js | 0 .../Parse empty options of --lib.js | 0 .../Parse empty options of --module.js | 0 ...rse empty options of --moduleResolution.js | 0 .../Parse empty options of --newLine.js | 0 .../Parse empty options of --target.js | 0 .../Parse empty string of --lib.js | 0 .../Parse explicit boolean flag value.js | 0 ...ollowing command line argument of --lib.js | 0 .../Parse implicit boolean flag value.js | 0 .../Parse invalid option of library flags.js | 0 ...piler flags with input files at the end.js | 0 ...er flags with input files in the middle.js | 0 .../Parse multiple library compiler flags .js | 0 ...Parse multiple options of library flags.js | 0 ...non boolean argument after boolean flag.js | 0 .../Parse single option of library flag.js | 0 ...ws setting option type boolean to false.js | 0 ... tsconfig only option to be set to null.js | 0 .../errors on invalid excludeDirectories.js | 0 .../errors on invalid excludeFiles.js | 0 ...n missing argument to --fallbackPolling.js | 0 ... type boolean allows setting it to null.js | 0 ...rrors if its followed by another option.js | 0 ... type boolean errors if its last option.js | 0 ...lean errors if non null value is passed.js | 0 ... of type list allows setting it to null.js | 0 ...rrors if its followed by another option.js | 0 ... of type list errors if its last option.js | 0 ...list errors if non null value is passed.js | 0 ...f type number allows setting it to null.js | 0 ...rrors if its followed by another option.js | 0 ...f type number errors if its last option.js | 0 ...mber errors if non null value is passed.js | 0 ...f type object allows setting it to null.js | 0 ...rrors if its followed by another option.js | 0 ...f type object errors if its last option.js | 0 ...f type string allows setting it to null.js | 0 ...rrors if its followed by another option.js | 0 ...f type string errors if its last option.js | 0 ...ring errors if non null value is passed.js | 0 .../parse --excludeDirectories.js | 0 .../parse --excludeFiles.js | 0 .../parse --fallbackPolling.js | 0 .../parse --incremental.js | 0 .../parse --synchronousWatchDirectory.js | 0 .../parse --tsBuildInfoFile.js | 0 .../parse --watchDirectory.js | 0 .../parse --watchFile.js | 0 93 files changed, 779 insertions(+), 225 deletions(-) create mode 100644 internal/core/buildoptions.go create mode 100644 internal/tsoptions/parsedbuildcommandline.go create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--clean and --force together is invalid.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--clean and --verbose together is invalid.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--clean and --watch together is invalid.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--watch and --dry together is invalid.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects at the end.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the beginning.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the middle.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple options.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse option with invalid option.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/errors on invalid excludeDirectories.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/errors on invalid excludeFiles.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/errors on missing argument.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --excludeFiles.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --fallbackPolling.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --synchronousWatchDirectory.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --watchDirectory.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --watchFile.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build with --incremental.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build with --locale en-us.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build with --tsBuildInfoFile.js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build without any options .js create mode 100644 testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/reports other common may not be used with --build flags.js rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Handles did you mean for misspelt flags.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Handles may only be used with --build flags.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse --lib option with extra comma.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse --lib option with trailing white-space.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse empty options of --jsx.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse empty options of --lib.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse empty options of --module.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse empty options of --moduleResolution.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse empty options of --newLine.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse empty options of --target.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse empty string of --lib.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse explicit boolean flag value.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse immediately following command line argument of --lib.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse implicit boolean flag value.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse invalid option of library flags.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse multiple compiler flags with input files at the end.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse multiple compiler flags with input files in the middle.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse multiple library compiler flags .js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse multiple options of library flags.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse non boolean argument after boolean flag.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/Parse single option of library flag.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/allows setting option type boolean to false.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/allows tsconfig only option to be set to null.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/errors on invalid excludeDirectories.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/errors on invalid excludeFiles.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/errors on missing argument to --fallbackPolling.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type boolean allows setting it to null.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type boolean errors if its followed by another option.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type boolean errors if its last option.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type boolean errors if non null value is passed.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type list allows setting it to null.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type list errors if its followed by another option.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type list errors if its last option.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type list errors if non null value is passed.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type number allows setting it to null.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type number errors if its followed by another option.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type number errors if its last option.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type number errors if non null value is passed.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type object allows setting it to null.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type object errors if its followed by another option.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type object errors if its last option.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type string allows setting it to null.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type string errors if its followed by another option.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type string errors if its last option.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/option of type string errors if non null value is passed.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/parse --excludeDirectories.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/parse --excludeFiles.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/parse --fallbackPolling.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/parse --incremental.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/parse --synchronousWatchDirectory.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/parse --tsBuildInfoFile.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/parse --watchDirectory.js (100%) rename testdata/baselines/reference/tsoptions/commandLineParsing/{ => parseCommandLine}/parse --watchFile.js (100%) diff --git a/internal/core/buildoptions.go b/internal/core/buildoptions.go new file mode 100644 index 0000000000..c7cde7504f --- /dev/null +++ b/internal/core/buildoptions.go @@ -0,0 +1,15 @@ +package core + +type BuildOptions struct { + _ noCopy + + Dry Tristate `json:"dry,omitzero"` + Force Tristate `json:"force,omitzero"` + Verbose Tristate `json:"verbose,omitzero"` + StopBuildOnErrors Tristate `json:"stopBuildOnErrors,omitzero"` + + // CompilerOptions are not parsed here and will be available on ParsedBuildCommandLine + + // Internal fields + Clean Tristate `json:"clean,omitzero"` +} diff --git a/internal/core/compileroptions.go b/internal/core/compileroptions.go index 8ce79b2d02..249df70ba9 100644 --- a/internal/core/compileroptions.go +++ b/internal/core/compileroptions.go @@ -26,7 +26,6 @@ type CompilerOptions struct { AllowUnusedLabels Tristate `json:"allowUnusedLabels,omitzero"` AssumeChangesOnlyAffectDirectDependencies Tristate `json:"assumeChangesOnlyAffectDirectDependencies,omitzero"` AlwaysStrict Tristate `json:"alwaysStrict,omitzero"` - Build Tristate `json:"build,omitzero"` CheckJs Tristate `json:"checkJs,omitzero"` CustomConditions []string `json:"customConditions,omitzero"` Composite Tristate `json:"composite,omitzero"` @@ -142,7 +141,7 @@ type CompilerOptions struct { Version Tristate `json:"version,omitzero"` Watch Tristate `json:"watch,omitzero"` ShowConfig Tristate `json:"showConfig,omitzero"` - TscBuild Tristate `json:"tscBuild,omitzero"` + Build Tristate `json:"build,omitzero"` Help Tristate `json:"help,omitzero"` All Tristate `json:"all,omitzero"` diff --git a/internal/core/projectreference.go b/internal/core/projectreference.go index ded897f4b6..d5dcf5a78f 100644 --- a/internal/core/projectreference.go +++ b/internal/core/projectreference.go @@ -9,10 +9,10 @@ type ProjectReference struct { } func ResolveProjectReferencePath(ref *ProjectReference) string { - return resolveConfigFileNameOfProjectReference(ref.Path) + return ResolveConfigFileNameOfProjectReference(ref.Path) } -func resolveConfigFileNameOfProjectReference(path string) string { +func ResolveConfigFileNameOfProjectReference(path string) string { if tspath.FileExtensionIs(path, tspath.ExtensionJson) { return path } diff --git a/internal/outputpaths/outputpaths.go b/internal/outputpaths/outputpaths.go index a075cd481d..fa4622996a 100644 --- a/internal/outputpaths/outputpaths.go +++ b/internal/outputpaths/outputpaths.go @@ -195,7 +195,7 @@ func getDeclarationEmitExtensionForPath(fileName string) string { } func GetBuildInfoFileName(options *core.CompilerOptions, opts tspath.ComparePathsOptions) string { - if !options.IsIncremental() && !options.TscBuild.IsTrue() { + if !options.IsIncremental() && !options.Build.IsTrue() { return "" } if options.TsBuildInfoFile != "" { diff --git a/internal/tsoptions/commandlineparser.go b/internal/tsoptions/commandlineparser.go index 4064cad038..774effe1ea 100644 --- a/internal/tsoptions/commandlineparser.go +++ b/internal/tsoptions/commandlineparser.go @@ -67,6 +67,56 @@ func ParseCommandLine( } } +func ParseBuildCommandLine( + commandLine []string, + host ParseConfigHost, +) *ParsedBuildCommandLine { + if commandLine == nil { + commandLine = []string{} + } + parser := parseCommandLineWorker(buildOptionsDidYouMeanDiagnostics, commandLine, host.FS()) + compilerOptions := &core.CompilerOptions{} + for key, value := range parser.options.Entries() { + buildOption := BuildNameMap.Get(key) + if buildOption == &TscBuildOption || buildOption == CompilerNameMap.Get(key) { + ParseCompilerOptions(key, value, compilerOptions) + } + } + result := &ParsedBuildCommandLine{ + BuildOptions: convertMapToOptions(parser.options, &buildOptionsParser{&core.BuildOptions{}}).BuildOptions, + CompilerOptions: compilerOptions, + WatchOptions: convertMapToOptions(parser.options, &watchOptionsParser{&core.WatchOptions{}}).WatchOptions, + Projects: parser.fileNames, + Errors: parser.errors, + + comparePathsOptions: tspath.ComparePathsOptions{ + UseCaseSensitiveFileNames: host.FS().UseCaseSensitiveFileNames(), + CurrentDirectory: host.GetCurrentDirectory(), + }, + } + + if len(result.Projects) == 0 { + // tsc -b invoked with no extra arguments; act as if invoked with "tsc -b ." + result.Projects = append(result.Projects, ".") + } + + // Nonsensical combinations + if result.BuildOptions.Clean.IsTrue() && result.BuildOptions.Force.IsTrue() { + result.Errors = append(result.Errors, ast.NewCompilerDiagnostic(diagnostics.Options_0_and_1_cannot_be_combined, "clean", "force")) + } + if result.BuildOptions.Clean.IsTrue() && result.BuildOptions.Verbose.IsTrue() { + result.Errors = append(result.Errors, ast.NewCompilerDiagnostic(diagnostics.Options_0_and_1_cannot_be_combined, "clean", "verbose")) + } + if result.BuildOptions.Clean.IsTrue() && result.CompilerOptions.Watch.IsTrue() { + result.Errors = append(result.Errors, ast.NewCompilerDiagnostic(diagnostics.Options_0_and_1_cannot_be_combined, "clean", "watch")) + } + if result.CompilerOptions.Watch.IsTrue() && result.BuildOptions.Dry.IsTrue() { + result.Errors = append(result.Errors, ast.NewCompilerDiagnostic(diagnostics.Options_0_and_1_cannot_be_combined, "watch", "dry")) + } + + return result +} + func parseCommandLineWorker( parseCommandLineWithDiagnostics *ParseCommandLineWorkerDiagnostics, commandLine []string, @@ -116,7 +166,7 @@ func (p *commandLineParser) parseStrings(args []string) { func getInputOptionName(input string) string { // removes at most two leading '-' from the input string - return strings.ToLower(strings.TrimPrefix(strings.TrimPrefix(input, "-"), "-")) + return strings.TrimPrefix(strings.TrimPrefix(input, "-"), "-") } func (p *commandLineParser) parseResponseFile(fileName string) { diff --git a/internal/tsoptions/commandlineparser_test.go b/internal/tsoptions/commandlineparser_test.go index fcd1e780c3..9caf562d17 100644 --- a/internal/tsoptions/commandlineparser_test.go +++ b/internal/tsoptions/commandlineparser_test.go @@ -15,6 +15,8 @@ import ( "github.com/microsoft/typescript-go/internal/testutil/baseline" "github.com/microsoft/typescript-go/internal/testutil/filefixture" "github.com/microsoft/typescript-go/internal/tsoptions" + "github.com/microsoft/typescript-go/internal/tsoptions/tsoptionstest" + "github.com/microsoft/typescript-go/internal/tspath" "github.com/microsoft/typescript-go/internal/vfs/osvfs" "gotest.tools/v3/assert" ) @@ -80,7 +82,7 @@ func TestCommandLineParseResult(t *testing.T) { } for _, testCase := range parseCommandLineSubScenarios { - testCase.createSubScenario().assertParseResult(t) + testCase.createSubScenario("parseCommandLine").assertParseResult(t) } } @@ -89,7 +91,7 @@ func TestParseCommandLineVerifyNull(t *testing.T) { repo.SkipIfNoTypeScriptSubmodule(t) // run test for boolean - subScenarioInput{"allows setting option type boolean to false", []string{"--composite", "false", "0.ts"}}.createSubScenario().assertParseResult(t) + subScenarioInput{"allows setting option type boolean to false", []string{"--composite", "false", "0.ts"}}.createSubScenario("parseCommandLine").assertParseResult(t) verifyNullSubScenarios := []verifyNull{ { @@ -114,6 +116,7 @@ func TestParseCommandLineVerifyNull(t *testing.T) { for _, verifyNullCase := range verifyNullSubScenarios { createSubScenario( + "parseCommandLine", verifyNullCase.subScenario+" allows setting it to null", []string{"--" + verifyNullCase.optionName, "null", "0.ts"}, verifyNullCase.optDecls, @@ -121,6 +124,7 @@ func TestParseCommandLineVerifyNull(t *testing.T) { if verifyNullCase.nonNullValue != "" { createSubScenario( + "parseCommandLine", verifyNullCase.subScenario+" errors if non null value is passed", []string{"--" + verifyNullCase.optionName, verifyNullCase.nonNullValue, "0.ts"}, verifyNullCase.optDecls, @@ -128,12 +132,14 @@ func TestParseCommandLineVerifyNull(t *testing.T) { } createSubScenario( + "parseCommandLine", verifyNullCase.subScenario+" errors if its followed by another option", []string{"0.ts", "--strictNullChecks", "--" + verifyNullCase.optionName}, verifyNullCase.optDecls, ).assertParseResult(t) createSubScenario( + "parseCommandLine", verifyNullCase.subScenario+" errors if its last option", []string{"0.ts", "--" + verifyNullCase.optionName}, verifyNullCase.optDecls, @@ -195,10 +201,6 @@ func (f commandLineSubScenario) assertParseResult(t *testing.T) { }) } -func (f *commandLineSubScenario) getBaselineName() (baseline.Options, string) { - return baseline.Options{Subfolder: "tsoptions/commandLineParsing"}, f.testName -} - func parseExistingCompilerBaseline(t *testing.T, baseline string) *TestCommandLineParser { _, rest, _ := strings.Cut(baseline, "CompilerOptions::\n") compilerOptions, rest, watchFound := strings.Cut(rest, "\nWatchOptions::\n") @@ -243,27 +245,112 @@ func formatNewBaseline( return formatted.String() } -// todo: --build not implemented -// func parseExistingBuildBaseline(baseline string) *TestCommandLineParser { -// _, rest, _ := strings.Cut(baseline, "BuildOptions::\n") -// buildOptions, rest, _ := strings.Cut(rest, "\nWatchOptions::\n") -// _, rest, _ = strings.Cut(rest, "\nProjects::\n") -// fileNames, errors, _ := strings.Cut(rest, "\nErrors::\n") +func (f commandLineSubScenario) assertBuildParseResult(t *testing.T) { + t.Helper() + t.Run(f.testName, func(t *testing.T) { + t.Parallel() + originalBaseline := f.baseline.ReadFile(t) + tsBaseline := parseExistingCompilerBaselineBuild(t, originalBaseline) + + // f.workerDiagnostic is either defined or set to default pointer in `createSubScenario` + parsed := tsoptions.ParseBuildCommandLine(f.commandLine, &tsoptionstest.VfsParseConfigHost{ + Vfs: osvfs.FS(), + CurrentDirectory: tspath.NormalizeSlashes(repo.TypeScriptSubmodulePath), + }) + + newBaselineProjects := strings.Join(parsed.Projects, ",") + assert.Equal(t, tsBaseline.projects, newBaselineProjects) + + o, _ := json.Marshal(parsed.BuildOptions) + newParsedBuildOptions := &core.BuildOptions{} + e := json.Unmarshal(o, newParsedBuildOptions) + assert.NilError(t, e) + assert.DeepEqual(t, tsBaseline.options, newParsedBuildOptions, cmpopts.IgnoreUnexported(core.BuildOptions{})) + + compilerOpts, _ := json.Marshal(parsed.CompilerOptions) + newParsedCompilerOptions := &core.CompilerOptions{} + e = json.Unmarshal(compilerOpts, newParsedCompilerOptions) + assert.NilError(t, e) + assert.DeepEqual(t, tsBaseline.compilerOptions, newParsedCompilerOptions, cmpopts.IgnoreUnexported(core.CompilerOptions{})) + + newParsedWatchOptions := core.WatchOptions{} + e = json.Unmarshal(o, &newParsedWatchOptions) + assert.NilError(t, e) + + // !!! useful for debugging but will not pass due to `none` as enum options + // assert.DeepEqual(t, tsBaseline.watchoptions, newParsedWatchOptions) + + var formattedErrors strings.Builder + diagnosticwriter.WriteFormatDiagnostics(&formattedErrors, parsed.Errors, &diagnosticwriter.FormattingOptions{NewLine: "\n"}) + newBaselineErrors := formattedErrors.String() + + // !!! + // useful for debugging--compares the new errors with the old errors. currently will NOT pass because of unimplemented options, not completely identical enum options, etc + // assert.Equal(t, tsBaseline.errors, newBaselineErrors) + + baseline.Run(t, f.testName+".js", formatNewBaselineBuild(f.commandLine, o, compilerOpts, newBaselineProjects, newBaselineErrors), baseline.Options{Subfolder: "tsoptions/commandLineParsing"}) + }) +} + +func parseExistingCompilerBaselineBuild(t *testing.T, baseline string) *TestCommandLineParserBuild { + _, rest, _ := strings.Cut(baseline, "buildOptions::\n") + buildOptions, rest, watchFound := strings.Cut(rest, "\nWatchOptions::\n") + watchOptions, rest, _ := strings.Cut(rest, "\nProjects::\n") + projects, errors, _ := strings.Cut(rest, "\nErrors::\n") + + baselineBuildOptions := &core.BuildOptions{} + e := json.Unmarshal([]byte(buildOptions), &baselineBuildOptions) + assert.NilError(t, e) + + baselineCompilerOptions := &core.CompilerOptions{} + e = json.Unmarshal([]byte(buildOptions), &baselineCompilerOptions) + assert.NilError(t, e) -// // todo: change CompilerOptions to buildoptions -// baselineOptions := &core.CompilerOptions{} -// json.Unmarshal([]byte(buildOptions), &baselineOptions) + baselineWatchOptions := &core.WatchOptions{} + if watchFound && watchOptions != "" { + e2 := json.Unmarshal([]byte(watchOptions), &baselineWatchOptions) + assert.NilError(t, e2) + } + + return &TestCommandLineParserBuild{ + options: baselineBuildOptions, + compilerOptions: baselineCompilerOptions, + watchoptions: baselineWatchOptions, + projects: projects, + errors: errors, + } +} -// var parser = TestCommandLineParser{ -// options: *baselineOptions, -// fileNames: fileNames, -// errors: errors, -// } -// return &parser -// } +func formatNewBaselineBuild( + commandLine []string, + opts []byte, + compilerOpts []byte, + projects string, + errors string, +) string { + var formatted strings.Builder + formatted.WriteString("Args::\n") + if len(commandLine) == 0 { + formatted.WriteString("[]") + } else { + formatted.WriteString("[\"" + strings.Join(commandLine, "\", \"") + "\"]") + } + formatted.WriteString("\n\nbuildOptions::\n") + formatted.Write(opts) + formatted.WriteString("\n\ncompilerOptions::\n") + formatted.Write(compilerOpts) + // todo: watch options not implemented + // formatted.WriteString("WatchOptions::\n") + formatted.WriteString("\n\nProjects::\n") + formatted.WriteString(projects) + formatted.WriteString("\n\nErrors::\n") + formatted.WriteString(errors) + return formatted.String() +} -func createSubScenario(subScenarioName string, commandline []string, opts ...[]*tsoptions.CommandLineOption) *commandLineSubScenario { - baselineFileName := "tests/baselines/reference/config/commandLineParsing/parseCommandLine/" + subScenarioName + ".js" +func createSubScenario(scenarioKind string, subScenarioName string, commandline []string, opts ...[]*tsoptions.CommandLineOption) *commandLineSubScenario { + subScenarioName = scenarioKind + "/" + subScenarioName + baselineFileName := "tests/baselines/reference/config/commandLineParsing/" + subScenarioName + ".js" result := &commandLineSubScenario{ filefixture.FromFile(subScenarioName, filepath.Join(repo.TypeScriptSubmodulePath, baselineFileName)), @@ -282,8 +369,8 @@ type subScenarioInput struct { commandLineArgs []string } -func (f subScenarioInput) createSubScenario() *commandLineSubScenario { - return createSubScenario(f.name, f.commandLineArgs) +func (f subScenarioInput) createSubScenario(scenarioKind string) *commandLineSubScenario { + return createSubScenario(scenarioKind, f.name, f.commandLineArgs) } type commandLineSubScenario struct { @@ -306,6 +393,47 @@ type TestCommandLineParser struct { fileNames, errors string } +type TestCommandLineParserBuild struct { + options *core.BuildOptions + compilerOptions *core.CompilerOptions + watchoptions *core.WatchOptions + projects, errors string +} + +func TestParseBuildCommandLine(t *testing.T) { + t.Parallel() + repo.SkipIfNoTypeScriptSubmodule(t) + + parseCommandLineSubScenarios := []*subScenarioInput{ + {"parse build without any options ", []string{}}, + {"Parse multiple options", []string{"--verbose", "--force", "tests"}}, + {"Parse option with invalid option", []string{"--verbose", "--invalidOption"}}, + {"Parse multiple flags with input projects at the end", []string{"--force", "--verbose", "src", "tests"}}, + {"Parse multiple flags with input projects in the middle", []string{"--force", "src", "tests", "--verbose"}}, + {"Parse multiple flags with input projects in the beginning", []string{"src", "tests", "--force", "--verbose"}}, + {"parse build with --incremental", []string{"--incremental", "tests"}}, + {"parse build with --locale en-us", []string{"--locale", "en-us", "src"}}, + {"parse build with --tsBuildInfoFile", []string{"--tsBuildInfoFile", "build.tsbuildinfo", "tests"}}, + {"reports other common may not be used with --build flags", []string{"--strict"}}, + {`--clean and --force together is invalid`, []string{"--clean", "--force"}}, + {`--clean and --verbose together is invalid`, []string{"--clean", "--verbose"}}, + {`--clean and --watch together is invalid`, []string{"--clean", "--watch"}}, + {`--watch and --dry together is invalid`, []string{"--watch", "--dry"}}, + {"parse --watchFile", []string{"--watchFile", "UseFsEvents", "--verbose"}}, + {"parse --watchDirectory", []string{"--watchDirectory", "FixedPollingInterval", "--verbose"}}, + {"parse --fallbackPolling", []string{"--fallbackPolling", "PriorityInterval", "--verbose"}}, + {"parse --synchronousWatchDirectory", []string{"--synchronousWatchDirectory", "--verbose"}}, + {"errors on missing argument", []string{"--verbose", "--fallbackPolling"}}, + {"errors on invalid excludeDirectories", []string{"--excludeDirectories", "**/../*"}}, + {"parse --excludeFiles", []string{"--excludeFiles", "**/temp/*.ts"}}, + {"errors on invalid excludeFiles", []string{"--excludeFiles", "**/../*"}}, + } + + for _, testCase := range parseCommandLineSubScenarios { + testCase.createSubScenario("parseBuildOptions").assertBuildParseResult(t) + } +} + func TestAffectsBuildInfo(t *testing.T) { t.Parallel() t.Run("should have affectsBuildInfo true for every option with affectsSemanticDiagnostics", func(t *testing.T) { diff --git a/internal/tsoptions/decls_test.go b/internal/tsoptions/decls_test.go index 38ef65a8d3..221cc027ce 100644 --- a/internal/tsoptions/decls_test.go +++ b/internal/tsoptions/decls_test.go @@ -26,7 +26,7 @@ func TestCompilerOptionsDeclaration(t *testing.T) { "noEmitForJsFiles", "pathsBasePath", "suppressOutputPathCheck", - "tscBuild", + "build", } internalOptionsMap := make(map[string]string) diff --git a/internal/tsoptions/declscompiler.go b/internal/tsoptions/declscompiler.go index 11b6335ea1..6480c57079 100644 --- a/internal/tsoptions/declscompiler.go +++ b/internal/tsoptions/declscompiler.go @@ -10,7 +10,7 @@ import ( var OptionsDeclarations = slices.Concat(commonOptionsWithBuild, optionsForCompiler) -var optionsForCompiler = []*CommandLineOption{ +var commonOptionsWithBuild = []*CommandLineOption{ //******* commandOptionsWithoutBuild ******* { Name: "help", @@ -235,7 +235,7 @@ var optionsForCompiler = []*CommandLineOption{ }, } -var commonOptionsWithBuild = []*CommandLineOption{ +var optionsForCompiler = []*CommandLineOption{ //******* commandOptionsWithoutBuild ******* // CommandLine only options diff --git a/internal/tsoptions/errors.go b/internal/tsoptions/errors.go index 305693a9dd..397ff9a7bb 100644 --- a/internal/tsoptions/errors.go +++ b/internal/tsoptions/errors.go @@ -93,6 +93,8 @@ func extraKeyDiagnostics(s string) *diagnostics.Message { return diagnostics.Unknown_watch_option_0 case "typeAcquisition": return diagnostics.Unknown_type_acquisition_option_0 + case "buildOptions": + return diagnostics.Unknown_build_option_0 default: return nil } diff --git a/internal/tsoptions/namemap.go b/internal/tsoptions/namemap.go index e199577f87..31a8b98d48 100644 --- a/internal/tsoptions/namemap.go +++ b/internal/tsoptions/namemap.go @@ -46,6 +46,7 @@ func (nm *NameMap) GetFromShort(shortName string) *CommandLineOption { } func (nm *NameMap) GetOptionDeclarationFromName(optionName string, allowShort bool) *CommandLineOption { + optionName = strings.ToLower(optionName) // Try to translate short option names to their full equivalents. if allowShort { short := nm.shortOptionNames[optionName] diff --git a/internal/tsoptions/parsedbuildcommandline.go b/internal/tsoptions/parsedbuildcommandline.go new file mode 100644 index 0000000000..8a777b8c15 --- /dev/null +++ b/internal/tsoptions/parsedbuildcommandline.go @@ -0,0 +1,33 @@ +package tsoptions + +import ( + "sync" + + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/tspath" +) + +type ParsedBuildCommandLine struct { + BuildOptions *core.BuildOptions `json:"buildOptions"` + CompilerOptions *core.CompilerOptions `json:"compilerOptions"` + WatchOptions *core.WatchOptions `json:"watchOptions"` + Projects []string `json:"projects"` + Errors []*ast.Diagnostic `json:"errors"` + + comparePathsOptions tspath.ComparePathsOptions + + resolvedProjectPaths []string + resolvedProjectPathsOnce sync.Once +} + +func (p *ParsedBuildCommandLine) ResolvedProjectPaths() []string { + p.resolvedProjectPathsOnce.Do(func() { + p.resolvedProjectPaths = core.Map(p.Projects, func(project string) string { + return core.ResolveConfigFileNameOfProjectReference( + tspath.ResolvePath(p.comparePathsOptions.CurrentDirectory, project), + ) + }) + }) + return p.resolvedProjectPaths +} diff --git a/internal/tsoptions/parsedcommandline.go b/internal/tsoptions/parsedcommandline.go index 8d36f04811..a75f06ee5f 100644 --- a/internal/tsoptions/parsedcommandline.go +++ b/internal/tsoptions/parsedcommandline.go @@ -202,14 +202,7 @@ func (p *ParsedCommandLine) ProjectReferences() []*core.ProjectReference { func (p *ParsedCommandLine) ResolvedProjectReferencePaths() []string { p.resolvedProjectReferencePathsOnce.Do(func() { - if p.ParsedConfig.ProjectReferences == nil { - return - } - resolvedProjectReferencePaths := make([]string, 0, len(p.ParsedConfig.ProjectReferences)) - for _, ref := range p.ParsedConfig.ProjectReferences { - resolvedProjectReferencePaths = append(resolvedProjectReferencePaths, core.ResolveProjectReferencePath(ref)) - } - p.resolvedProjectReferencePaths = resolvedProjectReferencePaths + p.resolvedProjectReferencePaths = core.Map(p.ParsedConfig.ProjectReferences, core.ResolveProjectReferencePath) }) return p.resolvedProjectReferencePaths } diff --git a/internal/tsoptions/parsinghelpers.go b/internal/tsoptions/parsinghelpers.go index 859d65ce85..62817d81eb 100644 --- a/internal/tsoptions/parsinghelpers.go +++ b/internal/tsoptions/parsinghelpers.go @@ -156,6 +156,18 @@ func (o *typeAcquisitionParser) UnknownOptionDiagnostic() *diagnostics.Message { return extraKeyDiagnostics("typeAcquisition") } +type buildOptionsParser struct { + *core.BuildOptions +} + +func (o *buildOptionsParser) ParseOption(key string, value any) []*ast.Diagnostic { + return ParseBuildOptions(key, value, o.BuildOptions) +} + +func (o *buildOptionsParser) UnknownOptionDiagnostic() *diagnostics.Message { + return extraKeyDiagnostics("buildOptions") +} + func ParseCompilerOptions(key string, value any, allOptions *core.CompilerOptions) []*ast.Diagnostic { if value == nil { return nil @@ -391,8 +403,6 @@ func parseCompilerOptions(key string, value any, allOptions *core.CompilerOption allOptions.TsBuildInfoFile = parseString(value) case "typeRoots": allOptions.TypeRoots = parseStringArray(value) - case "tscBuild": - allOptions.TscBuild = parseTristate(value) case "types": allOptions.Types = parseStringArray(value) case "useDefineForClassFields": @@ -496,6 +506,32 @@ func ParseTypeAcquisition(key string, value any, allOptions *core.TypeAcquisitio return nil } +func ParseBuildOptions(key string, value any, allOptions *core.BuildOptions) []*ast.Diagnostic { + if value == nil { + return nil + } + if allOptions == nil { + return nil + } + option := BuildNameMap.Get(key) + if option != nil { + key = option.Name + } + switch key { + case "clean": + allOptions.Clean = parseTristate(value) + case "dry": + allOptions.Dry = parseTristate(value) + case "force": + allOptions.Force = parseTristate(value) + case "stopBuildOnErrors": + allOptions.StopBuildOnErrors = parseTristate(value) + case "verbose": + allOptions.Verbose = parseTristate(value) + } + return nil +} + // mergeCompilerOptions merges the source compiler options into the target compiler options // with optional awareness of explicitly set null values in the raw JSON. // Fields in the source options will overwrite the corresponding fields in the target options, diff --git a/testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js b/testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js index d5682e767f..223c37ff17 100644 --- a/testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js +++ b/testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js @@ -35,6 +35,12 @@ COMMON COMMANDS COMMAND LINE FLAGS +--help, -h +Print this message. + +--watch, -w +Watch input files. + --all Show all compiler options. @@ -50,17 +56,41 @@ Compile the project given the path to its configuration file, or to a folder wit --showConfig Print the final configuration instead of building. ---help, -h -Print this message. - ---watch, -w -Watch input files. - --build, -b Build one or more projects and their dependencies, if out of date COMMON COMPILER OPTIONS +--pretty +Enable color and formatting in TypeScript's output to make compiler errors easier to read. +type: boolean +default: true + +--declaration, -d +Generate .d.ts files from TypeScript and JavaScript files in your project. +type: boolean +default: `false`, unless `composite` is set + +--declarationMap +Create sourcemaps for d.ts files. +type: boolean +default: false + +--emitDeclarationOnly +Only output d.ts files and not JavaScript files. +type: boolean +default: false + +--sourceMap +Create source map files for emitted JavaScript files. +type: boolean +default: false + +--noEmit +Disable emitting files from a compilation. +type: boolean +default: false + --target, -t Set the JavaScript language version for emitted JavaScript and include compatible library declarations. one of: es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext @@ -115,36 +145,6 @@ Emit additional JavaScript to ease support for importing CommonJS modules. This type: boolean default: false ---pretty -Enable color and formatting in TypeScript's output to make compiler errors easier to read. -type: boolean -default: true - ---declaration, -d -Generate .d.ts files from TypeScript and JavaScript files in your project. -type: boolean -default: `false`, unless `composite` is set - ---declarationMap -Create sourcemaps for d.ts files. -type: boolean -default: false - ---emitDeclarationOnly -Only output d.ts files and not JavaScript files. -type: boolean -default: false - ---sourceMap -Create source map files for emitted JavaScript files. -type: boolean -default: false - ---noEmit -Disable emitting files from a compilation. -type: boolean -default: false - You can learn about all of the compiler options at https://aka.ms/tsc diff --git a/testdata/baselines/reference/tsc/commandLine/help.js b/testdata/baselines/reference/tsc/commandLine/help.js index 3aa7b708d2..6dc9ee4a60 100644 --- a/testdata/baselines/reference/tsc/commandLine/help.js +++ b/testdata/baselines/reference/tsc/commandLine/help.js @@ -33,6 +33,12 @@ COMMON COMMANDS COMMAND LINE FLAGS +--help, -h +Print this message. + +--watch, -w +Watch input files. + --all Show all compiler options. @@ -48,17 +54,41 @@ Compile the project given the path to its configuration file, or to a folder wit --showConfig Print the final configuration instead of building. ---help, -h -Print this message. - ---watch, -w -Watch input files. - --build, -b Build one or more projects and their dependencies, if out of date COMMON COMPILER OPTIONS +--pretty +Enable color and formatting in TypeScript's output to make compiler errors easier to read. +type: boolean +default: true + +--declaration, -d +Generate .d.ts files from TypeScript and JavaScript files in your project. +type: boolean +default: `false`, unless `composite` is set + +--declarationMap +Create sourcemaps for d.ts files. +type: boolean +default: false + +--emitDeclarationOnly +Only output d.ts files and not JavaScript files. +type: boolean +default: false + +--sourceMap +Create source map files for emitted JavaScript files. +type: boolean +default: false + +--noEmit +Disable emitting files from a compilation. +type: boolean +default: false + --target, -t Set the JavaScript language version for emitted JavaScript and include compatible library declarations. one of: es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext @@ -113,36 +143,6 @@ Emit additional JavaScript to ease support for importing CommonJS modules. This type: boolean default: false ---pretty -Enable color and formatting in TypeScript's output to make compiler errors easier to read. -type: boolean -default: true - ---declaration, -d -Generate .d.ts files from TypeScript and JavaScript files in your project. -type: boolean -default: `false`, unless `composite` is set - ---declarationMap -Create sourcemaps for d.ts files. -type: boolean -default: false - ---emitDeclarationOnly -Only output d.ts files and not JavaScript files. -type: boolean -default: false - ---sourceMap -Create source map files for emitted JavaScript files. -type: boolean -default: false - ---noEmit -Disable emitting files from a compilation. -type: boolean -default: false - You can learn about all of the compiler options at https://aka.ms/tsc diff --git a/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js b/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js index d5682e767f..223c37ff17 100644 --- a/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js +++ b/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js @@ -35,6 +35,12 @@ COMMON COMMANDS COMMAND LINE FLAGS +--help, -h +Print this message. + +--watch, -w +Watch input files. + --all Show all compiler options. @@ -50,17 +56,41 @@ Compile the project given the path to its configuration file, or to a folder wit --showConfig Print the final configuration instead of building. ---help, -h -Print this message. - ---watch, -w -Watch input files. - --build, -b Build one or more projects and their dependencies, if out of date COMMON COMPILER OPTIONS +--pretty +Enable color and formatting in TypeScript's output to make compiler errors easier to read. +type: boolean +default: true + +--declaration, -d +Generate .d.ts files from TypeScript and JavaScript files in your project. +type: boolean +default: `false`, unless `composite` is set + +--declarationMap +Create sourcemaps for d.ts files. +type: boolean +default: false + +--emitDeclarationOnly +Only output d.ts files and not JavaScript files. +type: boolean +default: false + +--sourceMap +Create source map files for emitted JavaScript files. +type: boolean +default: false + +--noEmit +Disable emitting files from a compilation. +type: boolean +default: false + --target, -t Set the JavaScript language version for emitted JavaScript and include compatible library declarations. one of: es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext @@ -115,36 +145,6 @@ Emit additional JavaScript to ease support for importing CommonJS modules. This type: boolean default: false ---pretty -Enable color and formatting in TypeScript's output to make compiler errors easier to read. -type: boolean -default: true - ---declaration, -d -Generate .d.ts files from TypeScript and JavaScript files in your project. -type: boolean -default: `false`, unless `composite` is set - ---declarationMap -Create sourcemaps for d.ts files. -type: boolean -default: false - ---emitDeclarationOnly -Only output d.ts files and not JavaScript files. -type: boolean -default: false - ---sourceMap -Create source map files for emitted JavaScript files. -type: boolean -default: false - ---noEmit -Disable emitting files from a compilation. -type: boolean -default: false - You can learn about all of the compiler options at https://aka.ms/tsc diff --git a/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js b/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js index d5682e767f..223c37ff17 100644 --- a/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js +++ b/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js @@ -35,6 +35,12 @@ COMMON COMMANDS COMMAND LINE FLAGS +--help, -h +Print this message. + +--watch, -w +Watch input files. + --all Show all compiler options. @@ -50,17 +56,41 @@ Compile the project given the path to its configuration file, or to a folder wit --showConfig Print the final configuration instead of building. ---help, -h -Print this message. - ---watch, -w -Watch input files. - --build, -b Build one or more projects and their dependencies, if out of date COMMON COMPILER OPTIONS +--pretty +Enable color and formatting in TypeScript's output to make compiler errors easier to read. +type: boolean +default: true + +--declaration, -d +Generate .d.ts files from TypeScript and JavaScript files in your project. +type: boolean +default: `false`, unless `composite` is set + +--declarationMap +Create sourcemaps for d.ts files. +type: boolean +default: false + +--emitDeclarationOnly +Only output d.ts files and not JavaScript files. +type: boolean +default: false + +--sourceMap +Create source map files for emitted JavaScript files. +type: boolean +default: false + +--noEmit +Disable emitting files from a compilation. +type: boolean +default: false + --target, -t Set the JavaScript language version for emitted JavaScript and include compatible library declarations. one of: es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext @@ -115,36 +145,6 @@ Emit additional JavaScript to ease support for importing CommonJS modules. This type: boolean default: false ---pretty -Enable color and formatting in TypeScript's output to make compiler errors easier to read. -type: boolean -default: true - ---declaration, -d -Generate .d.ts files from TypeScript and JavaScript files in your project. -type: boolean -default: `false`, unless `composite` is set - ---declarationMap -Create sourcemaps for d.ts files. -type: boolean -default: false - ---emitDeclarationOnly -Only output d.ts files and not JavaScript files. -type: boolean -default: false - ---sourceMap -Create source map files for emitted JavaScript files. -type: boolean -default: false - ---noEmit -Disable emitting files from a compilation. -type: boolean -default: false - You can learn about all of the compiler options at https://aka.ms/tsc diff --git a/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js b/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js index d7bf239951..ce4e478f97 100644 --- a/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js +++ b/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js @@ -35,6 +35,12 @@ COMMON COMMANDS COMMAND LINE FLAGS +--help, -h +Print this message. + +--watch, -w +Watch input files. + --all Show all compiler options. @@ -50,17 +56,41 @@ Compile the project given the path to its configuration file, or to a folder wit --showConfig Print the final configuration instead of building. ---help, -h -Print this message. - ---watch, -w -Watch input files. - --build, -b Build one or more projects and their dependencies, if out of date COMMON COMPILER OPTIONS +--pretty +Enable color and formatting in TypeScript's output to make compiler errors easier to read. +type: boolean +default: true + +--declaration, -d +Generate .d.ts files from TypeScript and JavaScript files in your project. +type: boolean +default: `false`, unless `composite` is set + +--declarationMap +Create sourcemaps for d.ts files. +type: boolean +default: false + +--emitDeclarationOnly +Only output d.ts files and not JavaScript files. +type: boolean +default: false + +--sourceMap +Create source map files for emitted JavaScript files. +type: boolean +default: false + +--noEmit +Disable emitting files from a compilation. +type: boolean +default: false + --target, -t Set the JavaScript language version for emitted JavaScript and include compatible library declarations. one of: es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext @@ -115,36 +145,6 @@ Emit additional JavaScript to ease support for importing CommonJS modules. This type: boolean default: false ---pretty -Enable color and formatting in TypeScript's output to make compiler errors easier to read. -type: boolean -default: true - ---declaration, -d -Generate .d.ts files from TypeScript and JavaScript files in your project. -type: boolean -default: `false`, unless `composite` is set - ---declarationMap -Create sourcemaps for d.ts files. -type: boolean -default: false - ---emitDeclarationOnly -Only output d.ts files and not JavaScript files. -type: boolean -default: false - ---sourceMap -Create source map files for emitted JavaScript files. -type: boolean -default: false - ---noEmit -Disable emitting files from a compilation. -type: boolean -default: false - You can learn about all of the compiler options at https://aka.ms/tsc diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--clean and --force together is invalid.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--clean and --force together is invalid.js new file mode 100644 index 0000000000..7d355cde48 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--clean and --force together is invalid.js @@ -0,0 +1,14 @@ +Args:: +["--clean", "--force"] + +buildOptions:: +{"force":true,"clean":true} + +compilerOptions:: +{} + +Projects:: +. + +Errors:: +error TS6370: Options 'clean' and 'force' cannot be combined. diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--clean and --verbose together is invalid.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--clean and --verbose together is invalid.js new file mode 100644 index 0000000000..b7ad4b6258 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--clean and --verbose together is invalid.js @@ -0,0 +1,14 @@ +Args:: +["--clean", "--verbose"] + +buildOptions:: +{"verbose":true,"clean":true} + +compilerOptions:: +{} + +Projects:: +. + +Errors:: +error TS6370: Options 'clean' and 'verbose' cannot be combined. diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--clean and --watch together is invalid.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--clean and --watch together is invalid.js new file mode 100644 index 0000000000..6348863d00 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--clean and --watch together is invalid.js @@ -0,0 +1,14 @@ +Args:: +["--clean", "--watch"] + +buildOptions:: +{"clean":true} + +compilerOptions:: +{"watch":true} + +Projects:: +. + +Errors:: +error TS6370: Options 'clean' and 'watch' cannot be combined. diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--watch and --dry together is invalid.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--watch and --dry together is invalid.js new file mode 100644 index 0000000000..97f34ee75c --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/--watch and --dry together is invalid.js @@ -0,0 +1,14 @@ +Args:: +["--watch", "--dry"] + +buildOptions:: +{"dry":true} + +compilerOptions:: +{"watch":true} + +Projects:: +. + +Errors:: +error TS6370: Options 'watch' and 'dry' cannot be combined. diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects at the end.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects at the end.js new file mode 100644 index 0000000000..558bf868bb --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects at the end.js @@ -0,0 +1,13 @@ +Args:: +["--force", "--verbose", "src", "tests"] + +buildOptions:: +{"force":true,"verbose":true} + +compilerOptions:: +{} + +Projects:: +src,tests + +Errors:: diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the beginning.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the beginning.js new file mode 100644 index 0000000000..b602d36479 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the beginning.js @@ -0,0 +1,13 @@ +Args:: +["src", "tests", "--force", "--verbose"] + +buildOptions:: +{"force":true,"verbose":true} + +compilerOptions:: +{} + +Projects:: +src,tests + +Errors:: diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the middle.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the middle.js new file mode 100644 index 0000000000..a96144e78d --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the middle.js @@ -0,0 +1,13 @@ +Args:: +["--force", "src", "tests", "--verbose"] + +buildOptions:: +{"force":true,"verbose":true} + +compilerOptions:: +{} + +Projects:: +src,tests + +Errors:: diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple options.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple options.js new file mode 100644 index 0000000000..f8b7bbb3d1 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse multiple options.js @@ -0,0 +1,13 @@ +Args:: +["--verbose", "--force", "tests"] + +buildOptions:: +{"force":true,"verbose":true} + +compilerOptions:: +{} + +Projects:: +tests + +Errors:: diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse option with invalid option.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse option with invalid option.js new file mode 100644 index 0000000000..cdf571ece3 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/Parse option with invalid option.js @@ -0,0 +1,14 @@ +Args:: +["--verbose", "--invalidOption"] + +buildOptions:: +{"verbose":true} + +compilerOptions:: +{} + +Projects:: +. + +Errors:: +error TS5072: Unknown build option '--invalidOption'. diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/errors on invalid excludeDirectories.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/errors on invalid excludeDirectories.js new file mode 100644 index 0000000000..11566c7498 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/errors on invalid excludeDirectories.js @@ -0,0 +1,14 @@ +Args:: +["--excludeDirectories", "**/../*"] + +buildOptions:: +{} + +compilerOptions:: +{} + +Projects:: +. + +Errors:: +error TS5065: File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'. diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/errors on invalid excludeFiles.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/errors on invalid excludeFiles.js new file mode 100644 index 0000000000..a4e28b7512 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/errors on invalid excludeFiles.js @@ -0,0 +1,14 @@ +Args:: +["--excludeFiles", "**/../*"] + +buildOptions:: +{} + +compilerOptions:: +{} + +Projects:: +. + +Errors:: +error TS5065: File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'. diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/errors on missing argument.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/errors on missing argument.js new file mode 100644 index 0000000000..46e8c2c48c --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/errors on missing argument.js @@ -0,0 +1,15 @@ +Args:: +["--verbose", "--fallbackPolling"] + +buildOptions:: +{"verbose":true} + +compilerOptions:: +{} + +Projects:: +. + +Errors:: +error TS5080: Watch option 'fallbackPolling' requires a value of type enum. +error TS6046: Argument for '--fallbackPolling' option must be: 'fixedinterval', 'priorityinterval', 'dynamicpriority', 'fixedchunksize'. diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --excludeFiles.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --excludeFiles.js new file mode 100644 index 0000000000..2135ef62d8 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --excludeFiles.js @@ -0,0 +1,13 @@ +Args:: +["--excludeFiles", "**/temp/*.ts"] + +buildOptions:: +{} + +compilerOptions:: +{} + +Projects:: +. + +Errors:: diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --fallbackPolling.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --fallbackPolling.js new file mode 100644 index 0000000000..feac93a700 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --fallbackPolling.js @@ -0,0 +1,13 @@ +Args:: +["--fallbackPolling", "PriorityInterval", "--verbose"] + +buildOptions:: +{"verbose":true} + +compilerOptions:: +{} + +Projects:: +. + +Errors:: diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --synchronousWatchDirectory.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --synchronousWatchDirectory.js new file mode 100644 index 0000000000..7832ff5602 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --synchronousWatchDirectory.js @@ -0,0 +1,13 @@ +Args:: +["--synchronousWatchDirectory", "--verbose"] + +buildOptions:: +{"verbose":true} + +compilerOptions:: +{} + +Projects:: +. + +Errors:: diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --watchDirectory.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --watchDirectory.js new file mode 100644 index 0000000000..5163d827a8 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --watchDirectory.js @@ -0,0 +1,13 @@ +Args:: +["--watchDirectory", "FixedPollingInterval", "--verbose"] + +buildOptions:: +{"verbose":true} + +compilerOptions:: +{} + +Projects:: +. + +Errors:: diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --watchFile.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --watchFile.js new file mode 100644 index 0000000000..afc498f2d6 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse --watchFile.js @@ -0,0 +1,13 @@ +Args:: +["--watchFile", "UseFsEvents", "--verbose"] + +buildOptions:: +{"verbose":true} + +compilerOptions:: +{} + +Projects:: +. + +Errors:: diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build with --incremental.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build with --incremental.js new file mode 100644 index 0000000000..86aa4fb92f --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build with --incremental.js @@ -0,0 +1,13 @@ +Args:: +["--incremental", "tests"] + +buildOptions:: +{} + +compilerOptions:: +{"incremental":true} + +Projects:: +tests + +Errors:: diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build with --locale en-us.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build with --locale en-us.js new file mode 100644 index 0000000000..893f1129ab --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build with --locale en-us.js @@ -0,0 +1,13 @@ +Args:: +["--locale", "en-us", "src"] + +buildOptions:: +{} + +compilerOptions:: +{"locale":"en-us"} + +Projects:: +src + +Errors:: diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build with --tsBuildInfoFile.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build with --tsBuildInfoFile.js new file mode 100644 index 0000000000..ba8480f366 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build with --tsBuildInfoFile.js @@ -0,0 +1,14 @@ +Args:: +["--tsBuildInfoFile", "build.tsbuildinfo", "tests"] + +buildOptions:: +{} + +compilerOptions:: +{} + +Projects:: +build.tsbuildinfo,tests + +Errors:: +error TS5094: Compiler option '--tsBuildInfoFile' may not be used with '--build'. diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build without any options .js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build without any options .js new file mode 100644 index 0000000000..65c5a8ce58 --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/parse build without any options .js @@ -0,0 +1,13 @@ +Args:: +[] + +buildOptions:: +{} + +compilerOptions:: +{} + +Projects:: +. + +Errors:: diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/reports other common may not be used with --build flags.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/reports other common may not be used with --build flags.js new file mode 100644 index 0000000000..47699fb74d --- /dev/null +++ b/testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions/reports other common may not be used with --build flags.js @@ -0,0 +1,14 @@ +Args:: +["--strict"] + +buildOptions:: +{} + +compilerOptions:: +{} + +Projects:: +. + +Errors:: +error TS5094: Compiler option '--strict' may not be used with '--build'. diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Handles did you mean for misspelt flags.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Handles did you mean for misspelt flags.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Handles did you mean for misspelt flags.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Handles did you mean for misspelt flags.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Handles may only be used with --build flags.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Handles may only be used with --build flags.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Handles may only be used with --build flags.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Handles may only be used with --build flags.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse --lib option with extra comma.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse --lib option with extra comma.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse --lib option with extra comma.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse --lib option with extra comma.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse --lib option with trailing white-space.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse --lib option with trailing white-space.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse --lib option with trailing white-space.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse --lib option with trailing white-space.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty options of --jsx.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty options of --jsx.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty options of --jsx.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty options of --jsx.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty options of --lib.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty options of --lib.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty options of --lib.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty options of --lib.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty options of --module.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty options of --module.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty options of --module.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty options of --module.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty options of --moduleResolution.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty options of --moduleResolution.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty options of --moduleResolution.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty options of --moduleResolution.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty options of --newLine.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty options of --newLine.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty options of --newLine.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty options of --newLine.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty options of --target.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty options of --target.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty options of --target.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty options of --target.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty string of --lib.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty string of --lib.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse empty string of --lib.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse empty string of --lib.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse explicit boolean flag value.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse explicit boolean flag value.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse explicit boolean flag value.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse explicit boolean flag value.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse immediately following command line argument of --lib.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse immediately following command line argument of --lib.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse immediately following command line argument of --lib.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse immediately following command line argument of --lib.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse implicit boolean flag value.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse implicit boolean flag value.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse implicit boolean flag value.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse implicit boolean flag value.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse invalid option of library flags.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse invalid option of library flags.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse invalid option of library flags.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse invalid option of library flags.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse multiple compiler flags with input files at the end.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse multiple compiler flags with input files at the end.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse multiple compiler flags with input files at the end.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse multiple compiler flags with input files at the end.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse multiple compiler flags with input files in the middle.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse multiple compiler flags with input files in the middle.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse multiple compiler flags with input files in the middle.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse multiple compiler flags with input files in the middle.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse multiple library compiler flags .js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse multiple library compiler flags .js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse multiple library compiler flags .js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse multiple library compiler flags .js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse multiple options of library flags.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse multiple options of library flags.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse multiple options of library flags.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse multiple options of library flags.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse non boolean argument after boolean flag.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse non boolean argument after boolean flag.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse non boolean argument after boolean flag.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse non boolean argument after boolean flag.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/Parse single option of library flag.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse single option of library flag.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/Parse single option of library flag.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/Parse single option of library flag.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/allows setting option type boolean to false.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/allows setting option type boolean to false.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/allows setting option type boolean to false.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/allows setting option type boolean to false.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/allows tsconfig only option to be set to null.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/allows tsconfig only option to be set to null.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/allows tsconfig only option to be set to null.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/allows tsconfig only option to be set to null.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/errors on invalid excludeDirectories.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/errors on invalid excludeDirectories.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/errors on invalid excludeDirectories.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/errors on invalid excludeDirectories.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/errors on invalid excludeFiles.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/errors on invalid excludeFiles.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/errors on invalid excludeFiles.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/errors on invalid excludeFiles.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/errors on missing argument to --fallbackPolling.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/errors on missing argument to --fallbackPolling.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/errors on missing argument to --fallbackPolling.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/errors on missing argument to --fallbackPolling.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type boolean allows setting it to null.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type boolean allows setting it to null.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type boolean allows setting it to null.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type boolean allows setting it to null.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type boolean errors if its followed by another option.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type boolean errors if its followed by another option.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type boolean errors if its followed by another option.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type boolean errors if its followed by another option.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type boolean errors if its last option.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type boolean errors if its last option.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type boolean errors if its last option.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type boolean errors if its last option.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type boolean errors if non null value is passed.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type boolean errors if non null value is passed.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type boolean errors if non null value is passed.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type boolean errors if non null value is passed.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type list allows setting it to null.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type list allows setting it to null.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type list allows setting it to null.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type list allows setting it to null.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type list errors if its followed by another option.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type list errors if its followed by another option.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type list errors if its followed by another option.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type list errors if its followed by another option.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type list errors if its last option.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type list errors if its last option.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type list errors if its last option.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type list errors if its last option.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type list errors if non null value is passed.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type list errors if non null value is passed.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type list errors if non null value is passed.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type list errors if non null value is passed.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type number allows setting it to null.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type number allows setting it to null.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type number allows setting it to null.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type number allows setting it to null.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type number errors if its followed by another option.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type number errors if its followed by another option.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type number errors if its followed by another option.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type number errors if its followed by another option.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type number errors if its last option.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type number errors if its last option.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type number errors if its last option.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type number errors if its last option.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type number errors if non null value is passed.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type number errors if non null value is passed.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type number errors if non null value is passed.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type number errors if non null value is passed.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type object allows setting it to null.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type object allows setting it to null.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type object allows setting it to null.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type object allows setting it to null.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type object errors if its followed by another option.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type object errors if its followed by another option.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type object errors if its followed by another option.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type object errors if its followed by another option.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type object errors if its last option.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type object errors if its last option.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type object errors if its last option.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type object errors if its last option.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type string allows setting it to null.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type string allows setting it to null.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type string allows setting it to null.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type string allows setting it to null.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type string errors if its followed by another option.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type string errors if its followed by another option.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type string errors if its followed by another option.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type string errors if its followed by another option.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type string errors if its last option.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type string errors if its last option.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type string errors if its last option.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type string errors if its last option.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/option of type string errors if non null value is passed.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type string errors if non null value is passed.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/option of type string errors if non null value is passed.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/option of type string errors if non null value is passed.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parse --excludeDirectories.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --excludeDirectories.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/parse --excludeDirectories.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --excludeDirectories.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parse --excludeFiles.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --excludeFiles.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/parse --excludeFiles.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --excludeFiles.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parse --fallbackPolling.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --fallbackPolling.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/parse --fallbackPolling.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --fallbackPolling.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parse --incremental.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --incremental.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/parse --incremental.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --incremental.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parse --synchronousWatchDirectory.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --synchronousWatchDirectory.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/parse --synchronousWatchDirectory.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --synchronousWatchDirectory.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parse --tsBuildInfoFile.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --tsBuildInfoFile.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/parse --tsBuildInfoFile.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --tsBuildInfoFile.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parse --watchDirectory.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --watchDirectory.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/parse --watchDirectory.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --watchDirectory.js diff --git a/testdata/baselines/reference/tsoptions/commandLineParsing/parse --watchFile.js b/testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --watchFile.js similarity index 100% rename from testdata/baselines/reference/tsoptions/commandLineParsing/parse --watchFile.js rename to testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine/parse --watchFile.js From c8fe761ceae3bb4de83ed034ca8b5ae5c81e9100 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 23 Jul 2025 14:33:03 -0700 Subject: [PATCH 3/5] add help --- internal/execute/outputs.go | 20 +++ internal/execute/tsc.go | 77 +++++++++- internal/execute/tscbuild_test.go | 20 +++ .../reference/tsbuild/commandLine/help.js | 143 ++++++++++++++++++ 4 files changed, 257 insertions(+), 3 deletions(-) create mode 100644 internal/execute/tscbuild_test.go create mode 100644 testdata/baselines/reference/tsbuild/commandLine/help.js diff --git a/internal/execute/outputs.go b/internal/execute/outputs.go index 3c6e14c327..ae4e26faba 100644 --- a/internal/execute/outputs.go +++ b/internal/execute/outputs.go @@ -203,6 +203,26 @@ func printEasyHelp(sys System, simpleOptions []*tsoptions.CommandLineOption) { sys.EndWrite() } +func printBuildHelp(sys System, buildOptions []*tsoptions.CommandLineOption) { + var output []string + output = append(output, getHeader(sys, diagnostics.X_tsc_Colon_The_TypeScript_Compiler.Format()+" - "+diagnostics.Version_0.Format(core.Version()))...) + output = append(output, generateSectionOptionsOutput( + sys, + diagnostics.BUILD_OPTIONS.Format(), + core.Filter(buildOptions, func(option *tsoptions.CommandLineOption) bool { + return option != &tsoptions.TscBuildOption + }), + false, + nil, // !!! locale formatMessage(Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds")), + nil, + )...) + + for _, chunk := range output { + fmt.Fprint(sys.Writer(), chunk) + } + sys.EndWrite() +} + func generateSectionOptionsOutput( sys System, sectionName string, diff --git a/internal/execute/tsc.go b/internal/execute/tsc.go index af97431c32..cf0f1ac381 100644 --- a/internal/execute/tsc.go +++ b/internal/execute/tsc.go @@ -52,9 +52,7 @@ func CommandLine(sys System, commandLineArgs []string, testing bool) CommandLine // !!! build mode switch strings.ToLower(commandLineArgs[0]) { case "-b", "--b", "-build", "--build": - fmt.Fprintln(sys.Writer(), "Build mode is currently unsupported.") - sys.EndWrite() - return CommandLineResult{Status: ExitStatusNotImplemented} + return tscBuildCompilation(sys, tsoptions.ParseBuildCommandLine(commandLineArgs, sys), testing) // case "-f": // return fmtMain(sys, commandLineArgs[1], commandLineArgs[1]) } @@ -89,6 +87,79 @@ func fmtMain(sys System, input, output string) ExitStatus { return ExitStatusSuccess } +func tscBuildCompilation(sys System, buildCommand *tsoptions.ParsedBuildCommandLine, testing bool) CommandLineResult { + reportDiagnostic := createDiagnosticReporter(sys, buildCommand.CompilerOptions) + + // if (buildOptions.locale) { + // validateLocaleAndSetLanguage(buildOptions.locale, sys, errors); + // } + + if len(buildCommand.Errors) > 0 { + for _, err := range buildCommand.Errors { + reportDiagnostic(err) + } + return CommandLineResult{Status: ExitStatusDiagnosticsPresent_OutputsSkipped} + } + + if buildCommand.CompilerOptions.Help.IsTrue() { + printVersion(sys) + printBuildHelp(sys, tsoptions.BuildOpts) + return CommandLineResult{Status: ExitStatusSuccess} + } + + // if (buildOptions.watch) { + // if (reportWatchModeWithoutSysSupport(sys, reportDiagnostic)) return; + // const buildHost = createSolutionBuilderWithWatchHost( + // sys, + // /*createProgram*/ undefined, + // reportDiagnostic, + // createBuilderStatusReporter(sys, shouldBePretty(sys, buildOptions)), + // createWatchStatusReporter(sys, buildOptions), + // ); + // buildHost.jsDocParsingMode = defaultJSDocParsingMode; + // const solutionPerformance = enableSolutionPerformance(sys, buildOptions); + // updateSolutionBuilderHost(sys, cb, buildHost, solutionPerformance); + // const onWatchStatusChange = buildHost.onWatchStatusChange; + // let reportBuildStatistics = false; + // buildHost.onWatchStatusChange = (d, newLine, options, errorCount) => { + // onWatchStatusChange?.(d, newLine, options, errorCount); + // if ( + // reportBuildStatistics && ( + // d.code === Diagnostics.Found_0_errors_Watching_for_file_changes.code || + // d.code === Diagnostics.Found_1_error_Watching_for_file_changes.code + // ) + // ) { + // reportSolutionBuilderTimes(builder, solutionPerformance); + // } + // }; + // const builder = createSolutionBuilderWithWatch(buildHost, projects, buildOptions, watchOptions); + // builder.build(); + // reportSolutionBuilderTimes(builder, solutionPerformance); + // reportBuildStatistics = true; + // return builder; + // } + + // const buildHost = createSolutionBuilderHost( + // sys, + // /*createProgram*/ undefined, + // reportDiagnostic, + // createBuilderStatusReporter(sys, shouldBePretty(sys, buildOptions)), + // createReportErrorSummary(sys, buildOptions), + // ); + // buildHost.jsDocParsingMode = defaultJSDocParsingMode; + // const solutionPerformance = enableSolutionPerformance(sys, buildOptions); + // updateSolutionBuilderHost(sys, cb, buildHost, solutionPerformance); + // const builder = createSolutionBuilder(buildHost, projects, buildOptions); + // const exitStatus = buildOptions.clean ? builder.clean() : builder.build(); + // reportSolutionBuilderTimes(builder, solutionPerformance); + // dumpTracingLegend(); // Will no-op if there hasn't been any tracing + // return sys.exit(exitStatus); + + fmt.Fprintln(sys.Writer(), "Build mode is currently unsupported.") + sys.EndWrite() + return CommandLineResult{Status: ExitStatusNotImplemented} +} + func tscCompilation(sys System, commandLine *tsoptions.ParsedCommandLine, testing bool) CommandLineResult { configFileName := "" reportDiagnostic := createDiagnosticReporter(sys, commandLine.CompilerOptions()) diff --git a/internal/execute/tscbuild_test.go b/internal/execute/tscbuild_test.go new file mode 100644 index 0000000000..297b824dd6 --- /dev/null +++ b/internal/execute/tscbuild_test.go @@ -0,0 +1,20 @@ +package execute_test + +import ( + "testing" +) + +func TestBuildCommandLine(t *testing.T) { + t.Parallel() + testCases := []*tscInput{ + { + subScenario: "help", + files: FileMap{}, + commandLineArgs: []string{"--build", "--help"}, + }, + } + + for _, test := range testCases { + test.run(t, "commandLine") + } +} diff --git a/testdata/baselines/reference/tsbuild/commandLine/help.js b/testdata/baselines/reference/tsbuild/commandLine/help.js new file mode 100644 index 0000000000..098ec04b55 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/commandLine/help.js @@ -0,0 +1,143 @@ +currentDirectory::/home/src/workspaces/project +useCaseSensitiveFileNames::true +Input:: + +tsgo --build --help +ExitStatus:: Success +Output:: +Version FakeTSVersion + +tsc: The TypeScript Compiler - Version FakeTSVersion + +BUILD OPTIONS + +--help, -h +Print this message. + +--help, -? + + +--watch, -w +Watch input files. + +--preserveWatchOutput +Disable wiping the console in watch mode. +type: boolean +default: false + +--listFiles +Print all of the files read during the compilation. +type: boolean +default: false + +--explainFiles +Print files read during the compilation including why it was included. +type: boolean +default: false + +--listEmittedFiles +Print the names of emitted files after a compilation. +type: boolean +default: false + +--pretty +Enable color and formatting in TypeScript's output to make compiler errors easier to read. +type: boolean +default: true + +--traceResolution +Log paths used during the 'moduleResolution' process. +type: boolean +default: false + +--diagnostics +Output compiler performance information after building. +type: boolean +default: false + +--extendedDiagnostics +Output more detailed compiler performance information after building. +type: boolean +default: false + +--generateCpuProfile +Emit a v8 CPU profile of the compiler run for debugging. +type: string +default: profile.cpuprofile + +--generateTrace +Generates an event trace and a list of types. + +--incremental, -i +Save .tsbuildinfo files to allow for incremental compilation of projects. +type: boolean +default: `false`, unless `composite` is set + +--declaration, -d +Generate .d.ts files from TypeScript and JavaScript files in your project. +type: boolean +default: `false`, unless `composite` is set + +--declarationMap +Create sourcemaps for d.ts files. +type: boolean +default: false + +--emitDeclarationOnly +Only output d.ts files and not JavaScript files. +type: boolean +default: false + +--sourceMap +Create source map files for emitted JavaScript files. +type: boolean +default: false + +--inlineSourceMap +Include sourcemap files inside the emitted JavaScript. +type: boolean +default: false + +--noCheck +Disable full type checking (only critical parse and emit errors will be reported). +type: boolean +default: false + +--noEmit +Disable emitting files from a compilation. +type: boolean +default: false + +--assumeChangesOnlyAffectDirectDependencies +Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it. +type: boolean +default: false + +--locale +Set the language of the messaging from TypeScript. This does not affect emit. + +--quiet, -q +Do not print diagnostics. + +--singleThreaded +Run in single threaded mode. + +--pprofDir +Generate pprof CPU/memory profiles to the given directory. + +--verbose, -v +Enable verbose logging. + +--dry, -d +Show what would be built (or deleted, if specified with '--clean') + +--force, -f +Build all projects, including those that appear to be up to date. + +--clean +Delete the outputs of all projects. + +--stopBuildOnErrors +Skip building downstream projects on error in upstream project. + + From 9dc47621c17f5e5fd463da63ded051756bb6589f Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 23 Jul 2025 16:14:46 -0700 Subject: [PATCH 4/5] Build order --- internal/collections/syncset.go | 5 + internal/execute/buildordergenerator.go | 183 +++++++++++++++++++ internal/execute/buildordergenerator_test.go | 134 ++++++++++++++ 3 files changed, 322 insertions(+) create mode 100644 internal/execute/buildordergenerator.go create mode 100644 internal/execute/buildordergenerator_test.go diff --git a/internal/collections/syncset.go b/internal/collections/syncset.go index 1b9be611c0..f2de03cd68 100644 --- a/internal/collections/syncset.go +++ b/internal/collections/syncset.go @@ -11,6 +11,11 @@ func (s *SyncSet[T]) Has(key T) bool { return ok } +func (s *SyncSet[T]) AddIfAbsent(key T) bool { + _, loaded := s.m.LoadOrStore(key, struct{}{}) + return !loaded +} + func (s *SyncSet[T]) Add(key T) { s.m.Store(key, struct{}{}) } diff --git a/internal/execute/buildordergenerator.go b/internal/execute/buildordergenerator.go new file mode 100644 index 0000000000..4893340b3b --- /dev/null +++ b/internal/execute/buildordergenerator.go @@ -0,0 +1,183 @@ +package execute + +import ( + "strings" + + "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/tsoptions" + "github.com/microsoft/typescript-go/internal/tspath" +) + +type upToDateStatusType uint16 + +const ( + // building current project + upToDateStatusTypeUnknown upToDateStatusType = iota + // config file was not found + upToDateStatusTypeConfigFileNotFound + // upToDateStatusTypeUnbuildable + // upToDateStatusTypeUpToDate + // // The project appears out of date because its upstream inputs are newer than its outputs, + // // but all of its outputs are actually newer than the previous identical outputs of its (.d.ts) inputs. + // // This means we can Pseudo-build (just touch timestamps), as if we had actually built this project. + // upToDateStatusTypeUpToDateWithUpstreamTypes + // upToDateStatusTypeOutputMissing + // upToDateStatusTypeErrorReadingFile + // upToDateStatusTypeOutOfDateWithSelf + // upToDateStatusTypeOutOfDateWithUpstream + // upToDateStatusTypeOutOfDateBuildInfoWithPendingEmit + // upToDateStatusTypeOutOfDateBuildInfoWithErrors + // upToDateStatusTypeOutOfDateOptions + // upToDateStatusTypeOutOfDateRoots + // upToDateStatusTypeUpstreamOutOfDate + // upToDateStatusTypeUpstreamBlocked + // upToDateStatusTypeTsVersionOutputOfDate + // upToDateStatusTypeUpToDateWithInputFileText + // // solution file + upToDateStatusTypeSolution + // upToDateStatusTypeForceBuild +) + +type upToDateStatus struct { + kind upToDateStatusType +} + +type statusTask struct { + config string + referencedBy string + status chan *upToDateStatus +} + +type buildTask struct { + config string + resolved *tsoptions.ParsedCommandLine + upStream []*statusTask + downStream []*statusTask +} + +type buildOrderGenerator struct { + host compiler.CompilerHost + tasks collections.SyncMap[tspath.Path, *buildTask] + order []string + errors []*ast.Diagnostic +} + +func (b *buildOrderGenerator) Order() []string { + return b.order +} + +func (b *buildOrderGenerator) Upstream(configName string) []string { + path := b.toPath(configName) + task, ok := b.tasks.Load(path) + if !ok { + panic("No build task found for " + configName) + } + return core.MapFiltered(task.upStream, func(t *statusTask) (string, bool) { + return t.config, t.status != nil + }) +} + +func (b *buildOrderGenerator) Downstream(configName string) []string { + path := b.toPath(configName) + task, ok := b.tasks.Load(path) + if !ok { + panic("No build task found for " + configName) + } + return core.Map(task.downStream, func(t *statusTask) string { + return t.referencedBy + }) +} + +func NewBuildOrderGenerator(command *tsoptions.ParsedBuildCommandLine, host compiler.CompilerHost, isSingleThreaded bool) *buildOrderGenerator { + b := &buildOrderGenerator{host: host} + + projects := command.ResolvedProjectPaths() + // Parse all config files in parallel + wg := core.NewWorkGroup(isSingleThreaded) + b.createBuildTasks(projects, wg) + wg.RunAndWait() + + // Generate the order + b.generateOrder(projects) + + return b +} + +func (b *buildOrderGenerator) toPath(configName string) tspath.Path { + return tspath.ToPath(configName, b.host.GetCurrentDirectory(), b.host.FS().UseCaseSensitiveFileNames()) +} + +func (b *buildOrderGenerator) createBuildTasks(projects []string, wg core.WorkGroup) { + for _, project := range projects { + b.createBuildTask(project, wg) + } +} + +func (b *buildOrderGenerator) createBuildTask(configName string, wg core.WorkGroup) { + wg.Queue(func() { + path := b.toPath(configName) + task := &buildTask{config: configName} + if _, loaded := b.tasks.LoadOrStore(path, task); loaded { + return + } + task.resolved = b.host.GetResolvedProjectReference(configName, path) + if task.resolved != nil { + b.createBuildTasks(task.resolved.ResolvedProjectReferencePaths(), wg) + } + }) +} + +func (b *buildOrderGenerator) generateOrder(projects []string) { + completed := collections.Set[tspath.Path]{} + analyzing := collections.Set[tspath.Path]{} + circularityStack := []string{} + for _, project := range projects { + b.analyzeConfig(project, nil, false, &completed, &analyzing, circularityStack) + } +} + +func (b *buildOrderGenerator) analyzeConfig( + configName string, + downStream *statusTask, + inCircularContext bool, + completed *collections.Set[tspath.Path], + analyzing *collections.Set[tspath.Path], + circularityStack []string, +) { + path := b.toPath(configName) + task, ok := b.tasks.Load(path) + if !ok { + panic("No build task found for " + configName) + } + if !completed.Has(path) { + if analyzing.Has(path) { + if !inCircularContext { + b.errors = append(b.errors, ast.NewCompilerDiagnostic( + diagnostics.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0, + strings.Join(circularityStack, "\n"), + )) + } + return + } + analyzing.Add(path) + circularityStack = append(circularityStack, configName) + if task.resolved != nil { + for index, subReference := range task.resolved.ResolvedProjectReferencePaths() { + statusTask := statusTask{config: subReference, referencedBy: configName} + task.upStream = append(task.upStream, &statusTask) + b.analyzeConfig(subReference, &statusTask, inCircularContext || task.resolved.ProjectReferences()[index].Circular, completed, analyzing, circularityStack) + } + } + circularityStack = circularityStack[:len(circularityStack)-1] + completed.Add(path) + b.order = append(b.order, configName) + } + if downStream != nil { + task.downStream = append(task.downStream, downStream) + downStream.status = make(chan *upToDateStatus, 1) + } +} diff --git a/internal/execute/buildordergenerator_test.go b/internal/execute/buildordergenerator_test.go new file mode 100644 index 0000000000..e0d7e7bda0 --- /dev/null +++ b/internal/execute/buildordergenerator_test.go @@ -0,0 +1,134 @@ +package execute_test + +import ( + "fmt" + "slices" + "strings" + "testing" + + "github.com/microsoft/typescript-go/internal/compiler" + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/execute" + "github.com/microsoft/typescript-go/internal/tsoptions" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" + "gotest.tools/v3/assert" +) + +func TestBuildOrderGenerator(t *testing.T) { + t.Parallel() + testCases := []*buildOrderTestCase{ + {"specify two roots", []string{"A", "G"}, []string{"D", "E", "C", "B", "A", "G"}, false}, + {"multiple parts of the same graph in various orders", []string{"A"}, []string{"D", "E", "C", "B", "A"}, false}, + {"multiple parts of the same graph in various orders", []string{"A", "C", "D"}, []string{"D", "E", "C", "B", "A"}, false}, + {"multiple parts of the same graph in various orders", []string{"D", "C", "A"}, []string{"D", "E", "C", "B", "A"}, false}, + {"other orderings", []string{"F"}, []string{"E", "F"}, false}, + {"other orderings", []string{"E"}, []string{"E"}, false}, + {"other orderings", []string{"F", "C", "A"}, []string{"E", "F", "D", "C", "B", "A"}, false}, + {"returns circular order", []string{"H"}, []string{"E", "J", "I", "H"}, true}, + {"returns circular order", []string{"A", "H"}, []string{"D", "E", "C", "B", "A", "J", "I", "H"}, true}, + } + for _, testcase := range testCases { + testcase.run(t) + } +} + +type buildOrderTestCase struct { + name string + projects []string + expected []string + circular bool +} + +func (b *buildOrderTestCase) configName(project string) string { + return fmt.Sprintf("/home/src/workspaces/project/%s/tsconfig.json", project) +} + +func (b *buildOrderTestCase) projectName(config string) string { + str := strings.TrimPrefix(config, "/home/src/workspaces/project/") + str = strings.TrimSuffix(str, "/tsconfig.json") + return str +} + +func (b *buildOrderTestCase) run(t *testing.T) { + t.Helper() + t.Run(b.name+" - "+strings.Join(b.projects, ","), func(t *testing.T) { + t.Parallel() + files := make(map[string]string) + deps := map[string][]string{ + "A": {"B", "C"}, + "B": {"C", "D"}, + "C": {"D", "E"}, + "F": {"E"}, + "H": {"I"}, + "I": {"J"}, + "J": {"H", "E"}, + } + reverseDeps := map[string][]string{} + for project, deps := range deps { + for _, dep := range deps { + reverseDeps[dep] = append(reverseDeps[dep], project) + } + } + 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 := "" + if deps, ok := deps[project]; ok { + referencesStr = fmt.Sprintf(`, "references": [%s]`, strings.Join(core.Map(deps, func(dep string) string { + return fmt.Sprintf(`{ "path": "../%s" }`, dep) + }), ",")) + } + files[b.configName(project)] = fmt.Sprintf(`{ + "compilerOptions": { "composite": true }, + "files": ["./%s.ts"], + %s + }`, project, referencesStr) + } + + host := compiler.NewCompilerHost("/home/src/workspaces/project", vfstest.FromMap(files, true), "", nil) + args := append([]string{"--build", "--dry"}, b.projects...) + buildCommand := tsoptions.ParseBuildCommandLine(args, host) + buildOrderGenerator := execute.NewBuildOrderGenerator(buildCommand, host, false) + buildOrder := core.Map(buildOrderGenerator.Order(), b.projectName) + assert.DeepEqual(t, buildOrder, b.expected) + + for index, project := range buildOrder { + upstream := core.Map(buildOrderGenerator.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(buildOrderGenerator.Downstream(b.configName(project)), b.projectName) + expectedDownstream := reverseDeps[project] + 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)) + } + } + } + + if !b.circular { + for project, projectDeps := range deps { + child := b.configName(project) + childIndex := slices.Index(buildOrder, child) + if childIndex == -1 { + continue + } + for _, dep := range projectDeps { + parent := b.configName(dep) + parentIndex := slices.Index(buildOrder, parent) + + assert.Assert(t, childIndex > parentIndex, fmt.Sprintf("Expecting child %s to be built after parent %s", project, dep)) + } + } + } + }) +} From f7c042c7d81ad5e5ba9b7c1d67225f485752ee09 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 4 Aug 2025 16:39:21 -0700 Subject: [PATCH 5/5] tsc -b --- cmd/tsgo/main.go | 2 +- cmd/tsgo/sys.go | 5 - internal/api/server.go | 6 + internal/bundled/embed.go | 7 + internal/compiler/emitter.go | 7 +- internal/compiler/fileloader.go | 5 - internal/compiler/program.go | 5 +- .../compiler/projectreferencedtsfakinghost.go | 6 + internal/diagnostics/diagnostics_generated.go | 8 +- .../diagnostics/extraDiagnosticMessages.json | 16 + internal/diagnosticwriter/diagnosticwriter.go | 74 +- internal/execute/buildordergenerator.go | 241 +- internal/execute/outputs.go | 139 +- internal/execute/solutionBuilderHost.go | 201 ++ internal/execute/solutionbuilder.go | 667 ++++++ internal/execute/system.go | 5 +- internal/execute/testsys_test.go | 140 +- internal/execute/tsc.go | 242 +- internal/execute/tscbuild_test.go | 1166 +++++++++- internal/execute/tsctestrunner_test.go | 26 +- internal/execute/watcher.go | 32 +- internal/incremental/buildInfo.go | 201 +- internal/incremental/emitfileshandler.go | 41 +- internal/incremental/program.go | 15 +- internal/incremental/snapshot.go | 16 +- internal/incremental/snapshottobuildinfo.go | 66 +- internal/outputpaths/outputpaths.go | 19 +- internal/testutil/incrementaltestutil/fs.go | 6 +- .../incrementaltestutil/readablebuildinfo.go | 67 +- internal/tsoptions/parsedcommandline.go | 50 +- internal/tsoptions/tsconfigparsing.go | 3 +- internal/vfs/cachedvfs/cachedvfs.go | 8 +- internal/vfs/iovfs/iofs.go | 17 + internal/vfs/osvfs/os.go | 5 + internal/vfs/vfs.go | 4 + internal/vfs/vfsmock/mock_generated.go | 57 + internal/vfs/vfsmock/wrapper.go | 1 + internal/vfs/vfstest/vfstest.go | 69 +- internal/vfs/vfstest/vfstest_test.go | 13 +- .../file-name-and-output-name-clashing.js | 16 + .../tsbuild/clean/tsx-with-dts-emit.js | 99 + .../different-options-with-incremental.js | 1609 +++++++++++++ .../tsbuild/commandLine/different-options.js | 1316 +++++++++++ ...ndline-with-declaration-and-incremental.js | 1083 +++++++++ ...y-false-on-commandline-with-declaration.js | 572 +++++ ...mitDeclarationOnly-false-on-commandline.js | 958 ++++++++ ...ndline-with-declaration-and-incremental.js | 2063 +++++++++++++++++ ...ionOnly-on-commandline-with-declaration.js | 818 +++++++ .../emitDeclarationOnly-on-commandline.js | 1880 +++++++++++++++ .../reference/tsbuild/commandLine/help.js | 1 - .../when-build-not-first-argument.js | 1 + .../configFileErrors/missing-config-file.js | 12 + .../reports-syntax-errors-in-config-file.js | 398 ++++ .../when-tsconfig-extends-the-missing-file.js | 70 + .../configFileExtends/configDir-template.js | 118 + .../resolves-the-symlink-path.js | 113 + ...nce-and-both-extend-config-with-include.js | 255 ++ ...th-projects-extends-config-with-include.js | 256 ++ ...-dts-generation-errors-with-incremental.js | 215 ++ .../reports-dts-generation-errors.js | 154 ++ ...ugh-triple-slash-but-uses-no-references.js | 257 ++ ...file-is-referenced-through-triple-slash.js | 427 ++++ ...d-inferred-type-from-referenced-project.js | 229 ++ ...s-not-in-rootDir-at-the-import-location.js | 685 ++++++ ...ts-the-error-about-it-by-stopping-build.js | 133 ++ ...ng-setup-correctly-and-reports-no-error.js | 560 +++++ ...-emitDeclarationOnly-and-declarationMap.js | 431 ++++ ...import-project-with-emitDeclarationOnly.js | 418 ++++ ...mports-project-with-emitDeclarationOnly.js | 495 ++++ ...es-is-empty-and-references-are-provided.js | 123 + ...is-empty-and-no-references-are-provided.js | 27 + ...ter-initial-build-doesnt-build-anything.js | 314 +++ .../when-solution-is-referenced-indirectly.js | 364 +++ ...does-not-add-color-when-NO_COLOR-is-set.js | 1 - .../reference/tsc/commandLine/help-all.js | 1 - ...when-host-cannot-provide-terminal-width.js | 1 - ...tatus.DiagnosticsPresent_OutputsSkipped.js | 1 - .../extends/configDir-template-showConfig.js | 26 +- ...ion-field-with-declaration-emit-enabled.js | 54 +- ...e-to-modifier-of-class-expression-field.js | 54 +- ...in-another-file-through-indirect-import.js | 45 +- ...s-global-through-export-in-another-file.js | 43 +- .../const-enums-aliased-in-different-file.js | 60 +- .../tsc/incremental/const-enums-aliased.js | 60 +- .../reference/tsc/incremental/const-enums.js | 60 +- .../generates-typerefs-correctly.js | 38 +- .../option-changes-with-composite.js | 195 +- .../option-changes-with-incremental.js | 212 +- ...types-found-doesnt-crash-under---strict.js | 13 +- ...ith-no-backing-types-found-doesnt-crash.js | 13 +- .../serializing-composite-project.js | 17 +- .../incremental/serializing-error-chain.js | 14 +- .../tsc/incremental/tsbuildinfo-has-error.js | 18 +- .../tsc/incremental/when-file-is-deleted.js | 30 +- ...le-is-added,-the-signatures-are-updated.js | 114 +- ...g-filename-for-buildinfo-on-commandline.js | 14 +- .../when-passing-rootDir-from-commandline.js | 14 +- ...when-passing-rootDir-is-in-the-tsconfig.js | 14 +- .../tsc/incremental/with-only-dts-files.js | 35 +- .../noEmit/when-project-has-strict-true.js | 13 +- ...nterop-uses-referenced-project-settings.js | 1 + ...erveConstEnums-and-verbatimModuleSyntax.js | 1 + ...ativeImportExtensionsProjectReferences1.js | 1 + ...ativeImportExtensionsProjectReferences2.js | 14 +- ...ativeImportExtensionsProjectReferences3.js | 14 +- .../parse-tsconfig-with-typeAcquisition.js | 1 + ...h-interval-option-without-tsconfig.json.js | 1 - .../Parse-watch-interval-option.js | 3 + .../watch-with-no-tsconfig.js | 2 + .../watch-with-tsconfig-and-incremental.js | 3 + .../noEmit/dts-errors-without-dts-enabled.js | 21 + .../reference/tscWatch/noEmit/dts-errors.js | 21 + .../tscWatch/noEmit/semantic-errors.js | 21 + .../tscWatch/noEmit/syntax-errors.js | 21 + 114 files changed, 20817 insertions(+), 596 deletions(-) create mode 100644 internal/execute/solutionBuilderHost.go create mode 100644 internal/execute/solutionbuilder.go create mode 100644 testdata/baselines/reference/tsbuild/clean/file-name-and-output-name-clashing.js create mode 100644 testdata/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js create mode 100644 testdata/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js create mode 100644 testdata/baselines/reference/tsbuild/commandLine/different-options.js create mode 100644 testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js create mode 100644 testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration.js create mode 100644 testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline.js create mode 100644 testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js create mode 100644 testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration.js create mode 100644 testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline.js create mode 100644 testdata/baselines/reference/tsbuild/configFileErrors/missing-config-file.js create mode 100644 testdata/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file.js create mode 100644 testdata/baselines/reference/tsbuild/configFileErrors/when-tsconfig-extends-the-missing-file.js create mode 100644 testdata/baselines/reference/tsbuild/configFileExtends/configDir-template.js create mode 100644 testdata/baselines/reference/tsbuild/configFileExtends/resolves-the-symlink-path.js create mode 100644 testdata/baselines/reference/tsbuild/configFileExtends/when-building-project-uses-reference-and-both-extend-config-with-include.js create mode 100644 testdata/baselines/reference/tsbuild/configFileExtends/when-building-solution-with-projects-extends-config-with-include.js create mode 100644 testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors-with-incremental.js create mode 100644 testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors.js create mode 100644 testdata/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash-but-uses-no-references.js create mode 100644 testdata/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash.js create mode 100644 testdata/baselines/reference/tsbuild/declarationEmit/when-declaration-file-used-inferred-type-from-referenced-project.js create mode 100644 testdata/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js create mode 100644 testdata/baselines/reference/tsbuild/demo/in-circular-branch-reports-the-error-about-it-by-stopping-build.js create mode 100644 testdata/baselines/reference/tsbuild/demo/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js create mode 100644 testdata/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js create mode 100644 testdata/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js create mode 100644 testdata/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js create mode 100644 testdata/baselines/reference/tsbuild/solution/does-not-have-empty-files-diagnostic-when-files-is-empty-and-references-are-provided.js create mode 100644 testdata/baselines/reference/tsbuild/solution/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js create mode 100644 testdata/baselines/reference/tsbuild/solution/verify-that-subsequent-builds-after-initial-build-doesnt-build-anything.js create mode 100644 testdata/baselines/reference/tsbuild/solution/when-solution-is-referenced-indirectly.js diff --git a/cmd/tsgo/main.go b/cmd/tsgo/main.go index fbc694c2df..5eabc96df9 100644 --- a/cmd/tsgo/main.go +++ b/cmd/tsgo/main.go @@ -20,6 +20,6 @@ func runMain() int { return runAPI(args[1:]) } } - result := execute.CommandLine(newSystem(), args, false) + result := execute.CommandLine(newSystem(), args, nil) return int(result.Status) } diff --git a/cmd/tsgo/sys.go b/cmd/tsgo/sys.go index cfdafdd209..a58ee59fe3 100644 --- a/cmd/tsgo/sys.go +++ b/cmd/tsgo/sys.go @@ -45,11 +45,6 @@ func (s *osSys) Writer() io.Writer { return s.writer } -func (s *osSys) EndWrite() { - // do nothing, this is needed in the interface for testing - // todo: revisit if improving tsc/build/watch unittest baselines -} - func newSystem() *osSys { cwd, err := os.Getwd() if err != nil { diff --git a/internal/api/server.go b/internal/api/server.go index 5f88ad20d3..280de4d21c 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -8,6 +8,7 @@ import ( "io" "strconv" "sync" + "time" "github.com/go-json-experiment/json" "github.com/microsoft/typescript-go/internal/bundled" @@ -472,3 +473,8 @@ func (s *Server) Stat(path string) vfs.FileInfo { func (s *Server) Remove(path string) error { panic("unimplemented") } + +// Chtimes implements vfs.FS. +func (s *Server) Chtimes(path string, aTime time.Time, mTime time.Time) error { + panic("unimplemented") +} diff --git a/internal/bundled/embed.go b/internal/bundled/embed.go index 82ba6f9634..36c00137b2 100644 --- a/internal/bundled/embed.go +++ b/internal/bundled/embed.go @@ -161,6 +161,13 @@ func (vfs *wrappedFS) Remove(path string) error { return vfs.fs.Remove(path) } +func (vfs *wrappedFS) Chtimes(path string, aTime time.Time, mTime time.Time) error { + if _, ok := splitPath(path); ok { + panic("cannot change times on embedded file system") + } + return vfs.fs.Chtimes(path, aTime, mTime) +} + type fileInfo struct { mode fs.FileMode name string diff --git a/internal/compiler/emitter.go b/internal/compiler/emitter.go index ab0cbf0f65..a9913de7a5 100644 --- a/internal/compiler/emitter.go +++ b/internal/compiler/emitter.go @@ -42,9 +42,6 @@ type emitter struct { } func (e *emitter) emit() { - if e.host.Options().ListEmittedFiles.IsTrue() { - e.emitResult.EmittedFiles = []string{} - } // !!! tracing e.emitJSFile(e.sourceFile, e.paths.JsFilePath(), e.paths.SourceMapFilePath()) e.emitDeclarationFile(e.sourceFile, e.paths.DeclarationFilePath(), e.paths.DeclarationMapPath()) @@ -254,7 +251,7 @@ func (e *emitter) printSourceFile(jsFilePath string, sourceMapFilePath string, s err := e.host.WriteFile(sourceMapFilePath, sourceMap, false /*writeByteOrderMark*/) if err != nil { e.emitterDiagnostics.Add(ast.NewCompilerDiagnostic(diagnostics.Could_not_write_file_0_Colon_1, jsFilePath, err.Error())) - } else if e.emitResult.EmittedFiles != nil { + } else { e.emitResult.EmittedFiles = append(e.emitResult.EmittedFiles, sourceMapFilePath) } } @@ -278,7 +275,7 @@ func (e *emitter) printSourceFile(jsFilePath string, sourceMapFilePath string, s } if err != nil { e.emitterDiagnostics.Add(ast.NewCompilerDiagnostic(diagnostics.Could_not_write_file_0_Colon_1, jsFilePath, err.Error())) - } else if e.emitResult.EmittedFiles != nil && !skippedDtsWrite { + } else if !skippedDtsWrite { e.emitResult.EmittedFiles = append(e.emitResult.EmittedFiles, jsFilePath) } diff --git a/internal/compiler/fileloader.go b/internal/compiler/fileloader.go index cc1d113759..f911eb7aea 100644 --- a/internal/compiler/fileloader.go +++ b/internal/compiler/fileloader.go @@ -567,11 +567,6 @@ func getInferredLibraryNameResolveFrom(options *core.CompilerOptions, currentDir return tspath.CombinePaths(containingDirectory, "__lib_node_modules_lookup_"+libFileName+"__.ts") } -type resolution struct { - node *ast.Node - resolvedModule *module.ResolvedModule -} - func getModeForTypeReferenceDirectiveInFile(ref *ast.FileReference, file *ast.SourceFile, meta ast.SourceFileMetaData, options *core.CompilerOptions) core.ResolutionMode { if ref.ResolutionMode != core.ResolutionModeNone { return ref.ResolutionMode diff --git a/internal/compiler/program.go b/internal/compiler/program.go index 1e159fd49c..0923006ba2 100644 --- a/internal/compiler/program.go +++ b/internal/compiler/program.go @@ -257,6 +257,7 @@ func equalCheckJSDirectives(d1 *ast.CheckJsDirective, d2 *ast.CheckJsDirective) func (p *Program) SourceFiles() []*ast.SourceFile { return p.files } func (p *Program) Options() *core.CompilerOptions { return p.opts.Config.CompilerOptions() } +func (p *Program) GetRootFileNames() []string { return p.opts.Config.FileNames() } func (p *Program) Host() CompilerHost { return p.opts.Host } func (p *Program) GetConfigFileParsingDiagnostics() []*ast.Diagnostic { return slices.Clip(p.opts.Config.GetConfigFileParsingDiagnostics()) @@ -1353,9 +1354,7 @@ func CombineEmitResults(results []*EmitResult) *EmitResult { result.EmitSkipped = true } result.Diagnostics = append(result.Diagnostics, emitResult.Diagnostics...) - if emitResult.EmittedFiles != nil { - result.EmittedFiles = append(result.EmittedFiles, emitResult.EmittedFiles...) - } + result.EmittedFiles = append(result.EmittedFiles, emitResult.EmittedFiles...) if emitResult.SourceMaps != nil { result.SourceMaps = append(result.SourceMaps, emitResult.SourceMaps...) } diff --git a/internal/compiler/projectreferencedtsfakinghost.go b/internal/compiler/projectreferencedtsfakinghost.go index 9c03e8414f..d7bf20862f 100644 --- a/internal/compiler/projectreferencedtsfakinghost.go +++ b/internal/compiler/projectreferencedtsfakinghost.go @@ -2,6 +2,7 @@ package compiler import ( "strings" + "time" "github.com/microsoft/typescript-go/internal/collections" "github.com/microsoft/typescript-go/internal/core" @@ -87,6 +88,11 @@ func (fs *projectReferenceDtsFakingVfs) Remove(path string) error { panic("should not be called by resolver") } +// Chtimes implements vfs.FS. +func (fs *projectReferenceDtsFakingVfs) Chtimes(path string, aTime time.Time, mTime time.Time) error { + panic("should not be called by resolver") +} + // DirectoryExists implements vfs.FS. func (fs *projectReferenceDtsFakingVfs) DirectoryExists(path string) bool { if fs.projectReferenceFileMapper.opts.Host.FS().DirectoryExists(path) { diff --git a/internal/diagnostics/diagnostics_generated.go b/internal/diagnostics/diagnostics_generated.go index d5f1d5b8e1..56fa836f40 100644 --- a/internal/diagnostics/diagnostics_generated.go +++ b/internal/diagnostics/diagnostics_generated.go @@ -2276,7 +2276,7 @@ var Unknown_build_option_0 = &Message{code: 5072, category: CategoryError, key: var Build_option_0_requires_a_value_of_type_1 = &Message{code: 5073, category: CategoryError, key: "Build_option_0_requires_a_value_of_type_1_5073", text: "Build option '{0}' requires a value of type {1}."} -var Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified = &Message{code: 5074, category: CategoryError, key: "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", text: "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."} +var Failed_to_update_timestamp_of_file_0 = &Message{code: 5074, category: CategoryMessage, key: "Failed_to_update_timestamp_of_file_0_5074", text: "Failed to update timestamp of file '{0}'."} var X_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2 = &Message{code: 5075, category: CategoryError, key: "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", text: "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."} @@ -2858,7 +2858,7 @@ var Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2 = &Mes var Project_0_is_out_of_date_because_output_file_1_does_not_exist = &Message{code: 6352, category: CategoryMessage, key: "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", text: "Project '{0}' is out of date because output file '{1}' does not exist"} -var Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date = &Message{code: 6353, category: CategoryMessage, key: "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", text: "Project '{0}' is out of date because its dependency '{1}' is out of date"} +var Failed_to_delete_file_0 = &Message{code: 6353, category: CategoryMessage, key: "Failed_to_delete_file_0_6353", text: "Failed to delete file '{0}'."} var Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies = &Message{code: 6354, category: CategoryMessage, key: "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", text: "Project '{0}' is up to date with .d.ts files from its dependencies"} @@ -2938,7 +2938,7 @@ var Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the var Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files = &Message{code: 6400, category: CategoryMessage, key: "Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400", text: "Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"} -var Project_0_is_out_of_date_because_there_was_error_reading_file_1 = &Message{code: 6401, category: CategoryMessage, key: "Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401", text: "Project '{0}' is out of date because there was error reading file '{1}'"} +var Project_0_is_out_of_date_because_config_file_does_not_exist = &Message{code: 6401, category: CategoryMessage, key: "Project_0_is_out_of_date_because_config_file_does_not_exist_6401", text: "Project '{0}' is out of date because config file does not exist."} var Resolving_in_0_mode_with_conditions_1 = &Message{code: 6402, category: CategoryMessage, key: "Resolving_in_0_mode_with_conditions_1_6402", text: "Resolving in {0} mode with conditions {1}."} @@ -2976,7 +2976,7 @@ var Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colo var Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors = &Message{code: 6419, category: CategoryMessage, key: "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors_6419", text: "Project '{0}' is out of date because buildinfo file '{1}' indicates that program needs to report errors."} -var Project_0_is_out_of_date_because_1 = &Message{code: 6420, category: CategoryMessage, key: "Project_0_is_out_of_date_because_1_6420", text: "Project '{0}' is out of date because {1}."} +var Project_0_is_out_of_date_because_input_1_does_not_exist = &Message{code: 6420, category: CategoryMessage, key: "Project_0_is_out_of_date_because_input_1_does_not_exist_6420", text: "Project '{0}' is out of date because input '{1}' does not exist."} 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."} diff --git a/internal/diagnostics/extraDiagnosticMessages.json b/internal/diagnostics/extraDiagnosticMessages.json index 4e64552426..8b91e65d9f 100644 --- a/internal/diagnostics/extraDiagnosticMessages.json +++ b/internal/diagnostics/extraDiagnosticMessages.json @@ -22,5 +22,21 @@ "A JSDoc '@type' tag may not occur with a '@param' or '@returns' tag.": { "category": "Error", "code": 8040 + }, + "Failed to delete file '{0}'.": { + "category": "Message", + "code": 6353 + }, + "Project '{0}' is out of date because config file does not exist.": { + "category": "Message", + "code": 6401 + }, + "Project '{0}' is out of date because input '{1}' does not exist.": { + "category": "Message", + "code": 6420 + }, + "Failed to update timestamp of file '{0}'.": { + "category": "Message", + "code": 5074 } } diff --git a/internal/diagnosticwriter/diagnosticwriter.go b/internal/diagnosticwriter/diagnosticwriter.go index 797e447a44..a42c5d4b64 100644 --- a/internal/diagnosticwriter/diagnosticwriter.go +++ b/internal/diagnosticwriter/diagnosticwriter.go @@ -21,7 +21,7 @@ type FormattingOptions struct { } const ( - foregroundColorEscapeGrey = "\u001b[90m" + ForegroundColorEscapeGrey = "\u001b[90m" foregroundColorEscapeRed = "\u001b[91m" foregroundColorEscapeYellow = "\u001b[93m" foregroundColorEscapeBlue = "\u001b[94m" @@ -39,43 +39,45 @@ func FormatDiagnosticsWithColorAndContext(output io.Writer, diags []*ast.Diagnos if len(diags) == 0 { return } - for i, diagnostic := range diags { if i > 0 { fmt.Fprint(output, formatOpts.NewLine) } + FormatDiagnosticWithColorAndContext(output, diagnostic, formatOpts) + } +} - if diagnostic.File() != nil { - file := diagnostic.File() - pos := diagnostic.Loc().Pos() - WriteLocation(output, file, pos, formatOpts, writeWithStyleAndReset) - fmt.Fprint(output, " - ") - } +func FormatDiagnosticWithColorAndContext(output io.Writer, diagnostic *ast.Diagnostic, formatOpts *FormattingOptions) { + if diagnostic.File() != nil { + file := diagnostic.File() + pos := diagnostic.Loc().Pos() + WriteLocation(output, file, pos, formatOpts, writeWithStyleAndReset) + fmt.Fprint(output, " - ") + } - writeWithStyleAndReset(output, diagnostic.Category().Name(), getCategoryFormat(diagnostic.Category())) - fmt.Fprintf(output, "%s TS%d: %s", foregroundColorEscapeGrey, diagnostic.Code(), resetEscapeSequence) - WriteFlattenedDiagnosticMessage(output, diagnostic, formatOpts.NewLine) + writeWithStyleAndReset(output, diagnostic.Category().Name(), getCategoryFormat(diagnostic.Category())) + fmt.Fprintf(output, "%s TS%d: %s", ForegroundColorEscapeGrey, diagnostic.Code(), resetEscapeSequence) + WriteFlattenedDiagnosticMessage(output, diagnostic, formatOpts.NewLine) - if diagnostic.File() != nil && diagnostic.Code() != diagnostics.File_appears_to_be_binary.Code() { - fmt.Fprint(output, formatOpts.NewLine) - writeCodeSnippet(output, diagnostic.File(), diagnostic.Pos(), diagnostic.Len(), getCategoryFormat(diagnostic.Category()), "", formatOpts) - fmt.Fprint(output, formatOpts.NewLine) - } + if diagnostic.File() != nil && diagnostic.Code() != diagnostics.File_appears_to_be_binary.Code() { + fmt.Fprint(output, formatOpts.NewLine) + writeCodeSnippet(output, diagnostic.File(), diagnostic.Pos(), diagnostic.Len(), getCategoryFormat(diagnostic.Category()), "", formatOpts) + fmt.Fprint(output, formatOpts.NewLine) + } - if (diagnostic.RelatedInformation() != nil) && (len(diagnostic.RelatedInformation()) > 0) { - for _, relatedInformation := range diagnostic.RelatedInformation() { - file := relatedInformation.File() - if file != nil { - fmt.Fprint(output, formatOpts.NewLine) - fmt.Fprint(output, " ") - pos := relatedInformation.Pos() - WriteLocation(output, file, pos, formatOpts, writeWithStyleAndReset) - fmt.Fprint(output, " - ") - WriteFlattenedDiagnosticMessage(output, relatedInformation, formatOpts.NewLine) - writeCodeSnippet(output, file, pos, relatedInformation.Len(), foregroundColorEscapeCyan, " ", formatOpts) - } + if (diagnostic.RelatedInformation() != nil) && (len(diagnostic.RelatedInformation()) > 0) { + for _, relatedInformation := range diagnostic.RelatedInformation() { + file := relatedInformation.File() + if file != nil { fmt.Fprint(output, formatOpts.NewLine) + fmt.Fprint(output, " ") + pos := relatedInformation.Pos() + WriteLocation(output, file, pos, formatOpts, writeWithStyleAndReset) + fmt.Fprint(output, " - ") + WriteFlattenedDiagnosticMessage(output, relatedInformation, formatOpts.NewLine) + writeCodeSnippet(output, file, pos, relatedInformation.Len(), foregroundColorEscapeCyan, " ", formatOpts) } + fmt.Fprint(output, formatOpts.NewLine) } } } @@ -196,7 +198,7 @@ func getCategoryFormat(category diagnostics.Category) string { case diagnostics.CategoryWarning: return foregroundColorEscapeYellow case diagnostics.CategorySuggestion: - return foregroundColorEscapeGrey + return ForegroundColorEscapeGrey case diagnostics.CategoryMessage: return foregroundColorEscapeBlue } @@ -359,7 +361,7 @@ func prettyPathForFileError(file *ast.SourceFile, fileErrors []*ast.Diagnostic, } return fmt.Sprintf("%s%s:%d%s", fileName, - foregroundColorEscapeGrey, + ForegroundColorEscapeGrey, line+1, resetEscapeSequence, ) @@ -383,3 +385,15 @@ func WriteFormatDiagnostic(output io.Writer, diagnostic *ast.Diagnostic, formatO WriteFlattenedDiagnosticMessage(output, diagnostic, formatOpts.NewLine) fmt.Fprint(output, formatOpts.NewLine) } + +func FormatDiagnosticsStatusWithColorAndTime(output io.Writer, time string, diag *ast.Diagnostic, formatOpts *FormattingOptions) { + fmt.Fprint(output, "[") + writeWithStyleAndReset(output, time, ForegroundColorEscapeGrey) + fmt.Fprint(output, "] ") + WriteFlattenedDiagnosticMessage(output, diag, formatOpts.NewLine) +} + +func FormatDiagnosticsStatusAndTime(output io.Writer, time string, diag *ast.Diagnostic, formatOpts *FormattingOptions) { + fmt.Fprint(output, time, " - ") + WriteFlattenedDiagnosticMessage(output, diag, formatOpts.NewLine) +} diff --git a/internal/execute/buildordergenerator.go b/internal/execute/buildordergenerator.go index 4893340b3b..acc568db9f 100644 --- a/internal/execute/buildordergenerator.go +++ b/internal/execute/buildordergenerator.go @@ -1,13 +1,16 @@ package execute import ( + "fmt" "strings" + "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/incremental" "github.com/microsoft/typescript-go/internal/tsoptions" "github.com/microsoft/typescript-go/internal/tspath" ) @@ -15,35 +18,122 @@ import ( type upToDateStatusType uint16 const ( - // building current project - upToDateStatusTypeUnknown upToDateStatusType = iota + // Errors: + // config file was not found - upToDateStatusTypeConfigFileNotFound - // upToDateStatusTypeUnbuildable - // upToDateStatusTypeUpToDate - // // The project appears out of date because its upstream inputs are newer than its outputs, - // // but all of its outputs are actually newer than the previous identical outputs of its (.d.ts) inputs. - // // This means we can Pseudo-build (just touch timestamps), as if we had actually built this project. - // upToDateStatusTypeUpToDateWithUpstreamTypes - // upToDateStatusTypeOutputMissing - // upToDateStatusTypeErrorReadingFile - // upToDateStatusTypeOutOfDateWithSelf - // upToDateStatusTypeOutOfDateWithUpstream - // upToDateStatusTypeOutOfDateBuildInfoWithPendingEmit - // upToDateStatusTypeOutOfDateBuildInfoWithErrors - // upToDateStatusTypeOutOfDateOptions - // upToDateStatusTypeOutOfDateRoots - // upToDateStatusTypeUpstreamOutOfDate - // upToDateStatusTypeUpstreamBlocked - // upToDateStatusTypeTsVersionOutputOfDate - // upToDateStatusTypeUpToDateWithInputFileText - // // solution file + upToDateStatusTypeConfigFileNotFound upToDateStatusType = iota + // found errors during build + upToDateStatusTypeBuildErrors + // did not build because upstream project has errors - and we have option to stop build on upstream errors + upToDateStatusTypeUpstreamErrors + + // Its all good, no work to do + upToDateStatusTypeUpToDate + + // Pseudo-builds - touch timestamps, no actual build: + + // The project appears out of date because its upstream inputs are newer than its outputs, + // but all of its outputs are actually newer than the previous identical outputs of its (.d.ts) inputs. + // This means we can Pseudo-build (just touch timestamps), as if we had actually built this project. + upToDateStatusTypeUpToDateWithUpstreamTypes + // The project appears up to date and even though input file changed, its text didnt so just need to update timestamps + upToDateStatusTypeUpToDateWithInputFileText + + // Needs build: + + // input file is missing + upToDateStatusTypeInputFileMissing + // output file is missing + upToDateStatusTypeOutputMissing + // input file is newer than output file + 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 + upToDateStatusTypeOutOfDateBuildInfoWithErrors + // build info options indicate there is work to do based on changes in options + upToDateStatusTypeOutOfDateOptions + // file was root when built but not any more + upToDateStatusTypeOutOfDateRoots + // buildInfo.version mismatch with current ts version + upToDateStatusTypeTsVersionOutputOfDate + // build because --force was specified + upToDateStatusTypeForceBuild + + // solution file upToDateStatusTypeSolution - // upToDateStatusTypeForceBuild ) +type inputOutputName struct { + input string + output string +} + +type fileAndTime struct { + file string + time time.Time +} + +type inputOutputFileAndTime struct { + input fileAndTime + output fileAndTime + buildInfo string +} + +type upstreamErrors struct { + ref string + refHasUpstreamErrors bool +} + type upToDateStatus struct { kind upToDateStatusType + data any +} + +func (s *upToDateStatus) IsError() bool { + switch s.kind { + case upToDateStatusTypeConfigFileNotFound, + upToDateStatusTypeBuildErrors, + upToDateStatusTypeUpstreamErrors: + return true + default: + return false + } +} + +func (s *upToDateStatus) NeedsBuild() bool { + switch s.kind { + case upToDateStatusTypeInputFileMissing, + upToDateStatusTypeOutputMissing, + upToDateStatusTypeInputFileNewer, + upToDateStatusTypeOutOfDateBuildInfoWithPendingEmit, + upToDateStatusTypeOutOfDateBuildInfoWithErrors, + upToDateStatusTypeOutOfDateOptions, + upToDateStatusTypeOutOfDateRoots, + upToDateStatusTypeTsVersionOutputOfDate, + upToDateStatusTypeForceBuild: + return true + default: + return false + } +} + +func (s *upToDateStatus) IsPseudoBuild() bool { + switch s.kind { + case upToDateStatusTypeUpToDateWithUpstreamTypes, + upToDateStatusTypeUpToDateWithInputFileText: + return true + default: + return false + } +} + +func (s *upToDateStatus) InputOutputFileAndTime() *inputOutputFileAndTime { + data, ok := s.data.(*inputOutputFileAndTime) + if !ok { + return nil + } + return data } type statusTask struct { @@ -52,11 +142,99 @@ type statusTask struct { status chan *upToDateStatus } +type solutionBuilderResult struct { + result CommandLineResult + errors []*ast.Diagnostic + statistics statistics + programStats []*statistics + filesToDelete []string +} + +func (b *solutionBuilderResult) report(s *solutionBuilder) { + s.opts.reportErrorSummary(b.errors) + if b.filesToDelete != nil { + s.opts.reportStatus(ast.NewCompilerDiagnostic( + diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, + strings.Join(core.Map(b.filesToDelete, func(f string) string { + return "\r\n * " + f + }), ""), + )) + } + if len(b.programStats) == 0 { + return + } + if !s.opts.command.CompilerOptions.Diagnostics.IsTrue() && !s.opts.command.CompilerOptions.ExtendedDiagnostics.IsTrue() { + return + } + b.statistics.isAggregate = true + b.statistics.compileTimes = &compileTimes{} + for _, stat := range b.programStats { + // Aggregate statistics + b.statistics.files += stat.files + b.statistics.lines += stat.lines + b.statistics.identifiers += stat.identifiers + b.statistics.symbols += stat.symbols + b.statistics.types += stat.types + b.statistics.instantiations += stat.instantiations + b.statistics.memoryUsed += stat.memoryUsed + b.statistics.memoryAllocs += stat.memoryAllocs + b.statistics.compileTimes.configTime += stat.compileTimes.configTime + b.statistics.compileTimes.buildInfoReadTime += stat.compileTimes.buildInfoReadTime + b.statistics.compileTimes.parseTime += stat.compileTimes.parseTime + b.statistics.compileTimes.bindTime += stat.compileTimes.bindTime + b.statistics.compileTimes.checkTime += stat.compileTimes.checkTime + b.statistics.compileTimes.emitTime += stat.compileTimes.emitTime + b.statistics.compileTimes.changesComputeTime += stat.compileTimes.changesComputeTime + } + b.statistics.compileTimes.totalTime = s.opts.sys.SinceStart() + b.statistics.report(s.opts.sys.Writer(), s.opts.testing != nil) +} + +type taskReporter struct { + status []*ast.Diagnostic + errors []*ast.Diagnostic + ioWriter strings.Builder + exitStatus ExitStatus + statistics *statistics + program *incremental.Program + filesToDelete []string +} + +func (b *taskReporter) addError(err *ast.Diagnostic) { + b.errors = append(b.errors, err) +} + +func (b *taskReporter) report(s *solutionBuilder, configPath tspath.Path, buildResult *solutionBuilderResult) { + for _, status := range b.status { + s.opts.reportStatus(status) + } + for _, diagnostic := range b.errors { + s.opts.reportDiagnostic(diagnostic) + } + if len(b.errors) > 0 { + buildResult.errors = append(core.IfElse(buildResult.errors != nil, buildResult.errors, []*ast.Diagnostic{}), b.errors...) + } + fmt.Fprint(s.opts.sys.Writer(), b.ioWriter.String()) + if b.exitStatus > buildResult.result.Status { + buildResult.result.Status = b.exitStatus + } + if b.statistics != nil { + buildResult.programStats = append(buildResult.programStats, b.statistics) + } + if b.program != nil { + buildResult.result.IncrementalProgram = append(buildResult.result.IncrementalProgram, b.program) + buildResult.statistics.projectsBuilt++ + } + buildResult.filesToDelete = append(buildResult.filesToDelete, b.filesToDelete...) +} + type buildTask struct { - config string - resolved *tsoptions.ParsedCommandLine - upStream []*statusTask - downStream []*statusTask + config string + resolved *tsoptions.ParsedCommandLine + upStream []*statusTask + downStream []*statusTask + previousTaskReporter chan *taskReporter + reporter chan *taskReporter } type buildOrderGenerator struct { @@ -174,6 +352,15 @@ func (b *buildOrderGenerator) analyzeConfig( } circularityStack = circularityStack[:len(circularityStack)-1] completed.Add(path) + task.reporter = make(chan *taskReporter, 1) + prev := core.LastOrNil(b.order) + if prev != "" { + if prevTask, ok := b.tasks.Load(b.toPath(prev)); ok { + task.previousTaskReporter = prevTask.reporter + } else { + panic("No previous task found for " + prev) + } + } b.order = append(b.order, configName) } if downStream != nil { diff --git a/internal/execute/outputs.go b/internal/execute/outputs.go index ae4e26faba..1f238b5d66 100644 --- a/internal/execute/outputs.go +++ b/internal/execute/outputs.go @@ -31,21 +31,18 @@ func getFormatOptsOfSys(sys System) *diagnosticwriter.FormattingOptions { type diagnosticReporter = func(*ast.Diagnostic) +func quietDiagnosticReporter(diagnostic *ast.Diagnostic) {} + func createDiagnosticReporter(sys System, options *core.CompilerOptions) diagnosticReporter { if options.Quiet.IsTrue() { - return func(diagnostic *ast.Diagnostic) {} + return quietDiagnosticReporter } formatOpts := getFormatOptsOfSys(sys) - if !shouldBePretty(sys, options) { - return func(diagnostic *ast.Diagnostic) { - diagnosticwriter.WriteFormatDiagnostic(sys.Writer(), diagnostic, formatOpts) - sys.EndWrite() - } - } + writeDiagnostic := core.IfElse(shouldBePretty(sys, options), diagnosticwriter.FormatDiagnosticWithColorAndContext, diagnosticwriter.WriteFormatDiagnostic) return func(diagnostic *ast.Diagnostic) { - diagnosticwriter.FormatDiagnosticsWithColorAndContext(sys.Writer(), []*ast.Diagnostic{diagnostic}, formatOpts) - sys.EndWrite() + writeDiagnostic(sys.Writer(), diagnostic, formatOpts) + fmt.Fprint(sys.Writer(), formatOpts.NewLine) } } @@ -57,55 +54,109 @@ func shouldBePretty(sys System, options *core.CompilerOptions) bool { return false } -func createReportErrorSummary(sys System, options *core.CompilerOptions) func(diagnostics []*ast.Diagnostic) { - if shouldBePretty(sys, options) { +type diagnosticsReporter = func(diagnostics []*ast.Diagnostic) + +func quietDiagnosticsReporter(diagnostics []*ast.Diagnostic) {} + +func createReportErrorSummary(sys System, options *core.CompilerOptions) diagnosticsReporter { + if !options.Quiet.IsTrue() && shouldBePretty(sys, options) { formatOpts := getFormatOptsOfSys(sys) return func(diagnostics []*ast.Diagnostic) { diagnosticwriter.WriteErrorSummaryText(sys.Writer(), diagnostics, formatOpts) - sys.EndWrite() } } - return func(diagnostics []*ast.Diagnostic) {} + return quietDiagnosticsReporter } -func reportStatistics(sys System, program *compiler.Program, result compileAndEmitResult, memStats *runtime.MemStats) { - var stats table - - stats.add("Files", len(program.SourceFiles())) - stats.add("Lines", program.LineCount()) - stats.add("Identifiers", program.IdentifierCount()) - stats.add("Symbols", program.SymbolCount()) - stats.add("Types", program.TypeCount()) - stats.add("Instantiations", program.InstantiationCount()) - stats.add("Memory used", fmt.Sprintf("%vK", memStats.Alloc/1024)) - stats.add("Memory allocs", strconv.FormatUint(memStats.Mallocs, 10)) - if result.configTime != 0 { - stats.add("Config time", result.configTime) - } - if result.buildInfoReadTime != 0 { - stats.add("BuildInfo read time", result.buildInfoReadTime) - } - stats.add("Parse time", result.parseTime) - if result.bindTime != 0 { - stats.add("Bind time", result.bindTime) - } - if result.checkTime != 0 { - stats.add("Check time", result.checkTime) +func createBuilderStatusReporter(sys System, options *core.CompilerOptions) diagnosticReporter { + if options.Quiet.IsTrue() { + return quietDiagnosticReporter } - if result.emitTime != 0 { - stats.add("Emit time", result.emitTime) + + formatOpts := getFormatOptsOfSys(sys) + writeStatus := core.IfElse(shouldBePretty(sys, options), diagnosticwriter.FormatDiagnosticsStatusWithColorAndTime, diagnosticwriter.FormatDiagnosticsStatusAndTime) + return func(diagnostic *ast.Diagnostic) { + writeStatus(sys.Writer(), sys.Now().Format("03:04:05 PM"), diagnostic, formatOpts) + fmt.Fprint(sys.Writer(), formatOpts.NewLine, formatOpts.NewLine) } - if result.changesComputeTime != 0 { - stats.add("Changes compute time", result.changesComputeTime) +} + +type statistics struct { + isAggregate bool + projects int + projectsBuilt int + timestampUpdates int + files int + lines int + identifiers int + symbols int + types int + instantiations int + memoryUsed uint64 + memoryAllocs uint64 + compileTimes *compileTimes +} + +func statisticsFromProgram(program *compiler.Program, compileTimes *compileTimes, 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(), + memoryUsed: memStats.Alloc, + memoryAllocs: memStats.Mallocs, + compileTimes: compileTimes, } - stats.add("Total time", result.totalTime) +} - stats.print(sys.Writer()) +func (p *statistics) report(ioWriter io.Writer, testing bool) { + if testing { + return + } + var stats table + var prefix string + + if p.isAggregate { + prefix = "Aggregate " + stats.add("Projects in scope", p.projects) + stats.add("Projects built", p.projectsBuilt) + stats.add("Timestamps only updates", p.timestampUpdates) + } + stats.add(prefix+"Files", p.files) + stats.add(prefix+"Lines", p.lines) + stats.add(prefix+"Identifiers", p.identifiers) + stats.add(prefix+"Symbols", p.symbols) + stats.add(prefix+"Types", p.types) + stats.add(prefix+"Instantiations", p.instantiations) + stats.add(prefix+"Memory used", fmt.Sprintf("%vK", p.memoryUsed/1024)) + stats.add(prefix+"Memory allocs", strconv.FormatUint(p.memoryAllocs, 10)) + if p.compileTimes.configTime != 0 { + stats.add(prefix+"Config time", p.compileTimes.configTime) + } + if p.compileTimes.buildInfoReadTime != 0 { + stats.add(prefix+"BuildInfo read time", p.compileTimes.buildInfoReadTime) + } + stats.add(prefix+"Parse time", p.compileTimes.parseTime) + if p.compileTimes.bindTime != 0 { + stats.add(prefix+"Bind time", p.compileTimes.bindTime) + } + if p.compileTimes.checkTime != 0 { + stats.add(prefix+"Check time", p.compileTimes.checkTime) + } + if p.compileTimes.emitTime != 0 { + stats.add(prefix+"Emit time", p.compileTimes.emitTime) + } + if p.compileTimes.changesComputeTime != 0 { + stats.add(prefix+"Changes compute time", p.compileTimes.changesComputeTime) + } + stats.add(prefix+"Total time", p.compileTimes.totalTime) + stats.print(ioWriter) } func printVersion(sys System) { fmt.Fprintln(sys.Writer(), diagnostics.Version_0.Format(core.Version())) - sys.EndWrite() } func printHelp(sys System, commandLine *tsoptions.ParsedCommandLine) { @@ -200,7 +251,6 @@ func printEasyHelp(sys System, simpleOptions []*tsoptions.CommandLineOption) { for _, chunk := range output { fmt.Fprint(sys.Writer(), chunk) } - sys.EndWrite() } func printBuildHelp(sys System, buildOptions []*tsoptions.CommandLineOption) { @@ -220,7 +270,6 @@ func printBuildHelp(sys System, buildOptions []*tsoptions.CommandLineOption) { for _, chunk := range output { fmt.Fprint(sys.Writer(), chunk) } - sys.EndWrite() } func generateSectionOptionsOutput( diff --git a/internal/execute/solutionBuilderHost.go b/internal/execute/solutionBuilderHost.go new file mode 100644 index 0000000000..4130f085b6 --- /dev/null +++ b/internal/execute/solutionBuilderHost.go @@ -0,0 +1,201 @@ +package execute + +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/incremental" + "github.com/microsoft/typescript-go/internal/tsoptions" + "github.com/microsoft/typescript-go/internal/tspath" + "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 solutionBuilderHost struct { + builder *solutionBuilder + host compiler.CompilerHost + extendedConfigCache collections.SyncMap[tspath.Path, *tsoptions.ExtendedConfigCacheEntry] + sourceFiles collections.SyncMap[ast.SourceFileParseOptions, *ast.SourceFile] + resolvedReferences collections.SyncMap[tspath.Path, *configAndTime] + + buildInfos collections.SyncMap[tspath.Path, *buildInfoAndConfig] + mTimes collections.SyncMap[tspath.Path, time.Time] + latestChangedDtsFiles collections.SyncMap[tspath.Path, time.Time] +} + +var ( + _ vfs.FS = (*solutionBuilderHost)(nil) + _ compiler.CompilerHost = (*solutionBuilderHost)(nil) + _ incremental.BuildInfoReader = (*solutionBuilderHost)(nil) +) + +func (h *solutionBuilderHost) FS() vfs.FS { + return h +} + +func (h *solutionBuilderHost) UseCaseSensitiveFileNames() bool { + return h.host.FS().UseCaseSensitiveFileNames() +} + +func (h *solutionBuilderHost) FileExists(path string) bool { + return h.host.FS().FileExists(path) +} + +func (h *solutionBuilderHost) ReadFile(path string) (string, bool) { + return h.host.FS().ReadFile(path) +} + +func (h *solutionBuilderHost) 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 *solutionBuilderHost) Remove(path string) error { + return h.host.FS().Remove(path) +} + +func (h *solutionBuilderHost) Chtimes(path string, aTime time.Time, mTime time.Time) error { + return h.host.FS().Chtimes(path, aTime, mTime) +} + +func (h *solutionBuilderHost) DirectoryExists(path string) bool { + return h.host.FS().DirectoryExists(path) +} + +func (h *solutionBuilderHost) GetAccessibleEntries(path string) vfs.Entries { + return h.host.FS().GetAccessibleEntries(path) +} + +func (h *solutionBuilderHost) Stat(path string) vfs.FileInfo { + return h.host.FS().Stat(path) +} + +func (h *solutionBuilderHost) WalkDir(root string, walkFn vfs.WalkDirFunc) error { + return h.host.FS().WalkDir(root, walkFn) +} + +func (h *solutionBuilderHost) Realpath(path string) string { + return h.host.FS().Realpath(path) +} + +func (h *solutionBuilderHost) DefaultLibraryPath() string { + return h.host.DefaultLibraryPath() +} + +func (h *solutionBuilderHost) GetCurrentDirectory() string { + return h.host.GetCurrentDirectory() +} + +func (h *solutionBuilderHost) Trace(msg string) { + //!!! TODO: implement +} + +func (h *solutionBuilderHost) GetSourceFile(opts ast.SourceFileParseOptions) *ast.SourceFile { + if existing, loaded := h.sourceFiles.Load(opts); loaded { + return existing + } + + file := h.host.GetSourceFile(opts) + file, _ = h.sourceFiles.LoadOrStore(opts, file) + return file +} + +func (h *solutionBuilderHost) 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 +} + +func (h *solutionBuilderHost) 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 *solutionBuilderHost) 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 *solutionBuilderHost) hasConflictingBuildInfo(configPath tspath.Path) bool { + if existing, loaded := h.buildInfos.Load(configPath); loaded { + return existing.config != configPath + } + return false +} + +func (h *solutionBuilderHost) getMTime(file string) time.Time { + path := h.builder.toPath(file) + if existing, loaded := h.mTimes.Load(path); loaded { + return existing + } + stat := h.host.FS().Stat(file) + var mTime time.Time + if stat != nil { + mTime = stat.ModTime() + } + mTime, _ = h.mTimes.LoadOrStore(path, mTime) + return mTime +} + +func (h *solutionBuilderHost) 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 *solutionBuilderHost) getLatestChangedDtsTime(config string) time.Time { + path := h.builder.toPath(config) + if existing, loaded := h.latestChangedDtsFiles.Load(path); loaded { + return existing + } + + var changedDtsTime time.Time + if configAndTime, loaded := h.resolvedReferences.Load(path); loaded { + buildInfoPath := configAndTime.resolved.GetBuildInfoFileName() + buildInfo := h.readOrStoreBuildInfo(path, buildInfoPath) + if buildInfo != nil && buildInfo.LatestChangedDtsFile != "" { + changedDtsTime = h.getMTime( + tspath.GetNormalizedAbsolutePath( + buildInfo.LatestChangedDtsFile, + tspath.GetDirectoryPath(tspath.GetNormalizedAbsolutePath(buildInfoPath, h.GetCurrentDirectory())), + ), + ) + } + } + + changedDtsTime, _ = h.mTimes.LoadOrStore(path, changedDtsTime) + return changedDtsTime +} diff --git a/internal/execute/solutionbuilder.go b/internal/execute/solutionbuilder.go new file mode 100644 index 0000000000..b2ce864cf6 --- /dev/null +++ b/internal/execute/solutionbuilder.go @@ -0,0 +1,667 @@ +package execute + +import ( + "strings" + + "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/incremental" + "github.com/microsoft/typescript-go/internal/tsoptions" + "github.com/microsoft/typescript-go/internal/tspath" +) + +type solutionBuilderOptions struct { + sys System + command *tsoptions.ParsedBuildCommandLine + testing CommandLineTesting + reportDiagnostic diagnosticReporter + reportStatus diagnosticReporter + reportErrorSummary diagnosticsReporter +} + +type solutionBuilder struct { + opts solutionBuilderOptions + comparePathsOptions tspath.ComparePathsOptions + host *solutionBuilderHost + orderGenerator *buildOrderGenerator +} + +func (s *solutionBuilder) Build() CommandLineResult { + s.setup() + if s.opts.command.BuildOptions.Verbose.IsTrue() { + s.opts.reportStatus(ast.NewCompilerDiagnostic( + diagnostics.Projects_in_this_build_Colon_0, + strings.Join(core.Map(s.orderGenerator.Order(), func(p string) string { + return "\r\n * " + s.relativeFileName(p) + }), ""), + )) + } + var buildResult solutionBuilderResult + if len(s.orderGenerator.errors) == 0 { + wg := core.NewWorkGroup(s.opts.command.CompilerOptions.SingleThreaded.IsTrue()) + s.buildProjects(wg, s.opts.command.ResolvedProjectPaths(), &buildResult, &collections.SyncSet[tspath.Path]{}) + wg.RunAndWait() + buildResult.statistics.projects = len(s.orderGenerator.Order()) + } else { + s.buildResultOfCircularOrder(&buildResult) + } + buildResult.report(s) + return buildResult.result +} + +func (s *solutionBuilder) Clean() CommandLineResult { + s.setup() + var buildResult solutionBuilderResult + if len(s.orderGenerator.errors) == 0 { + wg := core.NewWorkGroup(s.opts.command.CompilerOptions.SingleThreaded.IsTrue()) + s.cleanProjects(wg, &buildResult) + wg.RunAndWait() + buildResult.statistics.projects = len(s.orderGenerator.Order()) + } else { + s.buildResultOfCircularOrder(&buildResult) + } + buildResult.report(s) + return buildResult.result +} + +func (s *solutionBuilder) buildResultOfCircularOrder(buildResult *solutionBuilderResult) { + buildResult.result.Status = ExitStatusProjectReferenceCycle_OutputsSkipped + for _, err := range s.orderGenerator.errors { + s.opts.reportDiagnostic(err) + } + buildResult.errors = s.orderGenerator.errors +} + +func (s *solutionBuilder) relativeFileName(fileName string) string { + return tspath.ConvertToRelativePath(fileName, s.comparePathsOptions) +} + +func (s *solutionBuilder) toPath(fileName string) tspath.Path { + return tspath.ToPath(fileName, s.comparePathsOptions.CurrentDirectory, s.comparePathsOptions.UseCaseSensitiveFileNames) +} + +func (s *solutionBuilder) setup() { + s.host = &solutionBuilderHost{ + builder: s, + host: compiler.NewCachedFSCompilerHost(s.opts.sys.GetCurrentDirectory(), s.opts.sys.FS(), s.opts.sys.DefaultLibraryPath(), nil), + } + s.orderGenerator = NewBuildOrderGenerator(s.opts.command, s.host, s.opts.command.CompilerOptions.SingleThreaded.IsTrue()) +} + +func (s *solutionBuilder) buildProjects(wg core.WorkGroup, projects []string, buildResult *solutionBuilderResult, seen *collections.SyncSet[tspath.Path]) { + for _, project := range projects { + s.startProjectBuild(wg, project, buildResult, seen) + } +} + +func (s *solutionBuilder) startProjectBuild(wg core.WorkGroup, config string, buildResult *solutionBuilderResult, seen *collections.SyncSet[tspath.Path]) { + path := s.toPath(config) + if !seen.AddIfAbsent(path) { + return // Already seen this project + } + wg.Queue(func() { + task, ok := s.orderGenerator.tasks.Load(path) + if !ok { + panic("No build task found for " + config) + } + + // Queue the upstream tasks + for _, upstream := range task.upStream { + if upstream.status != nil { + s.startProjectBuild(wg, upstream.config, buildResult, seen) + } + } + + // Wait on upstream tasks to complete + upStreamStatus := make([]*upToDateStatus, len(task.upStream)) + for i, upstream := range task.upStream { + if upstream.status != nil { + upStreamStatus[i] = <-upstream.status + } + } + + status, taskReporter := s.buildProject(config, path, task, upStreamStatus) + for _, downstream := range task.downStream { + downstream.status <- status + } + + // Wait for previous build task to complete reporting status, errors etc + if task.previousTaskReporter != nil { + <-task.previousTaskReporter + } + taskReporter.report(s, path, buildResult) + task.reporter <- taskReporter + }) +} + +func (s *solutionBuilder) buildProject(config string, path tspath.Path, task *buildTask, upStreamStatus []*upToDateStatus) (*upToDateStatus, *taskReporter) { + status := s.getUpToDateStatus(config, path, task, upStreamStatus) + var taskReporter taskReporter + + projectStatusReport := s.reportUpToDateStatus(config, status) + if projectStatusReport != nil { + taskReporter.status = []*ast.Diagnostic{projectStatusReport} + } + + handled := s.handleStatusThatDoesntRequireBuild(config, task, status, &taskReporter) + if handled != nil { + if task.resolved != nil { + for _, diagnostic := range task.resolved.GetConfigFileParsingDiagnostics() { + taskReporter.addError(diagnostic) + } + } + if len(taskReporter.errors) > 0 { + taskReporter.exitStatus = ExitStatusDiagnosticsPresent_OutputsSkipped + } + return handled, &taskReporter + } + + if s.opts.command.BuildOptions.Verbose.IsTrue() { + taskReporter.status = append(taskReporter.status, ast.NewCompilerDiagnostic(diagnostics.Building_project_0, s.relativeFileName(config))) + } + + // Real build + var compileTimes compileTimes + configAndTime, _ := s.host.resolvedReferences.Load(path) + compileTimes.configTime = configAndTime.time + buildInfoReadStart := s.opts.sys.Now() + oldProgram := incremental.ReadBuildInfoProgram(task.resolved, s.host) + compileTimes.buildInfoReadTime = s.opts.sys.Now().Sub(buildInfoReadStart) + parseStart := s.opts.sys.Now() + program := compiler.NewProgram(compiler.ProgramOptions{ + Config: task.resolved, + Host: s.host, + JSDocParsingMode: ast.JSDocParsingModeParseForTypeErrors, + }) + compileTimes.parseTime = s.opts.sys.Now().Sub(parseStart) + changesComputeStart := s.opts.sys.Now() + taskReporter.program = incremental.NewProgram(program, oldProgram, s.opts.testing != nil) + compileTimes.changesComputeTime = s.opts.sys.Now().Sub(changesComputeStart) + + result, statistics := emitAndReportStatistics( + s.opts.sys, + taskReporter.program, + program, + task.resolved, + taskReporter.addError, + quietDiagnosticsReporter, + &taskReporter.ioWriter, + compileTimes, + s.opts.testing, + ) + taskReporter.exitStatus = result.status + taskReporter.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 + s.updateTimeStamps(config, task, &taskReporter, result.emitResult.EmittedFiles, diagnostics.Updating_unchanged_output_timestamps_of_project_0) + } + + if result.status == ExitStatusDiagnosticsPresent_OutputsSkipped || result.status == ExitStatusDiagnosticsPresent_OutputsGenerated { + status = &upToDateStatus{kind: upToDateStatusTypeBuildErrors} + } else { + status = &upToDateStatus{kind: upToDateStatusTypeUpToDate} + } + return status, &taskReporter +} + +func (s *solutionBuilder) handleStatusThatDoesntRequireBuild(config string, task *buildTask, status *upToDateStatus, taskReporter *taskReporter) *upToDateStatus { + switch status.kind { + case upToDateStatusTypeUpToDate: + if s.opts.command.BuildOptions.Dry.IsTrue() { + taskReporter.status = append(taskReporter.status, ast.NewCompilerDiagnostic(diagnostics.Project_0_is_up_to_date, config)) + } + return status + case upToDateStatusTypeUpstreamErrors: + upstreamStatus := status.data.(*upstreamErrors) + if s.opts.command.BuildOptions.Verbose.IsTrue() { + taskReporter.status = append(taskReporter.status, ast.NewCompilerDiagnostic( + core.IfElse( + upstreamStatus.refHasUpstreamErrors, + diagnostics.Skipping_build_of_project_0_because_its_dependency_1_was_not_built, + diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors, + ), + s.relativeFileName(config), + s.relativeFileName(upstreamStatus.ref), + )) + } + return status + case upToDateStatusTypeSolution: + return status + case upToDateStatusTypeConfigFileNotFound: + taskReporter.errors = []*ast.Diagnostic{ast.NewCompilerDiagnostic(diagnostics.File_0_not_found, config)} + return status + } + + // update timestamps + if status.IsPseudoBuild() { + if s.opts.command.BuildOptions.Dry.IsTrue() { + taskReporter.status = append(taskReporter.status, ast.NewCompilerDiagnostic(diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, config)) + status = &upToDateStatus{kind: upToDateStatusTypeUpToDate} + return status + } + + s.updateTimeStamps(config, task, taskReporter, nil, diagnostics.Updating_output_timestamps_of_project_0) + status = &upToDateStatus{kind: upToDateStatusTypeUpToDate} + return status + } + + if s.opts.command.BuildOptions.Dry.IsTrue() { + taskReporter.status = append(taskReporter.status, ast.NewCompilerDiagnostic(diagnostics.A_non_dry_build_would_build_project_0, config)) + status = &upToDateStatus{kind: upToDateStatusTypeUpToDate} + return status + } + return nil +} + +func (s *solutionBuilder) getUpToDateStatus(config string, configPath tspath.Path, task *buildTask, upStreamStatus []*upToDateStatus) *upToDateStatus { + // Config file not found + if task.resolved == nil { + return &upToDateStatus{kind: upToDateStatusTypeConfigFileNotFound} + } + + // Solution - nothing to build + if len(task.resolved.FileNames()) == 0 && task.resolved.ProjectReferences() != nil { + 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 s.opts.command.BuildOptions.StopBuildOnErrors.IsTrue() && upstreamStatus.IsError() { + // Upstream project has errors, so we cannot build this project + return &upToDateStatus{kind: upToDateStatusTypeUpstreamErrors, data: &upstreamErrors{task.resolved.ProjectReferences()[index].Path, upstreamStatus.kind == upToDateStatusTypeUpstreamErrors}} + } + } + + if s.opts.command.BuildOptions.Force.IsTrue() { + return &upToDateStatus{kind: upToDateStatusTypeForceBuild} + } + + // Check the build info + buildInfoPath := task.resolved.GetBuildInfoFileName() + buildInfo := s.host.readOrStoreBuildInfo(configPath, buildInfoPath) + if buildInfo == nil { + return &upToDateStatus{kind: upToDateStatusTypeOutputMissing, data: buildInfoPath} + } + + // build info version + if !buildInfo.IsValidVersion() { + return &upToDateStatus{kind: upToDateStatusTypeTsVersionOutputOfDate, data: buildInfo.Version} + } + + // Report errors if build info indicates errors + if !task.resolved.CompilerOptions().NoCheck.IsTrue() && (buildInfo.Errors || buildInfo.CheckPending) { + return &upToDateStatus{kind: upToDateStatusTypeOutOfDateBuildInfoWithErrors, data: buildInfoPath} + } + + if task.resolved.CompilerOptions().IsIncremental() { + if !buildInfo.IsIncremental() { + // Program options out of date + return &upToDateStatus{kind: upToDateStatusTypeOutOfDateOptions, data: buildInfoPath} + } + + // Errors need to be reported if build info has errors + if !task.resolved.CompilerOptions().NoCheck.IsTrue() && + (buildInfo.ChangeFileSet != nil || + buildInfo.SemanticDiagnosticsPerFile != nil || + (task.resolved.CompilerOptions().GetEmitDeclarations() && buildInfo.EmitDiagnosticsPerFile != nil)) { + return &upToDateStatus{kind: upToDateStatusTypeOutOfDateBuildInfoWithErrors, data: buildInfoPath} + } + + // Pending emit files + if !task.resolved.CompilerOptions().NoEmit.IsTrue() && + (buildInfo.ChangeFileSet != nil || + buildInfo.AffectedFilesPendingEmit != nil) { + return &upToDateStatus{kind: upToDateStatusTypeOutOfDateBuildInfoWithPendingEmit, data: buildInfoPath} + } + + // Some of the emit files like source map or dts etc are not yet done + if buildInfo.IsEmitPending(task.resolved, tspath.GetDirectoryPath(tspath.GetNormalizedAbsolutePath(buildInfoPath, s.comparePathsOptions.CurrentDirectory))) { + return &upToDateStatus{kind: upToDateStatusTypeOutOfDateOptions, data: buildInfoPath} + } + } + var inputTextUnchanged bool + oldestOutputFileAndTime := fileAndTime{buildInfoPath, s.host.getMTime(buildInfoPath)} + var newestInputFileAndTime fileAndTime + var seenRoots collections.Set[tspath.Path] + var buildInfoRootInfoReader *incremental.BuildInfoRootInfoReader + for _, inputFile := range task.resolved.FileNames() { + inputTime := s.host.getMTime(inputFile) + if inputTime.IsZero() { + return &upToDateStatus{kind: upToDateStatusTypeInputFileMissing, data: inputFile} + } + inputPath := s.toPath(inputFile) + if inputTime.After(oldestOutputFileAndTime.time) { + var version string + var currentVersion string + if buildInfo.IsIncremental() { + if buildInfoRootInfoReader == nil { + buildInfoRootInfoReader = buildInfo.GetBuildInfoRootInfoReader(tspath.GetDirectoryPath(tspath.GetNormalizedAbsolutePath(buildInfoPath, s.comparePathsOptions.CurrentDirectory)), s.comparePathsOptions) + } + buildInfoFileInfo, resolvedInputPath := buildInfoRootInfoReader.GetBuildInfoFileInfo(inputPath) + if fileInfo := buildInfoFileInfo.GetFileInfo(); fileInfo != nil && fileInfo.Version() != "" { + version = fileInfo.Version() + if text, ok := s.host.FS().ReadFile(string(resolvedInputPath)); ok { + currentVersion = incremental.ComputeHash(text, s.opts.testing != nil) + if version == currentVersion { + inputTextUnchanged = true + } + } + } + } + + if version == "" || version != currentVersion { + return &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{inputFile, buildInfoPath}} + } + } + if inputTime.After(newestInputFileAndTime.time) { + newestInputFileAndTime = fileAndTime{inputFile, inputTime} + } + seenRoots.Add(inputPath) + } + + if buildInfoRootInfoReader == nil { + buildInfoRootInfoReader = buildInfo.GetBuildInfoRootInfoReader(tspath.GetDirectoryPath(tspath.GetNormalizedAbsolutePath(buildInfoPath, s.comparePathsOptions.CurrentDirectory)), s.comparePathsOptions) + } + for root := range buildInfoRootInfoReader.Roots() { + if !seenRoots.Has(root) { + // File was root file when project was built but its not any more + return &upToDateStatus{kind: upToDateStatusTypeOutOfDateRoots, data: &inputOutputName{string(root), buildInfoPath}} + } + } + + if !task.resolved.CompilerOptions().IsIncremental() { + // Check output file stamps + for outputFile := range task.resolved.GetOutputFileNames() { + outputTime := s.host.getMTime(outputFile) + if outputTime.IsZero() { + // Output file missing + return &upToDateStatus{kind: upToDateStatusTypeOutputMissing, data: outputFile} + } + + if outputTime.Before(newestInputFileAndTime.time) { + // Output file is older than input file + return &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{newestInputFileAndTime.file, outputFile}} + } + + if outputTime.Before(oldestOutputFileAndTime.time) { + oldestOutputFileAndTime = fileAndTime{outputFile, outputTime} + } + } + } + + var refDtsUnchanged bool + for index, upstreamStatus := range upStreamStatus { + if upstreamStatus == nil || upstreamStatus.kind == upToDateStatusTypeSolution { + // Not dependent on the status or this upstream project + // (eg: expected cycle was detected and hence skipped, or is solution) + continue + } + + // If the upstream project's newest file is older than our oldest output, + // 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() + 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 s.host.hasConflictingBuildInfo(configPath) { + return &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{task.resolved.ProjectReferences()[index].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 := s.host.getLatestChangedDtsTime(task.resolved.ResolvedProjectReferencePaths()[index]) + 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{task.resolved.ProjectReferences()[index].Path, oldestOutputFileAndTime.file}} + } + + configStatus := s.checkInputFileTime(config, &oldestOutputFileAndTime) + if configStatus != nil { + return configStatus + } + + for _, extendedConfig := range task.resolved.ExtendedSourceFiles() { + extendedConfigStatus := s.checkInputFileTime(extendedConfig, &oldestOutputFileAndTime) + if extendedConfigStatus != nil { + return extendedConfigStatus + } + } + + // !!! sheetal TODO : watch?? + // // Check package file time + // const packageJsonLookups = state.lastCachedPackageJsonLookups.get(resolvedPath); + // const dependentPackageFileStatus = packageJsonLookups && forEachKey( + // packageJsonLookups, + // path => checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName), + // ); + // if (dependentPackageFileStatus) return dependentPackageFileStatus; + + return &upToDateStatus{ + kind: core.IfElse( + refDtsUnchanged, + upToDateStatusTypeUpToDateWithUpstreamTypes, + core.IfElse(inputTextUnchanged, upToDateStatusTypeUpToDateWithInputFileText, upToDateStatusTypeUpToDate), + ), + data: &inputOutputFileAndTime{newestInputFileAndTime, oldestOutputFileAndTime, buildInfoPath}, + } +} + +func (s *solutionBuilder) checkInputFileTime(inputFile string, oldestOutputFileAndTime *fileAndTime) *upToDateStatus { + inputTime := s.host.getMTime(inputFile) + if inputTime.After(oldestOutputFileAndTime.time) { + // Output file is older than input file + return &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{inputFile, oldestOutputFileAndTime.file}} + } + return nil +} + +func (s *solutionBuilder) reportUpToDateStatus(config string, status *upToDateStatus) *ast.Diagnostic { + if !s.opts.command.BuildOptions.Verbose.IsTrue() { + return nil + } + switch status.kind { + case upToDateStatusTypeConfigFileNotFound: + return ast.NewCompilerDiagnostic( + diagnostics.Project_0_is_out_of_date_because_config_file_does_not_exist, + s.relativeFileName(config), + ) + case upToDateStatusTypeUpstreamErrors: + upstreamStatus := status.data.(*upstreamErrors) + return ast.NewCompilerDiagnostic( + core.IfElse( + upstreamStatus.refHasUpstreamErrors, + diagnostics.Project_0_can_t_be_built_because_its_dependency_1_was_not_built, + diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors, + ), + s.relativeFileName(config), + s.relativeFileName(upstreamStatus.ref), + ) + case upToDateStatusTypeUpToDate: + inputOutputFileAndTime := status.data.(*inputOutputFileAndTime) + return ast.NewCompilerDiagnostic( + diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2, + s.relativeFileName(config), + s.relativeFileName(inputOutputFileAndTime.input.file), + s.relativeFileName(inputOutputFileAndTime.output.file), + ) + case upToDateStatusTypeUpToDateWithUpstreamTypes: + return ast.NewCompilerDiagnostic( + diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, + s.relativeFileName(config), + ) + case upToDateStatusTypeUpToDateWithInputFileText: + return ast.NewCompilerDiagnostic( + diagnostics.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files, + s.relativeFileName(config), + ) + case upToDateStatusTypeInputFileMissing: + return ast.NewCompilerDiagnostic( + diagnostics.Project_0_is_out_of_date_because_input_1_does_not_exist, + s.relativeFileName(config), + s.relativeFileName(status.data.(string)), + ) + case upToDateStatusTypeOutputMissing: + return ast.NewCompilerDiagnostic( + diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, + s.relativeFileName(config), + s.relativeFileName(status.data.(string)), + ) + case upToDateStatusTypeInputFileNewer: + inputOutput := status.data.(*inputOutputName) + return ast.NewCompilerDiagnostic( + diagnostics.Project_0_is_out_of_date_because_output_1_is_older_than_input_2, + s.relativeFileName(config), + s.relativeFileName(inputOutput.output), + s.relativeFileName(inputOutput.input), + ) + case upToDateStatusTypeOutOfDateBuildInfoWithPendingEmit: + return ast.NewCompilerDiagnostic( + diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted, + s.relativeFileName(config), + s.relativeFileName(status.data.(string)), + ) + case upToDateStatusTypeOutOfDateBuildInfoWithErrors: + return ast.NewCompilerDiagnostic( + diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors, + s.relativeFileName(config), + s.relativeFileName(status.data.(string)), + ) + case upToDateStatusTypeOutOfDateOptions: + return ast.NewCompilerDiagnostic( + diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions, + s.relativeFileName(config), + s.relativeFileName(status.data.(string)), + ) + case upToDateStatusTypeOutOfDateRoots: + inputOutput := status.data.(*inputOutputName) + return 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, + s.relativeFileName(config), + s.relativeFileName(inputOutput.output), + s.relativeFileName(inputOutput.input), + ) + case upToDateStatusTypeTsVersionOutputOfDate: + return ast.NewCompilerDiagnostic( + diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2, + s.relativeFileName(config), + core.Version(), + s.relativeFileName(status.data.(string)), + ) + case upToDateStatusTypeForceBuild: + return ast.NewCompilerDiagnostic( + diagnostics.Project_0_is_being_forcibly_rebuilt, + s.relativeFileName(config), + s.relativeFileName(status.data.(string)), + ) + } + return nil +} + +func (s *solutionBuilder) updateTimeStamps(config string, task *buildTask, taskReporter *taskReporter, emittedFiles []string, verboseMessage *diagnostics.Message) { + if task.resolved.CompilerOptions().NoEmit.IsTrue() { + return + } + emitted := collections.NewSetFromItems(emittedFiles...) + var verboseMessageReported bool + updateTimeStamp := func(file string) { + if emitted.Has(file) { + return + } + if !verboseMessageReported && s.opts.command.BuildOptions.Verbose.IsTrue() { + taskReporter.status = append(taskReporter.status, ast.NewCompilerDiagnostic(verboseMessage, s.relativeFileName(config))) + verboseMessageReported = true + } + err := s.host.setMTime(file, s.opts.sys.Now()) + if err != nil { + taskReporter.errors = append(taskReporter.errors, ast.NewCompilerDiagnostic(diagnostics.Failed_to_update_timestamp_of_file_0, file)) + } + } + + if task.resolved.CompilerOptions().IsIncremental() { + updateTimeStamp(task.resolved.GetBuildInfoFileName()) + } else { + for outputFile := range task.resolved.GetOutputFileNames() { + updateTimeStamp(outputFile) + } + } +} + +func (s *solutionBuilder) cleanProjects(wg core.WorkGroup, buildResult *solutionBuilderResult) { + for _, config := range s.orderGenerator.Order() { + path := s.toPath(config) + wg.Queue(func() { + task, ok := s.orderGenerator.tasks.Load(path) + if !ok { + panic("No build task found for " + config) + } + + taskReporterr := s.cleanProject(config, path, task) + // Wait for previous build task to complete reporting status, errors etc + if task.previousTaskReporter != nil { + <-task.previousTaskReporter + } + taskReporterr.report(s, path, buildResult) + task.reporter <- taskReporterr + }) + } +} + +func (s *solutionBuilder) cleanProject(config string, path tspath.Path, task *buildTask) *taskReporter { + var taskReporter taskReporter + if task.resolved == nil { + taskReporter.errors = []*ast.Diagnostic{ast.NewCompilerDiagnostic(diagnostics.File_0_not_found, config)} + return &taskReporter + } + + inputs := collections.NewSetFromItems(core.Map(task.resolved.FileNames(), s.toPath)...) + for outputFile := range task.resolved.GetOutputFileNames() { + s.cleanProjectOutput(outputFile, inputs, &taskReporter) + } + s.cleanProjectOutput(task.resolved.GetBuildInfoFileName(), inputs, &taskReporter) + return &taskReporter +} + +func (s *solutionBuilder) cleanProjectOutput(outputFile string, inputs *collections.Set[tspath.Path], taskReporter *taskReporter) { + outputPath := s.toPath(outputFile) + // If output name is same as input file name, do not delete and ignore the error + if inputs.Has(outputPath) { + return + } + if s.host.FS().FileExists(outputFile) { + if !s.opts.command.BuildOptions.Dry.IsTrue() { + err := s.host.FS().Remove(outputFile) + if err != nil { + taskReporter.errors = append(taskReporter.errors, ast.NewCompilerDiagnostic(diagnostics.Failed_to_delete_file_0, outputFile)) + } + } else { + taskReporter.filesToDelete = append(taskReporter.filesToDelete, outputFile) + } + } +} + +func newSolutionBuilder(opts solutionBuilderOptions) *solutionBuilder { + solutionBuilder := &solutionBuilder{ + opts: opts, + comparePathsOptions: tspath.ComparePathsOptions{ + CurrentDirectory: opts.sys.GetCurrentDirectory(), + UseCaseSensitiveFileNames: opts.sys.FS().UseCaseSensitiveFileNames(), + }, + } + return solutionBuilder +} diff --git a/internal/execute/system.go b/internal/execute/system.go index 3920eec805..6748e58f20 100644 --- a/internal/execute/system.go +++ b/internal/execute/system.go @@ -9,7 +9,6 @@ import ( type System interface { Writer() io.Writer - EndWrite() // needed for testing FS() vfs.FS DefaultLibraryPath() string GetCurrentDirectory() string @@ -22,8 +21,8 @@ type ExitStatus int const ( ExitStatusSuccess ExitStatus = 0 - ExitStatusDiagnosticsPresent_OutputsSkipped ExitStatus = 1 - ExitStatusDiagnosticsPresent_OutputsGenerated ExitStatus = 2 + ExitStatusDiagnosticsPresent_OutputsGenerated ExitStatus = 1 + ExitStatusDiagnosticsPresent_OutputsSkipped ExitStatus = 2 ExitStatusInvalidProject_OutputsSkipped ExitStatus = 3 ExitStatusProjectReferenceCycle_OutputsSkipped ExitStatus = 4 ExitStatusNotImplemented ExitStatus = 5 diff --git a/internal/execute/testsys_test.go b/internal/execute/testsys_test.go index 67ff726cec..bc7fcf28ea 100644 --- a/internal/execute/testsys_test.go +++ b/internal/execute/testsys_test.go @@ -11,7 +11,9 @@ import ( "time" "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/diagnosticwriter" "github.com/microsoft/typescript-go/internal/execute" "github.com/microsoft/typescript-go/internal/incremental" "github.com/microsoft/typescript-go/internal/testutil/incrementaltestutil" @@ -54,18 +56,18 @@ func newTestSys(fileOrFolderList FileMap, cwd string) *testSys { if cwd == "" { cwd = "/home/src/workspaces/project" } + fs, timeImpl := vfstest.FromMapWithTime(fileOrFolderList, true /*useCaseSensitiveFileNames*/) sys := &testSys{ fs: &incrementaltestutil.FsHandlingBuildInfo{ FS: &testFs{ - FS: vfstest.FromMap(fileOrFolderList, true /*useCaseSensitiveFileNames*/), + FS: fs, }, }, defaultLibraryPath: tscLibPath, cwd: cwd, files: slices.Collect(maps.Keys(fileOrFolderList)), - output: []string{}, currentWrite: &strings.Builder{}, - start: time.Now(), + timeImpl: timeImpl, } // Ensure the default library file is present @@ -81,6 +83,7 @@ func newTestSys(fileOrFolderList FileMap, cwd string) *testSys { type diffEntry struct { content string + mTime time.Time isWritten bool } @@ -91,7 +94,6 @@ type snapshot struct { type testSys struct { // todo: original has write to output as a string[] because the separations are needed for baselining - output []string currentWrite *strings.Builder serializedDiff *snapshot @@ -100,18 +102,20 @@ type testSys struct { cwd string files []string - start time.Time + timeImpl *vfstest.Time } -var _ execute.System = (*testSys)(nil) +var ( + _ execute.System = (*testSys)(nil) + _ execute.CommandLineTesting = (*testSys)(nil) +) func (s *testSys) Now() time.Time { - // todo: make a "test time" structure - return time.Now() + return s.timeImpl.Now() } func (s *testSys) SinceStart() time.Duration { - return time.Since(s.start) + return s.timeImpl.SinceStart() } func (s *testSys) FS() vfs.FS { @@ -152,36 +156,38 @@ func (s *testSys) Writer() io.Writer { return s.currentWrite } -func sanitizeSysOutput(output string, prefixLine string, replaceString string) string { - if index := strings.Index(output, prefixLine); index != -1 { - indexOfNewLine := strings.Index(output[index:], "\n") - if indexOfNewLine != -1 { - output = output[:index] + replaceString + output[index+indexOfNewLine+1:] +func (s *testSys) OnEmittedFiles(result *compiler.EmitResult) { + if result != nil { + for _, file := range result.EmittedFiles { + // Ensure that the timestamp for emitted files is in the order + now := s.timeImpl.Now() + s.fsFromFileMap().Chtimes(file, time.Time{}, now) } } - return output -} - -func (s *testSys) EndWrite() { - // todo: revisit if improving tsc/build/watch unittest baselines - output := s.currentWrite.String() - s.currentWrite.Reset() - output = sanitizeSysOutput(output, "Version "+core.Version(), "Version FakeTSVersion\n") - output = sanitizeSysOutput(output, "build starting at ", "") - output = sanitizeSysOutput(output, "build finished in ", "") - s.output = append(s.output, output) } -func (s *testSys) baselineProgram(baseline *strings.Builder, program *incremental.Program, watcher *execute.Watcher) { +func (s *testSys) baselinePrograms(baseline *strings.Builder, programs []*incremental.Program, watcher *execute.Watcher) { if watcher != nil { - program = watcher.GetProgram() + programs = []*incremental.Program{watcher.GetProgram()} } + for index, program := range programs { + if index > 0 { + baseline.WriteString("\n") + } + s.baselineProgram(baseline, program) + } +} + +func (s *testSys) baselineProgram(baseline *strings.Builder, program *incremental.Program) { if program == nil { return } - baseline.WriteString("SemanticDiagnostics::\n") testingData := program.GetTestingData(program.GetProgram()) + if testingData.ConfigFilePath != "" { + baseline.WriteString(testingData.ConfigFilePath + "::\n") + } + baseline.WriteString("SemanticDiagnostics::\n") for _, file := range program.GetProgram().GetSourceFiles() { if diagnostics, ok := testingData.SemanticDiagnosticsPerFile.Load(file.Path()); ok { if oldDiagnostics, ok := testingData.OldProgramSemanticDiagnosticsPerFile.Load(file.Path()); !ok || oldDiagnostics != diagnostics { @@ -221,16 +227,69 @@ func (s *testSys) serializeState(baseline *strings.Builder) { func (s *testSys) baselineOutput(baseline io.Writer) { fmt.Fprint(baseline, "\nOutput::\n") - if len(s.output) == 0 { - fmt.Fprint(baseline, "No output\n") - return + output := s.getOutput(false) + fmt.Fprint(baseline, output) +} + +var ( + fakeTimeStamp = "HH:MM:SS AM" + fakeDuration = "d.ddds" + + buildStartingAt = "build starting at " + buildFinishedIn = "build finished in " + prettyStatusTimeStampStart = "[" + diagnosticwriter.ForegroundColorEscapeGrey + listFileStart = "TSFILE: " +) + +func (s *testSys) getOutput(forComparing bool) string { + lines := strings.Split(s.currentWrite.String(), "\n") + outputLines := make([]string, 0, len(lines)) + for i := 0; i < len(lines); i++ { + line := lines[i] + if change := strings.Replace(line, "Version "+core.Version(), "Version "+incrementaltestutil.FakeTsVersion, 1); change != line { + outputLines = append(outputLines, change) + continue + } + if strings.HasPrefix(line, buildStartingAt) { + if !forComparing { + outputLines = append(outputLines, buildStartingAt+fakeTimeStamp) + } + continue + } + if strings.HasPrefix(line, buildFinishedIn) { + if !forComparing { + outputLines = append(outputLines, buildFinishedIn+fakeDuration) + } + continue + } + if change := strings.TrimPrefix(line, prettyStatusTimeStampStart); change != line { + if !forComparing { + outputLines = append(outputLines, prettyStatusTimeStampStart+fakeTimeStamp+change[len(fakeTimeStamp):]) + } + } else if strings.Index(line, " -") == len(fakeTimeStamp) && strings.Index(line, ":") == 2 && strings.Index(line[3:], ":") == 2 { + // Fuzzy check for hh:mm:ss AM/PM - string + outputLines = append(outputLines, fakeTimeStamp+line[11:]) + } else if !forComparing || !strings.HasPrefix(line, listFileStart) { + outputLines = append(outputLines, line) + continue + } + + // Consume all the buildStatus reported + for j := i + 1; j < len(lines); j++ { + if !forComparing { + outputLines = append(outputLines, lines[j]) + } + if lines[j] == "" { + i = j + break + } + } } - // todo screen clears - s.printOutputs(baseline) + return strings.Join(outputLines, "\n") } func (s *testSys) clearOutput() { - s.output = []string{} + s.currentWrite.Reset() } func (s *testSys) baselineFSwithDiff(baseline io.Writer) { @@ -252,7 +311,11 @@ func (s *testSys) baselineFSwithDiff(baseline io.Writer) { if !ok { return nil } - newEntry := &diffEntry{content: newContents, isWritten: testFs.writtenFiles.Has(path)} + stat := s.fsFromFileMap().Stat(path) + if stat == nil { + panic("stat is nil: " + path) + } + newEntry := &diffEntry{content: newContents, mTime: stat.ModTime(), isWritten: testFs.writtenFiles.Has(path)} snap[path] = newEntry s.addFsEntryDiff(diffs, newEntry, path) @@ -308,17 +371,14 @@ func (s *testSys) addFsEntryDiff(diffs map[string]string, newDirContent *diffEnt diffs[path] = "*modified* \n" + newDirContent.content } else if newDirContent.isWritten { diffs[path] = "*rewrite with same content*" + } else if newDirContent.mTime != oldDirContent.mTime { + diffs[path] = "*mTime changed*" } else if defaultLibs != nil && defaultLibs.Has(path) && s.testFs().defaultLibs != nil && !s.testFs().defaultLibs.Has(path) { // Lib file that was read diffs[path] = "*Lib*\n" + newDirContent.content } } -func (s *testSys) printOutputs(baseline io.Writer) { - // todo sanitize sys output - fmt.Fprint(baseline, strings.Join(s.output, "\n")) -} - func (s *testSys) writeFileNoError(path string, content string, writeByteOrderMark bool) { if err := s.fsFromFileMap().WriteFile(path, content, writeByteOrderMark); err != nil { panic(err) diff --git a/internal/execute/tsc.go b/internal/execute/tsc.go index cf0f1ac381..6744b89b32 100644 --- a/internal/execute/tsc.go +++ b/internal/execute/tsc.go @@ -3,6 +3,7 @@ package execute import ( "context" "fmt" + "io" "runtime" "strings" "time" @@ -21,8 +22,6 @@ import ( "github.com/microsoft/typescript-go/internal/tspath" ) -type cbType = func(p any) any - func applyBulkEdits(text string, edits []core.TextChange) string { b := strings.Builder{} b.Grow(len(text)) @@ -43,11 +42,15 @@ func applyBulkEdits(text string, edits []core.TextChange) string { type CommandLineResult struct { Status ExitStatus - IncrementalProgram *incremental.Program + IncrementalProgram []*incremental.Program Watcher *Watcher } -func CommandLine(sys System, commandLineArgs []string, testing bool) CommandLineResult { +type CommandLineTesting interface { + OnEmittedFiles(result *compiler.EmitResult) +} + +func CommandLine(sys System, commandLineArgs []string, testing CommandLineTesting) CommandLineResult { if len(commandLineArgs) > 0 { // !!! build mode switch strings.ToLower(commandLineArgs[0]) { @@ -87,7 +90,7 @@ func fmtMain(sys System, input, output string) ExitStatus { return ExitStatusSuccess } -func tscBuildCompilation(sys System, buildCommand *tsoptions.ParsedBuildCommandLine, testing bool) CommandLineResult { +func tscBuildCompilation(sys System, buildCommand *tsoptions.ParsedBuildCommandLine, testing CommandLineTesting) CommandLineResult { reportDiagnostic := createDiagnosticReporter(sys, buildCommand.CompilerOptions) // if (buildOptions.locale) { @@ -101,66 +104,37 @@ func tscBuildCompilation(sys System, buildCommand *tsoptions.ParsedBuildCommandL return CommandLineResult{Status: ExitStatusDiagnosticsPresent_OutputsSkipped} } + if pprofDir := buildCommand.CompilerOptions.PprofDir; pprofDir != "" { + // !!! stderr? + profileSession := pprof.BeginProfiling(pprofDir, sys.Writer()) + defer profileSession.Stop() + } + if buildCommand.CompilerOptions.Help.IsTrue() { printVersion(sys) printBuildHelp(sys, tsoptions.BuildOpts) return CommandLineResult{Status: ExitStatusSuccess} } - // if (buildOptions.watch) { - // if (reportWatchModeWithoutSysSupport(sys, reportDiagnostic)) return; - // const buildHost = createSolutionBuilderWithWatchHost( - // sys, - // /*createProgram*/ undefined, - // reportDiagnostic, - // createBuilderStatusReporter(sys, shouldBePretty(sys, buildOptions)), - // createWatchStatusReporter(sys, buildOptions), - // ); - // buildHost.jsDocParsingMode = defaultJSDocParsingMode; - // const solutionPerformance = enableSolutionPerformance(sys, buildOptions); - // updateSolutionBuilderHost(sys, cb, buildHost, solutionPerformance); - // const onWatchStatusChange = buildHost.onWatchStatusChange; - // let reportBuildStatistics = false; - // buildHost.onWatchStatusChange = (d, newLine, options, errorCount) => { - // onWatchStatusChange?.(d, newLine, options, errorCount); - // if ( - // reportBuildStatistics && ( - // d.code === Diagnostics.Found_0_errors_Watching_for_file_changes.code || - // d.code === Diagnostics.Found_1_error_Watching_for_file_changes.code - // ) - // ) { - // reportSolutionBuilderTimes(builder, solutionPerformance); - // } - // }; - // const builder = createSolutionBuilderWithWatch(buildHost, projects, buildOptions, watchOptions); - // builder.build(); - // reportSolutionBuilderTimes(builder, solutionPerformance); - // reportBuildStatistics = true; - // return builder; - // } - - // const buildHost = createSolutionBuilderHost( - // sys, - // /*createProgram*/ undefined, - // reportDiagnostic, - // createBuilderStatusReporter(sys, shouldBePretty(sys, buildOptions)), - // createReportErrorSummary(sys, buildOptions), - // ); - // buildHost.jsDocParsingMode = defaultJSDocParsingMode; - // const solutionPerformance = enableSolutionPerformance(sys, buildOptions); - // updateSolutionBuilderHost(sys, cb, buildHost, solutionPerformance); - // const builder = createSolutionBuilder(buildHost, projects, buildOptions); - // const exitStatus = buildOptions.clean ? builder.clean() : builder.build(); - // reportSolutionBuilderTimes(builder, solutionPerformance); - // dumpTracingLegend(); // Will no-op if there hasn't been any tracing - // return sys.exit(exitStatus); - - fmt.Fprintln(sys.Writer(), "Build mode is currently unsupported.") - sys.EndWrite() - return CommandLineResult{Status: ExitStatusNotImplemented} + // !!! sheetal watch mode + reportStatus := createBuilderStatusReporter(sys, buildCommand.CompilerOptions) + reportErrorSummary := createReportErrorSummary(sys, buildCommand.CompilerOptions) + solutionBuilder := newSolutionBuilder(solutionBuilderOptions{ + sys, + buildCommand, + testing, + reportDiagnostic, + reportStatus, + reportErrorSummary, + }) + if buildCommand.BuildOptions.Clean.IsTrue() { + return solutionBuilder.Clean() + } else { + return solutionBuilder.Build() + } } -func tscCompilation(sys System, commandLine *tsoptions.ParsedCommandLine, testing bool) CommandLineResult { +func tscCompilation(sys System, commandLine *tsoptions.ParsedCommandLine, testing CommandLineTesting) CommandLineResult { configFileName := "" reportDiagnostic := createDiagnosticReporter(sys, commandLine.CompilerOptions()) // if commandLine.Options().Locale != nil @@ -236,11 +210,11 @@ func tscCompilation(sys System, commandLine *tsoptions.ParsedCommandLine, testin compilerOptionsFromCommandLine := commandLine.CompilerOptions() configForCompilation := commandLine var extendedConfigCache collections.SyncMap[tspath.Path, *tsoptions.ExtendedConfigCacheEntry] - var configTime time.Duration + var compileTimes compileTimes if configFileName != "" { configStart := sys.Now() configParseResult, errors := tsoptions.GetParsedCommandLineOfConfigFile(configFileName, compilerOptionsFromCommandLine, sys, &extendedConfigCache) - configTime = sys.Now().Sub(configStart) + compileTimes.configTime = sys.Now().Sub(configStart) if len(errors) != 0 { // these are unrecoverable errors--exit to report them as diagnostics for _, e := range errors { @@ -253,12 +227,13 @@ func tscCompilation(sys System, commandLine *tsoptions.ParsedCommandLine, testin reportDiagnostic = createDiagnosticReporter(sys, commandLine.CompilerOptions()) } + reportErrorSummary := createReportErrorSummary(sys, configForCompilation.CompilerOptions()) if compilerOptionsFromCommandLine.ShowConfig.IsTrue() { showConfig(sys, configForCompilation.CompilerOptions()) return CommandLineResult{Status: ExitStatusSuccess} } if configForCompilation.CompilerOptions().Watch.IsTrue() { - watcher := createWatcher(sys, configForCompilation, reportDiagnostic, testing) + watcher := createWatcher(sys, configForCompilation, reportDiagnostic, reportErrorSummary, testing) watcher.start() return CommandLineResult{Status: ExitStatusSuccess, Watcher: watcher} } else if configForCompilation.CompilerOptions().IsIncremental() { @@ -266,8 +241,9 @@ func tscCompilation(sys System, commandLine *tsoptions.ParsedCommandLine, testin sys, configForCompilation, reportDiagnostic, + reportErrorSummary, &extendedConfigCache, - configTime, + compileTimes, testing, ) } @@ -275,8 +251,10 @@ func tscCompilation(sys System, commandLine *tsoptions.ParsedCommandLine, testin sys, configForCompilation, reportDiagnostic, + reportErrorSummary, &extendedConfigCache, - configTime, + compileTimes, + testing, ) } @@ -298,14 +276,15 @@ func performIncrementalCompilation( sys System, config *tsoptions.ParsedCommandLine, reportDiagnostic diagnosticReporter, + reportErrorSummary diagnosticsReporter, extendedConfigCache *collections.SyncMap[tspath.Path, *tsoptions.ExtendedConfigCacheEntry], - configTime time.Duration, - testing bool, + compileTimes compileTimes, + testing CommandLineTesting, ) CommandLineResult { host := compiler.NewCachedFSCompilerHost(sys.GetCurrentDirectory(), sys.FS(), sys.DefaultLibraryPath(), extendedConfigCache) buildInfoReadStart := sys.Now() oldProgram := incremental.ReadBuildInfoProgram(config, incremental.NewBuildInfoReader(host)) - buildInfoReadTime := sys.Now().Sub(buildInfoReadStart) + compileTimes.buildInfoReadTime = sys.Now().Sub(buildInfoReadStart) // todo: cache, statistics, tracing parseStart := sys.Now() program := compiler.NewProgram(compiler.ProgramOptions{ @@ -313,24 +292,24 @@ func performIncrementalCompilation( Host: host, JSDocParsingMode: ast.JSDocParsingModeParseForTypeErrors, }) - parseTime := sys.Now().Sub(parseStart) + compileTimes.parseTime = sys.Now().Sub(parseStart) changesComputeStart := sys.Now() - incrementalProgram := incremental.NewProgram(program, oldProgram, testing) - changesComputeTime := sys.Now().Sub(changesComputeStart) + incrementalProgram := incremental.NewProgram(program, oldProgram, testing != nil) + compileTimes.changesComputeTime = sys.Now().Sub(changesComputeStart) + result, _ := emitAndReportStatistics( + sys, + incrementalProgram, + incrementalProgram.GetProgram(), + config, + reportDiagnostic, + reportErrorSummary, + sys.Writer(), + compileTimes, + testing, + ) return CommandLineResult{ - Status: emitAndReportStatistics( - sys, - incrementalProgram, - incrementalProgram.GetProgram(), - config, - reportDiagnostic, - configTime, - parseTime, - - buildInfoReadTime, - changesComputeTime, - ), - IncrementalProgram: incrementalProgram, + Status: result.status, + IncrementalProgram: []*incremental.Program{incrementalProgram}, } } @@ -338,8 +317,10 @@ func performCompilation( sys System, config *tsoptions.ParsedCommandLine, reportDiagnostic diagnosticReporter, + reportErrorSummary diagnosticsReporter, extendedConfigCache *collections.SyncMap[tspath.Path, *tsoptions.ExtendedConfigCacheEntry], - configTime time.Duration, + compileTimes compileTimes, + testing CommandLineTesting, ) CommandLineResult { host := compiler.NewCachedFSCompilerHost(sys.GetCurrentDirectory(), sys.FS(), sys.DefaultLibraryPath(), extendedConfigCache) // todo: cache, statistics, tracing @@ -349,19 +330,20 @@ func performCompilation( Host: host, JSDocParsingMode: ast.JSDocParsingModeParseForTypeErrors, }) - parseTime := sys.Now().Sub(parseStart) + compileTimes.parseTime = sys.Now().Sub(parseStart) + result, _ := emitAndReportStatistics( + sys, + program, + program, + config, + reportDiagnostic, + reportErrorSummary, + sys.Writer(), + compileTimes, + testing, + ) return CommandLineResult{ - Status: emitAndReportStatistics( - sys, - program, - program, - config, - reportDiagnostic, - configTime, - parseTime, - 0, - 0, - ), + Status: result.status, } } @@ -371,22 +353,18 @@ func emitAndReportStatistics( program *compiler.Program, config *tsoptions.ParsedCommandLine, reportDiagnostic diagnosticReporter, - configTime time.Duration, - parseTime time.Duration, - buildInfoReadTime time.Duration, - changesComputeTime time.Duration, -) ExitStatus { - result := emitFilesAndReportErrors(sys, programLike, reportDiagnostic) + reportErrorSummary diagnosticsReporter, + ioWriter io.Writer, + compileTimes compileTimes, + testing CommandLineTesting, +) (compileAndEmitResult, *statistics) { + var statistics *statistics + result := emitFilesAndReportErrors(sys, programLike, reportDiagnostic, reportErrorSummary, ioWriter, compileTimes, testing) if result.status != ExitStatusSuccess { // compile exited early - return result.status + return result, nil } - - result.configTime = configTime - result.parseTime = parseTime - result.buildInfoReadTime = buildInfoReadTime - result.changesComputeTime = changesComputeTime - result.totalTime = sys.SinceStart() + result.times.totalTime = sys.SinceStart() if config.CompilerOptions().Diagnostics.IsTrue() || config.CompilerOptions().ExtendedDiagnostics.IsTrue() { var memStats runtime.MemStats @@ -395,21 +373,19 @@ func emitAndReportStatistics( runtime.GC() runtime.ReadMemStats(&memStats) - reportStatistics(sys, program, result, &memStats) + statistics = statisticsFromProgram(program, &compileTimes, &memStats) + statistics.report(ioWriter, testing != nil) } if result.emitResult.EmitSkipped && len(result.diagnostics) > 0 { - return ExitStatusDiagnosticsPresent_OutputsSkipped + result.status = ExitStatusDiagnosticsPresent_OutputsSkipped } else if len(result.diagnostics) > 0 { - return ExitStatusDiagnosticsPresent_OutputsGenerated + result.status = ExitStatusDiagnosticsPresent_OutputsGenerated } - return ExitStatusSuccess + return result, statistics } -type compileAndEmitResult struct { - diagnostics []*ast.Diagnostic - emitResult *compiler.EmitResult - status ExitStatus +type compileTimes struct { configTime time.Duration parseTime time.Duration bindTime time.Duration @@ -419,12 +395,23 @@ type compileAndEmitResult struct { buildInfoReadTime time.Duration changesComputeTime time.Duration } +type compileAndEmitResult struct { + diagnostics []*ast.Diagnostic + emitResult *compiler.EmitResult + status ExitStatus + times compileTimes +} func emitFilesAndReportErrors( sys System, program compiler.ProgramLike, reportDiagnostic diagnosticReporter, + reportErrorSummary diagnosticsReporter, + ioWriter io.Writer, + compileTimes compileTimes, + testing CommandLineTesting, ) (result compileAndEmitResult) { + result.times = compileTimes ctx := context.Background() allDiagnostics := compiler.GetDiagnosticsOfAnyProgram( @@ -438,13 +425,13 @@ func emitFilesAndReportErrors( // early so we can track the time. bindStart := sys.Now() diags := program.GetBindDiagnostics(ctx, file) - result.bindTime = sys.Now().Sub(bindStart) + result.times.bindTime = sys.Now().Sub(bindStart) return diags }, func(ctx context.Context, file *ast.SourceFile) []*ast.Diagnostic { checkStart := sys.Now() diags := program.GetSemanticDiagnostics(ctx, file) - result.checkTime = sys.Now().Sub(checkStart) + result.times.checkTime = sys.Now().Sub(checkStart) return diags }, ) @@ -453,25 +440,30 @@ func emitFilesAndReportErrors( if !program.Options().ListFilesOnly.IsTrue() { emitStart := sys.Now() emitResult = program.Emit(ctx, compiler.EmitOptions{}) - result.emitTime = sys.Now().Sub(emitStart) + result.times.emitTime = sys.Now().Sub(emitStart) } if emitResult != nil { allDiagnostics = append(allDiagnostics, emitResult.Diagnostics...) } + if testing != nil { + testing.OnEmittedFiles(emitResult) + } allDiagnostics = compiler.SortAndDeduplicateDiagnostics(allDiagnostics) for _, diagnostic := range allDiagnostics { reportDiagnostic(diagnostic) } - if sys.Writer() != nil { - for _, file := range emitResult.EmittedFiles { - fmt.Fprintln(sys.Writer(), "TSFILE: ", tspath.GetNormalizedAbsolutePath(file, sys.GetCurrentDirectory())) + if ioWriter != nil { + if program.Options().ListEmittedFiles.IsTrue() { + for _, file := range emitResult.EmittedFiles { + fmt.Fprintln(ioWriter, "TSFILE: ", tspath.GetNormalizedAbsolutePath(file, sys.GetCurrentDirectory())) + } } - listFiles(sys, program) + listFiles(ioWriter, program) } - createReportErrorSummary(sys, program.Options())(allDiagnostics) + reportErrorSummary(allDiagnostics) result.diagnostics = allDiagnostics result.emitResult = emitResult result.status = ExitStatusSuccess @@ -487,12 +479,12 @@ func showConfig(sys System, config *core.CompilerOptions) { _ = jsonutil.MarshalIndentWrite(sys.Writer(), config, "", " ") } -func listFiles(sys System, program compiler.ProgramLike) { +func listFiles(ioWriter io.Writer, program compiler.ProgramLike) { options := program.Options() // !!! explainFiles if options.ListFiles.IsTrue() || options.ListFilesOnly.IsTrue() { for _, file := range program.GetSourceFiles() { - fmt.Fprintln(sys.Writer(), file.FileName()) + fmt.Fprintln(ioWriter, file.FileName()) } } } diff --git a/internal/execute/tscbuild_test.go b/internal/execute/tscbuild_test.go index 297b824dd6..c2a82f23d8 100644 --- a/internal/execute/tscbuild_test.go +++ b/internal/execute/tscbuild_test.go @@ -1,20 +1,1180 @@ package execute_test import ( + "fmt" + "slices" + "strings" "testing" + + "github.com/microsoft/typescript-go/internal/core" + "github.com/microsoft/typescript-go/internal/testutil/stringtestutil" + "github.com/microsoft/typescript-go/internal/vfs/vfstest" ) func TestBuildCommandLine(t *testing.T) { + t.Parallel() + testCases := slices.Concat( + []*tscInput{ + { + subScenario: "help", + files: FileMap{}, + commandLineArgs: []string{"--build", "--help"}, + }, + { + subScenario: "different options", + files: getCommandLineDifferentOptionsMap("composite"), + commandLineArgs: []string{"--build", "--verbose"}, + edits: []*testTscEdit{ + { + caption: "with sourceMap", + commandLineArgs: []string{"--build", "--verbose", "--sourceMap"}, + }, + { + caption: "should re-emit only js so they dont contain sourcemap", + }, + { + caption: "with declaration should not emit anything", + commandLineArgs: []string{"--build", "--verbose", "--declaration"}, + }, + noChange, + { + caption: "with declaration and declarationMap", + commandLineArgs: []string{"--build", "--verbose", "--declaration", "--declarationMap"}, + }, + { + caption: "should re-emit only dts so they dont contain sourcemap", + }, + { + caption: "with emitDeclarationOnly should not emit anything", + commandLineArgs: []string{"--build", "--verbose", "--emitDeclarationOnly"}, + }, + noChange, + { + caption: "local change", + edit: func(sys *testSys) { + sys.replaceFileText("/home/src/workspaces/project/a.ts", "Local = 1", "Local = 10") + }, + }, + { + caption: "with declaration should not emit anything", + commandLineArgs: []string{"--build", "--verbose", "--declaration"}, + }, + { + caption: "with inlineSourceMap", + commandLineArgs: []string{"--build", "--verbose", "--inlineSourceMap"}, + }, + { + caption: "with sourceMap", + commandLineArgs: []string{"--build", "--verbose", "--sourceMap"}, + }, + }, + }, + { + subScenario: "different options with incremental", + files: getCommandLineDifferentOptionsMap("incremental"), + commandLineArgs: []string{"--build", "--verbose"}, + edits: []*testTscEdit{ + { + caption: "with sourceMap", + commandLineArgs: []string{"--build", "--verbose", "--sourceMap"}, + }, + { + caption: "should re-emit only js so they dont contain sourcemap", + }, + { + caption: "with declaration, emit Dts and should not emit js", + commandLineArgs: []string{"--build", "--verbose", "--declaration"}, + }, + { + caption: "with declaration and declarationMap", + commandLineArgs: []string{"--build", "--verbose", "--declaration", "--declarationMap"}, + }, + noChange, + { + caption: "local change", + edit: func(sys *testSys) { + sys.replaceFileText("/home/src/workspaces/project/a.ts", "Local = 1", "Local = 10") + }, + }, + { + caption: "with declaration and declarationMap", + commandLineArgs: []string{"--build", "--verbose", "--declaration", "--declarationMap"}, + }, + noChange, + { + caption: "with inlineSourceMap", + commandLineArgs: []string{"--build", "--verbose", "--inlineSourceMap"}, + }, + { + caption: "with sourceMap", + commandLineArgs: []string{"--build", "--verbose", "--sourceMap"}, + }, + { + caption: "emit js files", + }, + { + caption: "with declaration and declarationMap", + commandLineArgs: []string{"--build", "--verbose", "--declaration", "--declarationMap"}, + }, + { + caption: "with declaration and declarationMap, should not re-emit", + commandLineArgs: []string{"--build", "--verbose", "--declaration", "--declarationMap"}, + }, + }, + }, + }, + getCommandLineEmitDeclarationOnlyTestCases([]string{"composite"}, ""), + getCommandLineEmitDeclarationOnlyTestCases([]string{"incremental", "declaration"}, " with declaration and incremental"), + getCommandLineEmitDeclarationOnlyTestCases([]string{"declaration"}, " with declaration"), + ) + + for _, test := range testCases { + test.run(t, "commandLine") + } +} + +func TestBuildClean(t *testing.T) { + t.Parallel() + testCases := []*tscInput{ + { + subScenario: "file name and output name clashing", + files: FileMap{ + "/home/src/workspaces/solution/index.js": "", + "/home/src/workspaces/solution/bar.ts": "", + "/home/src/workspaces/solution/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { "allowJs": true } + }`), + }, + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "--clean"}, + }, + { + subScenario: "tsx with dts emit", + files: FileMap{ + "/home/src/workspaces/solution/project/src/main.tsx": "export const x = 10;", + "/home/src/workspaces/solution/project/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { "declaration": true }, + "include": ["src/**/*.tsx", "src/**/*.ts"] + }`), + }, + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "project", "-v", "--explainFiles"}, + edits: []*testTscEdit{ + noChange, + { + caption: "clean build", + commandLineArgs: []string{"-b", "project", "--clean"}, + }, + }, + }, + } + + for _, test := range testCases { + test.run(t, "clean") + } +} + +func TestBuildConfigFileErrors(t *testing.T) { t.Parallel() testCases := []*tscInput{ { - subScenario: "help", + subScenario: "when tsconfig extends the missing file", + files: FileMap{ + "/home/src/workspaces/project/tsconfig.first.json": stringtestutil.Dedent(` + { + "extends": "./foobar.json", + "compilerOptions": { + "composite": true + } + }`), + "/home/src/workspaces/project/tsconfig.second.json": stringtestutil.Dedent(` + { + "extends": "./foobar.json", + "compilerOptions": { + "composite": true + } + }`), + "/home/src/workspaces/project/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "./tsconfig.first.json" }, + { "path": "./tsconfig.second.json" } + ] + }`), + }, + commandLineArgs: []string{"--b"}, + }, + { + 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"}, + edits: []*testTscEdit{ + { + 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() { }") + }, + }, + noChange, + { + 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) + }, + }, + }, + }, + { + subScenario: "missing config file", files: FileMap{}, - commandLineArgs: []string{"--build", "--help"}, + commandLineArgs: []string{"--b", "bogus.json"}, }, } for _, test := range testCases { - test.run(t, "commandLine") + test.run(t, "configFileErrors") + } +} + +func TestConfigFileExtends(t *testing.T) { + t.Parallel() + testCases := []*tscInput{ + { + subScenario: "when building solution with projects extends config with include", + files: getConfigFileExtendsFileMap(), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "--v", "--listFiles"}, + }, + { + subScenario: "when building project uses reference and both extend config with include", + files: getConfigFileExtendsFileMap(), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "webpack/tsconfig.json", "--v", "--listFiles"}, + }, + { + subScenario: "resolves the symlink path", + files: FileMap{ + "/users/user/projects/myconfigs/node_modules/@something/tsconfig-node/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "@something/tsconfig-base/tsconfig.json", + "compilerOptions": { + "removeComments": true + } + } + `), + "/users/user/projects/myconfigs/node_modules/@something/tsconfig-base/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { "composite": true } + } + `), + "/users/user/projects/myproject/src/index.ts": stringtestutil.Dedent(` + // some comment + export const x = 10; + `), + "/users/user/projects/myproject/src/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "@something/tsconfig-node/tsconfig.json" + }`), + "/users/user/projects/myproject/node_modules/@something/tsconfig-node": vfstest.Symlink("/users/user/projects/myconfigs/node_modules/@something/tsconfig-node"), + }, + cwd: "/users/user/projects/myproject", + commandLineArgs: []string{"--b", "src", "--extendedDiagnostics"}, + }, + { + subScenario: "configDir template", + files: FileMap{ + "/home/src/projects/configs/first/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "../second/tsconfig.json", + "include": ["${configDir}/src"], + "compilerOptions": { + "typeRoots": ["root1", "${configDir}/root2", "root3"], + "types": [], + }, + }`), + "/home/src/projects/configs/second/tsconfig.json": stringtestutil.Dedent(` + { + "files": ["${configDir}/main.ts"], + "compilerOptions": { + "declarationDir": "${configDir}/decls", + "paths": { + "@myscope/*": ["${configDir}/types/*"], + }, + }, + "watchOptions": { + "excludeFiles": ["${configDir}/main.ts"], + }, + }`), + "/home/src/projects/myproject/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "../configs/first/tsconfig.json", + "compilerOptions": { + "declaration": true, + "outDir": "outDir", + "traceResolution": true, + }, + }`), + "/home/src/projects/myproject/main.ts": stringtestutil.Dedent(` + // some comment + export const y = 10; + import { x } from "@myscope/sometype"; + `), + "/home/src/projects/myproject/types/sometype.ts": stringtestutil.Dedent(` + export const x = 10; + `), + }, + cwd: "/home/src/projects/myproject", + commandLineArgs: []string{"--b", "--explainFiles", "--v"}, + }, + } + + for _, test := range testCases { + test.run(t, "configFileExtends") + } +} + +func TestDeclarationEmit(t *testing.T) { + t.Parallel() + testCases := []*tscInput{ + { + subScenario: "when declaration file is referenced through triple slash", + files: getDeclarationEmitDtsReferenceAsTrippleSlashMap(), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "--verbose"}, + }, + { + subScenario: "when declaration file is referenced through triple slash but uses no references", + files: getDeclarationEmitDtsReferenceAsTrippleSlashMapNoRef(), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "--verbose"}, + }, + { + subScenario: "when declaration file used inferred type from referenced project", + files: FileMap{ + "/home/src/workspaces/project/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, + "paths": { "@fluentui/*": ["./packages/*/src"] }, + }, + }`), + "/home/src/workspaces/project/packages/pkg1/src/index.ts": stringtestutil.Dedent(` + export interface IThing { + a: string; + } + export interface IThings { + thing1: IThing; + } + `), + "/home/src/workspaces/project/packages/pkg1/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "../../tsconfig", + "compilerOptions": { "outDir": "lib" }, + "include": ["src"], + } + `), + "/home/src/workspaces/project/packages/pkg2/src/index.ts": stringtestutil.Dedent(` + import { IThings } from '@fluentui/pkg1'; + export function fn4() { + const a: IThings = { thing1: { a: 'b' } }; + return a.thing1; + } + `), + "/home/src/workspaces/project/packages/pkg2/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "../../tsconfig", + "compilerOptions": { "outDir": "lib" }, + "include": ["src"], + "references": [{ "path": "../pkg1" }], + } + `), + }, + commandLineArgs: []string{"--b", "packages/pkg2/tsconfig.json", "--verbose"}, + }, + { + subScenario: "reports dts generation errors", + files: getDeclarationEmitDtsErrorsFileMap(false), + commandLineArgs: []string{"-b", "--explainFiles", "--listEmittedFiles", "--v"}, + edits: noChangeOnlyEdit, + }, + { + subScenario: "reports dts generation errors with incremental", + files: getDeclarationEmitDtsErrorsFileMap(true), + commandLineArgs: []string{"-b", "--explainFiles", "--listEmittedFiles", "--v"}, + edits: noChangeOnlyEdit, + }, + } + + for _, test := range testCases { + test.run(t, "declarationEmit") + } +} + +func TestBuildDemoProject(t *testing.T) { + t.Parallel() + testCases := []*tscInput{ + { + subScenario: "in master branch with everything setup correctly and reports no error", + files: getDemoFileMap(), + cwd: "/user/username/projects/demo", + commandLineArgs: []string{"--b", "--verbose"}, + edits: noChangeOnlyEdit, + }, + { + subScenario: "in circular branch reports the error about it by stopping build", + files: getDemoCircularFileMap(), + cwd: "/user/username/projects/demo", + commandLineArgs: []string{"--b", "--verbose"}, + }, + { + subScenario: "in bad-ref branch reports the error about files not in rootDir at the import location", + files: getDemoBadRefFileMap(), + cwd: "/user/username/projects/demo", + commandLineArgs: []string{"--b", "--verbose"}, + }, + } + + for _, test := range testCases { + test.run(t, "demo") + } +} + +func TestEmitDeclarationOnly(t *testing.T) { + t.Parallel() + testCases := []*tscInput{ + getEmitDeclarationOnlyTestCase(false), + getEmitDeclarationOnlyTestCase(true), + { + subScenario: `only dts output in non circular imports project with emitDeclarationOnly`, + files: getEmitDeclarationOnlyNonCircularImportFileMap(), + commandLineArgs: []string{"--b", "--verbose"}, + edits: []*testTscEdit{ + { + caption: "incremental-declaration-doesnt-change", + edit: func(sys *testSys) { + sys.replaceFileText( + "/home/src/workspaces/project/src/a.ts", + "export interface A {", + stringtestutil.Dedent(` + class C { } + export interface A {`), + ) + }, + }, + { + caption: "incremental-declaration-changes", + edit: func(sys *testSys) { + sys.replaceFileText("/home/src/workspaces/project/src/a.ts", "b: B;", "b: B; foo: any;") + }, + }, + }, + }, + } + + for _, test := range testCases { + test.run(t, "emitDeclarationOnly") + } +} + +func TestSolutionProject(t *testing.T) { + t.Parallel() + testCases := []*tscInput{ + { + subScenario: "verify that subsequent builds after initial build doesnt build anything", + files: FileMap{ + "/home/src/workspaces/solution/src/folder/index.ts": `export const x = 10;`, + "/home/src/workspaces/solution/src/folder/tsconfig.json": stringtestutil.Dedent(` + { + "files": ["index.ts"], + "compilerOptions": { + "composite": true + } + } + `), + "/home/src/workspaces/solution/src/folder2/index.ts": `export const x = 10;`, + "/home/src/workspaces/solution/src/folder2/tsconfig.json": stringtestutil.Dedent(` + { + "files": ["index.ts"], + "compilerOptions": { + "composite": true + } + } + `), + "/home/src/workspaces/solution/src/tsconfig.json": stringtestutil.Dedent(` + { + "files": [], + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "./folder" }, + { "path": "./folder2" }, + ] + }`), + "/home/src/workspaces/solution/tests/index.ts": `export const x = 10;`, + "/home/src/workspaces/solution/tests/tsconfig.json": stringtestutil.Dedent(` + { + "files": ["index.ts"], + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "../src" } + ] + } + `), + "/home/src/workspaces/solution/tsconfig.json": stringtestutil.Dedent(` + { + "files": [], + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "./src" }, + { "path": "./tests" } + ] + } + `), + }, + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "--v"}, + edits: noChangeOnlyEdit, + }, + { + subScenario: "when solution is referenced indirectly", + files: FileMap{ + "/home/src/workspaces/solution/project1/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { "composite": true }, + "references": [] + } + `), + "/home/src/workspaces/solution/project2/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { "composite": true }, + "references": [] + } + `), + "/home/src/workspaces/solution/project2/src/b.ts": "export const b = 10;", + "/home/src/workspaces/solution/project3/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { "composite": true }, + "references": [ + { "path": "../project1" }, + { "path": "../project2" } + ] + } + `), + "/home/src/workspaces/solution/project3/src/c.ts": "export const c = 10;", + "/home/src/workspaces/solution/project4/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { "composite": true }, + "references": [{ "path": "../project3" }] + } + `), + "/home/src/workspaces/solution/project4/src/d.ts": "export const d = 10;", + }, + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "project4", "--verbose", "--explainFiles"}, + edits: []*testTscEdit{ + { + caption: "modify project3 file", + edit: func(sys *testSys) { + sys.replaceFileText("/home/src/workspaces/solution/project3/src/c.ts", "c = ", "cc = ") + }, + }, + }, + }, + { + subScenario: "has empty files diagnostic when files is empty and no references are provided", + files: FileMap{ + "/home/src/workspaces/solution/no-references/tsconfig.json": stringtestutil.Dedent(` + { + "references": [], + "files": [], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + }, + }`), + }, + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "no-references"}, + }, + { + subScenario: "does not have empty files diagnostic when files is empty and references are provided", + files: FileMap{ + "/home/src/workspaces/solution/core/index.ts": "export function multiply(a: number, b: number) { return a * b; }", + "/home/src/workspaces/solution/core/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, + }`), + "/home/src/workspaces/solution/with-references/tsconfig.json": stringtestutil.Dedent(` + { + "references": [ + { "path": "../core" }, + ], + "files": [], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + }, + }`), + }, + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "with-references"}, + }, + } + + for _, test := range testCases { + test.run(t, "solution") + } +} + +func getCommandLineDifferentOptionsMap(optionName string) FileMap { + return FileMap{ + "/home/src/workspaces/project/tsconfig.json": stringtestutil.Dedent(fmt.Sprintf(` + { + "compilerOptions": { + "%s": true + } + }`, optionName)), + "/home/src/workspaces/project/a.ts": `export const a = 10;const aLocal = 10;`, + "/home/src/workspaces/project/b.ts": `export const b = 10;const bLocal = 10;`, + "/home/src/workspaces/project/c.ts": `import { a } from "./a";export const c = a;`, + "/home/src/workspaces/project/d.ts": `import { b } from "./b";export const d = b;`, + } +} + +func getCommandLineEmitDeclarationOnlyMap(options []string) FileMap { + compilerOptionsStr := strings.Join(core.Map(options, func(opt string) string { + return fmt.Sprintf(`"%s": true`, opt) + }), ", ") + return FileMap{ + "/home/src/workspaces/solution/project1/src/tsconfig.json": stringtestutil.Dedent(fmt.Sprintf(` + { + "compilerOptions": { %s } + }`, compilerOptionsStr)), + "/home/src/workspaces/solution/project1/src/a.ts": `export const a = 10;const aLocal = 10;`, + "/home/src/workspaces/solution/project1/src/b.ts": `export const b = 10;const bLocal = 10;`, + "/home/src/workspaces/solution/project1/src/c.ts": `import { a } from "./a";export const c = a;`, + "/home/src/workspaces/solution/project1/src/d.ts": `import { b } from "./b";export const d = b;`, + "/home/src/workspaces/solution/project2/src/tsconfig.json": stringtestutil.Dedent(fmt.Sprintf(` + { + "compilerOptions": { %s }, + "references": [{ "path": "../../project1/src" }] + }`, compilerOptionsStr)), + "/home/src/workspaces/solution/project2/src/e.ts": `export const e = 10;`, + "/home/src/workspaces/solution/project2/src/f.ts": `import { a } from "../../project1/src/a"; export const f = a;`, + "/home/src/workspaces/solution/project2/src/g.ts": `import { b } from "../../project1/src/b"; export const g = b;`, + } +} + +func getCommandLineEmitDeclarationOnlyTestCases(options []string, suffix string) []*tscInput { + return []*tscInput{ + { + subScenario: "emitDeclarationOnly on commandline" + suffix, + files: getCommandLineEmitDeclarationOnlyMap(options), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly"}, + edits: []*testTscEdit{ + noChange, + { + caption: "local change", + edit: func(sys *testSys) { + sys.appendFile("/home/src/workspaces/solution/project1/src/a.ts", "const aa = 10;") + }, + }, + { + caption: "non local change", + edit: func(sys *testSys) { + sys.appendFile("/home/src/workspaces/solution/project1/src/a.ts", "export const aaa = 10;") + }, + }, + { + caption: "emit js files", + commandLineArgs: []string{"--b", "project2/src", "--verbose"}, + }, + noChange, + { + caption: "js emit with change without emitDeclarationOnly", + edit: func(sys *testSys) { + sys.appendFile("/home/src/workspaces/solution/project1/src/b.ts", "const alocal = 10;") + }, + commandLineArgs: []string{"--b", "project2/src", "--verbose"}, + }, + { + caption: "local change", + edit: func(sys *testSys) { + sys.appendFile("/home/src/workspaces/solution/project1/src/b.ts", "const aaaa = 10;") + }, + }, + { + caption: "non local change", + edit: func(sys *testSys) { + sys.appendFile("/home/src/workspaces/solution/project1/src/b.ts", "export const aaaaa = 10;") + }, + }, + { + caption: "js emit with change without emitDeclarationOnly", + edit: func(sys *testSys) { + sys.appendFile("/home/src/workspaces/solution/project1/src/b.ts", "export const a2 = 10;") + }, + commandLineArgs: []string{"--b", "project2/src", "--verbose"}, + }, + }, + }, + { + subScenario: "emitDeclarationOnly false on commandline" + suffix, + files: getCommandLineEmitDeclarationOnlyMap(slices.Concat(options, []string{"emitDeclarationOnly"})), + cwd: "/home/src/workspaces/solution", + commandLineArgs: []string{"--b", "project2/src", "--verbose"}, + edits: []*testTscEdit{ + noChange, + { + caption: "change", + edit: func(sys *testSys) { + sys.appendFile("/home/src/workspaces/solution/project1/src/a.ts", "const aa = 10;") + }, + }, + { + caption: "emit js files", + commandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly", "false"}, + }, + noChange, + { + caption: "no change run with js emit", + commandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly", "false"}, + }, + { + caption: "js emit with change", + edit: func(sys *testSys) { + sys.appendFile("/home/src/workspaces/solution/project1/src/b.ts", "const blocal = 10;") + }, + commandLineArgs: []string{"--b", "project2/src", "--verbose", "--emitDeclarationOnly", "false"}, + }, + }, + }, + } +} + +func getConfigFileExtendsFileMap() FileMap { + return FileMap{ + "/home/src/workspaces/solution/tsconfig.json": stringtestutil.Dedent(` + { + "references": [ + { "path": "./shared/tsconfig.json" }, + { "path": "./webpack/tsconfig.json" }, + ], + "files": [], + }`), + "/home/src/workspaces/solution/shared/tsconfig-base.json": stringtestutil.Dedent(` + { + "include": ["./typings-base/"], + }`), + "/home/src/workspaces/solution/shared/typings-base/globals.d.ts": `type Unrestricted = any;`, + "/home/src/workspaces/solution/shared/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "./tsconfig-base.json", + "compilerOptions": { + "composite": true, + "outDir": "../target-tsc-build/", + "rootDir": "..", + }, + "files": ["./index.ts"], + }`), + "/home/src/workspaces/solution/shared/index.ts": `export const a: Unrestricted = 1;`, + "/home/src/workspaces/solution/webpack/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "../shared/tsconfig-base.json", + "compilerOptions": { + "composite": true, + "outDir": "../target-tsc-build/", + "rootDir": "..", + }, + "files": ["./index.ts"], + "references": [{ "path": "../shared/tsconfig.json" }], + }`), + "/home/src/workspaces/solution/webpack/index.ts": `export const b: Unrestricted = 1;`, + } +} + +func getDeclarationEmitDtsReferenceAsTrippleSlashMap() FileMap { + return FileMap{ + "/home/src/workspaces/solution/tsconfig.base.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "rootDir": "./", + "outDir": "lib", + }, + }`), + "/home/src/workspaces/solution/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { "composite": true }, + "references": [{ "path": "./src" }], + "include": [], + }`), + "/home/src/workspaces/solution/src/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { "composite": true }, + "references": [{ "path": "./subProject" }, { "path": "./subProject2" }], + "include": [], + }`), + "/home/src/workspaces/solution/src/subProject/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "references": [{ "path": "../common" }], + "include": ["./index.ts"], + }`), + "/home/src/workspaces/solution/src/subProject/index.ts": stringtestutil.Dedent(` + import { Nominal } from '../common/nominal'; + export type MyNominal = Nominal;`), + "/home/src/workspaces/solution/src/subProject2/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "references": [{ "path": "../subProject" }], + "include": ["./index.ts"], + }`), + "/home/src/workspaces/solution/src/subProject2/index.ts": stringtestutil.Dedent(` + import { MyNominal } from '../subProject/index'; + const variable = { + key: 'value' as MyNominal, + }; + export function getVar(): keyof typeof variable { + return 'key'; + }`), + "/home/src/workspaces/solution/src/common/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "include": ["./nominal.ts"], + }`), + "/home/src/workspaces/solution/src/common/nominal.ts": stringtestutil.Dedent(` + /// + export declare type Nominal = MyNominal;`), + "/home/src/workspaces/solution/src/common/types.d.ts": stringtestutil.Dedent(` + declare type MyNominal = T & { + specialKey: Name; + };`), + } +} + +func getDeclarationEmitDtsReferenceAsTrippleSlashMapNoRef() FileMap { + files := getDeclarationEmitDtsReferenceAsTrippleSlashMap() + files["/home/src/workspaces/solution/tsconfig.json"] = stringtestutil.Dedent(` + { + "extends": "./tsconfig.base.json", + "compilerOptions": { "composite": true }, + "include": ["./src/**/*.ts"], + }`) + return files +} + +func getDeclarationEmitDtsErrorsFileMap(incremental bool) FileMap { + return FileMap{ + "/home/src/workspaces/project/tsconfig.json": stringtestutil.Dedent(fmt.Sprintf(` + { + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "incremental": %t, + "declaration": true, + "skipLibCheck": true, + "skipDefaultLibCheck": true, + }, + }`, incremental)), + "/home/src/workspaces/project/index.ts": stringtestutil.Dedent(` + import ky from 'ky'; + export const api = ky.extend({}); + `), + "/home/src/workspaces/project/package.json": stringtestutil.Dedent(` + { + "type": "module", + }`), + "/home/src/workspaces/project/node_modules/ky/distribution/index.d.ts": stringtestutil.Dedent(` + type KyInstance = { + extend(options: Record): KyInstance; + } + declare const ky: KyInstance; + export default ky; + `), + "/home/src/workspaces/project/node_modules/ky/package.json": stringtestutil.Dedent(` + { + "name": "ky", + "type": "module", + "main": "./distribution/index.js" + } + `), + } +} + +func getDemoFileMap() FileMap { + return FileMap{ + "/user/username/projects/demo/animals/animal.ts": stringtestutil.Dedent(` + export type Size = "small" | "medium" | "large"; + export default interface Animal { + size: Size; + } + `), + "/user/username/projects/demo/animals/dog.ts": stringtestutil.Dedent(` + 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": stringtestutil.Dedent(` + import Animal from './animal'; + + export default Animal; + import { createDog, Dog } from './dog'; + export { createDog, Dog }; + `), + "/user/username/projects/demo/animals/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/animals", + "rootDir": "." + }, + "references": [ + { "path": "../core" } + ] + } + `), + "/user/username/projects/demo/core/utilities.ts": stringtestutil.Dedent(` + + 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/core/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, + } + `), + "/user/username/projects/demo/zoo/zoo.ts": stringtestutil.Dedent(` + import { Dog, createDog } from '../animals/index'; + + export function createZoo(): Array { + return [ + createDog() + ]; + } + `), + "/user/username/projects/demo/zoo/tsconfig.json": stringtestutil.Dedent(` + { + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/zoo", + "rootDir": "." + }, + "references": [ + { + "path": "../animals" + } + ] + } + `), + "/user/username/projects/demo/tsconfig-base.json": stringtestutil.Dedent(` + { + "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": stringtestutil.Dedent(` + { + "files": [], + "references": [ + { + "path": "./core" + }, + { + "path": "./animals", + }, + { + "path": "./zoo", + }, + ], + } + `), } } + +func getDemoCircularFileMap() FileMap { + files := getDemoFileMap() + files["/user/username/projects/demo/core/tsconfig.json"] = stringtestutil.Dedent(` + { + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + }, + "references": [ + { + "path": "../zoo", + } + ] + } + `) + return files +} + +func getDemoBadRefFileMap() FileMap { + files := getDemoFileMap() + files["/user/username/projects/demo/core/utilities.ts"] = `import * as A from '../animals' +` + files["/user/username/projects/demo/core/utilities.ts"].(string) + return files +} + +func getEmitDeclarationOnlyCircularImportFileMap(declarationMap bool) FileMap { + return FileMap{ + "/home/src/workspaces/project/src/a.ts": stringtestutil.Dedent(` + import { B } from "./b"; + + export interface A { + b: B; + } + `), + "/home/src/workspaces/project/src/b.ts": stringtestutil.Dedent(` + import { C } from "./c"; + + export interface B { + b: C; + } + `), + "/home/src/workspaces/project/src/c.ts": stringtestutil.Dedent(` + import { A } from "./a"; + + export interface C { + a: A; + } + `), + "/home/src/workspaces/project/src/index.ts": stringtestutil.Dedent(` + export { A } from "./a"; + export { B } from "./b"; + export { C } from "./c"; + `), + "/home/src/workspaces/project/tsconfig.json": stringtestutil.Dedent(fmt.Sprintf(` + { + "compilerOptions": { + "incremental": true, + "target": "es5", + "module": "commonjs", + "declaration": true, + "declarationMap": %t, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "src", + "emitDeclarationOnly": true, + }, + }`, declarationMap)), + } +} + +func getEmitDeclarationOnlyTestCase(declarationMap bool) *tscInput { + return &tscInput{ + subScenario: `only dts output in circular import project with emitDeclarationOnly` + core.IfElse(declarationMap, " and declarationMap", ""), + files: getEmitDeclarationOnlyCircularImportFileMap(declarationMap), + commandLineArgs: []string{"--b", "--verbose"}, + edits: []*testTscEdit{ + { + caption: "incremental-declaration-changes", + edit: func(sys *testSys) { + sys.replaceFileText("/home/src/workspaces/project/src/a.ts", "b: B;", "b: B; foo: any;") + }, + }, + }, + } +} + +func getEmitDeclarationOnlyNonCircularImportFileMap() FileMap { + files := getEmitDeclarationOnlyCircularImportFileMap(true) + delete(files, "/home/src/workspaces/project/src/index.ts") + files["/home/src/workspaces/project/src/a.ts"] = stringtestutil.Dedent(` + export class B { prop = "hello"; } + + export interface A { + b: B; + } + `) + return files +} diff --git a/internal/execute/tsctestrunner_test.go b/internal/execute/tsctestrunner_test.go index 90a3bba99a..50610b30af 100644 --- a/internal/execute/tsctestrunner_test.go +++ b/internal/execute/tsctestrunner_test.go @@ -38,7 +38,7 @@ type tscInput struct { func (test *tscInput) executeCommand(sys *testSys, baselineBuilder *strings.Builder, commandLineArgs []string) execute.CommandLineResult { fmt.Fprint(baselineBuilder, "tsgo ", strings.Join(commandLineArgs, " "), "\n") - result := execute.CommandLine(sys, commandLineArgs, true) + result := execute.CommandLine(sys, commandLineArgs, sys) switch result.Status { case execute.ExitStatusSuccess: baselineBuilder.WriteString("ExitStatus:: Success") @@ -60,7 +60,7 @@ func (test *tscInput) executeCommand(sys *testSys, baselineBuilder *strings.Buil func (test *tscInput) run(t *testing.T, scenario string) { t.Helper() - t.Run(test.subScenario+" tsc baseline", func(t *testing.T) { + t.Run(test.subScenario, func(t *testing.T) { t.Parallel() // initial test tsc compile baselineBuilder := &strings.Builder{} @@ -76,7 +76,8 @@ func (test *tscInput) run(t *testing.T, scenario string) { sys.baselineFSwithDiff(baselineBuilder) result := test.executeCommand(sys, baselineBuilder, test.commandLineArgs) sys.serializeState(baselineBuilder) - sys.baselineProgram(baselineBuilder, result.IncrementalProgram, result.Watcher) + sys.baselinePrograms(baselineBuilder, result.IncrementalProgram, result.Watcher) + var hasUnexpectedIncrementalDiff bool for index, do := range test.edits { sys.clearOutput() @@ -97,7 +98,7 @@ func (test *tscInput) run(t *testing.T, scenario string) { result.Watcher.DoCycle() } sys.serializeState(baselineBuilder) - sys.baselineProgram(baselineBuilder, editResult.IncrementalProgram, result.Watcher) + sys.baselinePrograms(baselineBuilder, editResult.IncrementalProgram, result.Watcher) }) wg.Queue(func() { // Compute build with all the edits @@ -107,7 +108,7 @@ func (test *tscInput) run(t *testing.T, scenario string) { test.edits[i].edit(nonIncrementalSys) } } - execute.CommandLine(nonIncrementalSys, commandLineArgs, true) + execute.CommandLine(nonIncrementalSys, commandLineArgs, nonIncrementalSys) }) wg.RunAndWait() @@ -115,11 +116,18 @@ func (test *tscInput) run(t *testing.T, scenario string) { if diff != "" { baselineBuilder.WriteString(fmt.Sprintf("\n\nDiff:: %s\n", core.IfElse(do.expectedDiff == "", "!!! Unexpected diff, please review and either fix or write explanation as expectedDiff !!!", do.expectedDiff))) baselineBuilder.WriteString(diff) + if do.expectedDiff == "" { + hasUnexpectedIncrementalDiff = true + } } else if do.expectedDiff != "" { baselineBuilder.WriteString(fmt.Sprintf("\n\nDiff:: %s !!! Diff not found but explanation present, please review and remove the explanation !!!\n", do.expectedDiff)) + hasUnexpectedIncrementalDiff = true } } baseline.Run(t, strings.ReplaceAll(test.subScenario, " ", "-")+".js", baselineBuilder.String(), baseline.Options{Subfolder: filepath.Join(test.getBaselineSubFolder(), scenario)}) + if hasUnexpectedIncrementalDiff { + t.Errorf("Test %s has unexpected diff with incremental build, please review the baseline file", test.subScenario) + } }) } @@ -149,10 +157,10 @@ func getDiffForIncremental(incrementalSys *testSys, nonIncrementalSys *testSys) } } - incrementalErrors := strings.Join(incrementalSys.output, "") - nonIncrementalErrors := strings.Join(nonIncrementalSys.output, "") - if incrementalErrors != nonIncrementalErrors { - diffBuilder.WriteString(baseline.DiffText("nonIncremental errors.txt", "incremental errors.txt", nonIncrementalErrors, incrementalErrors)) + incrementalOutput := incrementalSys.getOutput(true) + nonIncrementalOutput := nonIncrementalSys.getOutput(true) + if incrementalOutput != nonIncrementalOutput { + diffBuilder.WriteString(baseline.DiffText("nonIncremental.output.txt", "incremental.output.txt", nonIncrementalOutput, incrementalOutput)) } return diffBuilder.String() } diff --git a/internal/execute/watcher.go b/internal/execute/watcher.go index 223bdc73fc..cfe5e82957 100644 --- a/internal/execute/watcher.go +++ b/internal/execute/watcher.go @@ -15,11 +15,12 @@ import ( ) type Watcher struct { - sys System - configFileName string - options *tsoptions.ParsedCommandLine - reportDiagnostic diagnosticReporter - testing bool + sys System + configFileName string + options *tsoptions.ParsedCommandLine + reportDiagnostic diagnosticReporter + reportErrorSummary diagnosticsReporter + testing CommandLineTesting host compiler.CompilerHost program *incremental.Program @@ -27,12 +28,13 @@ type Watcher struct { configModified bool } -func createWatcher(sys System, configParseResult *tsoptions.ParsedCommandLine, reportDiagnostic diagnosticReporter, testing bool) *Watcher { +func createWatcher(sys System, configParseResult *tsoptions.ParsedCommandLine, reportDiagnostic diagnosticReporter, reportErrorSummary diagnosticsReporter, testing CommandLineTesting) *Watcher { w := &Watcher{ - sys: sys, - options: configParseResult, - reportDiagnostic: reportDiagnostic, - testing: testing, + sys: sys, + options: configParseResult, + reportDiagnostic: reportDiagnostic, + reportErrorSummary: reportErrorSummary, + testing: testing, // reportWatchStatus: createWatchStatusReporter(sys, configParseResult.CompilerOptions().Pretty), } if configParseResult.ConfigFile != nil { @@ -45,7 +47,7 @@ func (w *Watcher) start() { w.host = compiler.NewCompilerHost(w.sys.GetCurrentDirectory(), w.sys.FS(), w.sys.DefaultLibraryPath(), nil) w.program = incremental.ReadBuildInfoProgram(w.options, incremental.NewBuildInfoReader(w.host)) - if !w.testing { + if w.testing == nil { watchInterval := 1000 * time.Millisecond if w.options.ParsedConfig.WatchOptions != nil { watchInterval = time.Duration(*w.options.ParsedConfig.WatchOptions.Interval) * time.Millisecond @@ -72,13 +74,13 @@ func (w *Watcher) DoCycle() { Config: w.options, Host: w.host, JSDocParsingMode: ast.JSDocParsingModeParseForTypeErrors, - }), w.program, w.testing) + }), w.program, w.testing != nil) if w.hasBeenModified(w.program.GetProgram()) { - fmt.Fprintln(w.sys.Writer(), "build starting at ", w.sys.Now()) + fmt.Fprintln(w.sys.Writer(), "build starting at", w.sys.Now().Format("03:04:05 PM")) timeStart := w.sys.Now() w.compileAndEmit() - fmt.Fprintln(w.sys.Writer(), "build finished in ", w.sys.Now().Sub(timeStart)) + fmt.Fprintf(w.sys.Writer(), "build finished in %.3fs\n", w.sys.Now().Sub(timeStart).Seconds()) } else { // print something??? // fmt.Fprintln(w.sys.Writer(), "no changes detected at ", w.sys.Now()) @@ -88,7 +90,7 @@ func (w *Watcher) DoCycle() { func (w *Watcher) compileAndEmit() { // !!! output/error reporting is currently the same as non-watch mode // diagnostics, emitResult, exitStatus := - emitFilesAndReportErrors(w.sys, w.program, w.reportDiagnostic) + emitFilesAndReportErrors(w.sys, w.program, w.reportDiagnostic, w.reportErrorSummary, w.sys.Writer(), compileTimes{}, w.testing) } func (w *Watcher) hasErrorsInTsConfig() bool { diff --git a/internal/incremental/buildInfo.go b/internal/incremental/buildInfo.go index bf537e0084..3dea19b86b 100644 --- a/internal/incremental/buildInfo.go +++ b/internal/incremental/buildInfo.go @@ -2,6 +2,8 @@ package incremental import ( "fmt" + "iter" + "maps" "github.com/go-json-experiment/json" "github.com/go-json-experiment/json/jsontext" @@ -17,52 +19,56 @@ type ( BuildInfoFileIdListId int ) -// /** -// * buildInfoRoot is -// * for incremental program buildinfo -// * - start and end of FileId for consecutive fileIds to be included as root -// * - single fileId that is root -// * for non incremental program buildinfo -// * - string that is the root file name -// */ -// type BuildInfoRoot struct { -// StartEnd *[2]BuildInfoFileId -// Single BuildInfoFileId -// nonIncremental string -// } - -// func (o BuildInfoRoot) MarshalJSON() ([]byte, error) { -// if o.StartEnd != nil { -// return json.Marshal(o.StartEnd) -// } -// if o.Single != 0 { -// return json.Marshal(o.Single) -// } -// if o.nonIncremental != "" { -// return json.Marshal(o.nonIncremental) -// } -// panic("unknown BuildInfoRoot type") -// } - -// func (o *BuildInfoRoot) UnmarshalJSON(data []byte) error { -// *o = BuildInfoRoot{} -// var vStartEnd [2]BuildInfoFileId -// if err := json.Unmarshal(data, &vStartEnd); err == nil { -// o.StartEnd = &vStartEnd -// return nil -// } -// var vSingle BuildInfoFileId -// if err := json.Unmarshal(data, &vSingle); err == nil { -// o.Single = vSingle -// return nil -// } -// var vNonIncremental string -// if err := json.Unmarshal(data, &vNonIncremental); err == nil { -// o.nonIncremental = vNonIncremental -// return nil -// } -// return fmt.Errorf("invalid BuildInfoRoot: %s", data) -// } +// buildInfoRoot is +// - for incremental program buildinfo +// - start and end of FileId for consecutive fileIds to be included as root +// - start - single fileId that is root +// +// - for non incremental program buildinfo +// - string that is the root file name +type BuildInfoRoot struct { + Start BuildInfoFileId + End BuildInfoFileId + NonIncremental string // Root of a non incremental program +} + +func (b *BuildInfoRoot) MarshalJSON() ([]byte, error) { + if b.Start != 0 { + if b.End != 0 { + return json.Marshal([2]BuildInfoFileId{b.Start, b.End}) + } else { + return json.Marshal(b.Start) + } + } else { + return json.Marshal(b.NonIncremental) + } +} + +func (b *BuildInfoRoot) UnmarshalJSON(data []byte) error { + var startAndEnd *[2]int + if err := json.Unmarshal(data, &startAndEnd); err == nil { + *b = BuildInfoRoot{ + Start: BuildInfoFileId(startAndEnd[0]), + End: BuildInfoFileId(startAndEnd[1]), + } + return nil + } + var start int + if err := json.Unmarshal(data, &start); err == nil { + *b = BuildInfoRoot{ + Start: BuildInfoFileId(start), + } + return nil + } + var name string + if err := json.Unmarshal(data, &name); err == nil { + *b = BuildInfoRoot{ + NonIncremental: name, + } + return nil + } + return fmt.Errorf("invalid BuildInfoRoot: %s", data) +} type buildInfoFileInfoNoSignature struct { Version string `json:"version,omitzero"` @@ -109,6 +115,9 @@ func newBuildInfoFileInfo(fileInfo *fileInfo) *BuildInfoFileInfo { } func (b *BuildInfoFileInfo) GetFileInfo() *fileInfo { + if b == nil { + return nil + } if b.signature != "" { return &fileInfo{ version: b.signature, @@ -413,13 +422,34 @@ func (b *BuildInfoEmitSignature) UnmarshalJSON(data []byte) error { return fmt.Errorf("invalid BuildInfoEmitSignature: %s", data) } +type BuildInfoResolvedRoot struct { + Resolved BuildInfoFileId + Root BuildInfoFileId +} + +func (b *BuildInfoResolvedRoot) MarshalJSON() ([]byte, error) { + return json.Marshal([2]BuildInfoFileId{b.Resolved, b.Root}) +} + +func (b *BuildInfoResolvedRoot) UnmarshalJSON(data []byte) error { + var resolvedAndRoot *[2]int + if err := json.Unmarshal(data, &resolvedAndRoot); err == nil { + *b = BuildInfoResolvedRoot{ + Resolved: BuildInfoFileId(resolvedAndRoot[0]), + Root: BuildInfoFileId(resolvedAndRoot[1]), + } + return nil + } + return fmt.Errorf("invalid BuildInfoResolvedRoot: %s", data) +} + type BuildInfo struct { Version string `json:"version,omitzero"` // Common between incremental and tsc -b buildinfo for non incremental programs - Errors bool `json:"errors,omitzero"` - CheckPending bool `json:"checkPending,omitzero"` - // Root []BuildInfoRoot `json:"root,omitzero"` + Errors bool `json:"errors,omitzero"` + CheckPending bool `json:"checkPending,omitzero"` + Root []*BuildInfoRoot `json:"root,omitzero"` // IncrementalProgram info FileNames []string `json:"fileNames,omitzero"` @@ -433,7 +463,7 @@ type BuildInfo struct { AffectedFilesPendingEmit []*BuildInfoFilePendingEmit `json:"affectedFilesPendingEmit,omitzero"` LatestChangedDtsFile string `json:"latestChangedDtsFile,omitzero"` // Because this is only output file in the program, we dont need fileId to deduplicate name EmitSignatures []*BuildInfoEmitSignature `json:"emitSignatures,omitzero"` - // resolvedRoot: readonly BuildInfoResolvedRoot[] | undefined; + ResolvedRoot []*BuildInfoResolvedRoot `json:"resolvedRoot,omitzero"` } func (b *BuildInfo) IsValidVersion() bool { @@ -444,6 +474,14 @@ func (b *BuildInfo) IsIncremental() bool { return b != nil && len(b.FileNames) != 0 } +func (b *BuildInfo) fileName(fileId BuildInfoFileId) string { + return b.FileNames[fileId-1] +} + +func (b *BuildInfo) fileInfo(fileId BuildInfoFileId) *BuildInfoFileInfo { + return b.FileInfos[fileId-1] +} + func (b *BuildInfo) GetCompilerOptions(buildInfoDirectory string) *core.CompilerOptions { options := &core.CompilerOptions{} for option, value := range b.Options.Entries() { @@ -459,3 +497,66 @@ func (b *BuildInfo) GetCompilerOptions(buildInfoDirectory string) *core.Compiler } return options } + +func (b *BuildInfo) IsEmitPending(resolved *tsoptions.ParsedCommandLine, buildInfoDirectory string) bool { + // Some of the emit files like source map or dts etc are not yet done + if !resolved.CompilerOptions().NoEmit.IsTrue() || resolved.CompilerOptions().GetEmitDeclarations() { + pendingEmit := getPendingEmitKindWithOptions(resolved.CompilerOptions(), b.GetCompilerOptions(buildInfoDirectory)) + if resolved.CompilerOptions().NoEmit.IsTrue() { + pendingEmit |= FileEmitKindDtsErrors + } + return pendingEmit != 0 + } + return false +} + +func (b *BuildInfo) GetBuildInfoRootInfoReader(buildInfoDirectory string, comparePathOptions tspath.ComparePathsOptions) *BuildInfoRootInfoReader { + roots := make(map[tspath.Path]*BuildInfoFileInfo) + rootToResolved := make(map[tspath.Path]tspath.Path) + + addRoot := func(root string, fileInfo *BuildInfoFileInfo) { + rootPath := tspath.ToPath(root, buildInfoDirectory, comparePathOptions.UseCaseSensitiveFileNames) + rootToResolved[rootPath] = rootPath + if fileInfo != nil { + roots[rootPath] = fileInfo + } + } + + for _, root := range b.Root { + if root.NonIncremental != "" { + addRoot(root.NonIncremental, nil) + } else if root.End == 0 { + addRoot(b.fileName(root.Start), b.fileInfo(root.Start)) + } else { + for i := root.Start; i <= root.End; i++ { + addRoot(b.fileName(i), b.fileInfo(i)) + } + } + } + for _, resolved := range b.ResolvedRoot { + rootToResolved[tspath.ToPath(b.fileName(resolved.Root), buildInfoDirectory, comparePathOptions.UseCaseSensitiveFileNames)] = tspath.ToPath(b.fileName(resolved.Resolved), buildInfoDirectory, comparePathOptions.UseCaseSensitiveFileNames) + } + return &BuildInfoRootInfoReader{ + rootFileInfos: roots, + rootToResolved: rootToResolved, + } +} + +type BuildInfoRootInfoReader struct { + rootFileInfos map[tspath.Path]*BuildInfoFileInfo + rootToResolved map[tspath.Path]tspath.Path +} + +func (b *BuildInfoRootInfoReader) GetBuildInfoFileInfo(inputFilePath tspath.Path) (*BuildInfoFileInfo, tspath.Path) { + if info, ok := b.rootFileInfos[inputFilePath]; ok { + return info, inputFilePath + } + if resolved, ok := b.rootToResolved[inputFilePath]; ok { + return b.rootFileInfos[resolved], resolved + } + return nil, "" +} + +func (b *BuildInfoRootInfoReader) Roots() iter.Seq[tspath.Path] { + return maps.Keys(b.rootToResolved) +} diff --git a/internal/incremental/emitfileshandler.go b/internal/incremental/emitfileshandler.go index 6f2937815b..287da46fe6 100644 --- a/internal/incremental/emitfileshandler.go +++ b/internal/incremental/emitfileshandler.go @@ -2,7 +2,6 @@ package incremental import ( "context" - "slices" "github.com/microsoft/typescript-go/internal/ast" "github.com/microsoft/typescript-go/internal/collections" @@ -22,7 +21,7 @@ type emitFilesHandler struct { isForDtsErrors bool signatures collections.SyncMap[tspath.Path, string] emitSignatures collections.SyncMap[tspath.Path, *emitSignature] - latestChangedDtsFiles collections.SyncSet[string] + latestChangedDtsFiles collections.SyncMap[tspath.Path, string] deletedPendingKinds collections.Set[tspath.Path] emitUpdates collections.SyncMap[tspath.Path, *emitUpdate] } @@ -207,7 +206,7 @@ func (h *emitFilesHandler) skipDtsOutputOfComposite(file *ast.SourceFile, output data.DiffersOnlyInMap = true } } else { - h.latestChangedDtsFiles.Add(outputFileName) + h.latestChangedDtsFiles.Store(file.Path(), outputFileName) } h.emitSignatures.Store(file.Path(), &emitSignature{signature: newSignature}) return false @@ -228,32 +227,32 @@ func (h *emitFilesHandler) updateSnapshot() []*compiler.EmitResult { h.program.snapshot.buildInfoEmitPending.Store(true) return true }) - latestChangedDtsFiles := h.latestChangedDtsFiles.ToSlice() - slices.Sort(latestChangedDtsFiles) - if latestChangedDtsFile := core.LastOrNil(latestChangedDtsFiles); latestChangedDtsFile != "" { - h.program.snapshot.latestChangedDtsFile = latestChangedDtsFile - h.program.snapshot.buildInfoEmitPending.Store(true) - } for file := range h.deletedPendingKinds.Keys() { h.program.snapshot.affectedFilesPendingEmit.Delete(file) h.program.snapshot.buildInfoEmitPending.Store(true) } + // Always use correct order when to collect the result var results []*compiler.EmitResult - h.emitUpdates.Range(func(file tspath.Path, update *emitUpdate) bool { - if update.pendingKind == 0 { - h.program.snapshot.affectedFilesPendingEmit.Delete(file) - } else { - h.program.snapshot.affectedFilesPendingEmit.Store(file, update.pendingKind) + for _, file := range h.program.GetSourceFiles() { + if latestChangedDtsFile, ok := h.latestChangedDtsFiles.Load(file.Path()); ok { + h.program.snapshot.latestChangedDtsFile = latestChangedDtsFile + h.program.snapshot.buildInfoEmitPending.Store(true) } - if update.result != nil { - results = append(results, update.result) - if len(update.result.Diagnostics) != 0 { - h.program.snapshot.emitDiagnosticsPerFile.Store(file, &diagnosticsOrBuildInfoDiagnosticsWithFileName{diagnostics: update.result.Diagnostics}) + 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.result != nil { + results = append(results, update.result) + if len(update.result.Diagnostics) != 0 { + h.program.snapshot.emitDiagnosticsPerFile.Store(file.Path(), &diagnosticsOrBuildInfoDiagnosticsWithFileName{diagnostics: update.result.Diagnostics}) + } } + h.program.snapshot.buildInfoEmitPending.Store(true) } - h.program.snapshot.buildInfoEmitPending.Store(true) - return true - }) + } return results } diff --git a/internal/incremental/program.go b/internal/incremental/program.go index 8750c214e6..c577ea62c2 100644 --- a/internal/incremental/program.go +++ b/internal/incremental/program.go @@ -53,6 +53,7 @@ type TestingData struct { SemanticDiagnosticsPerFile *collections.SyncMap[tspath.Path, *diagnosticsOrBuildInfoDiagnosticsWithFileName] OldProgramSemanticDiagnosticsPerFile *collections.SyncMap[tspath.Path, *diagnosticsOrBuildInfoDiagnosticsWithFileName] UpdatedSignatureKinds map[tspath.Path]SignatureUpdateKind + ConfigFilePath string } func (p *Program) GetTestingData(program *compiler.Program) TestingData { @@ -60,6 +61,7 @@ func (p *Program) GetTestingData(program *compiler.Program) TestingData { SemanticDiagnosticsPerFile: &p.snapshot.semanticDiagnosticsPerFile, OldProgramSemanticDiagnosticsPerFile: p.semanticDiagnosticsPerFile, UpdatedSignatureKinds: p.updatedSignatureKinds, + ConfigFilePath: p.snapshot.options.ConfigFilePath, } } @@ -184,7 +186,7 @@ func (p *Program) Emit(ctx context.Context, options compiler.EmitOptions) *compi // Emit buildInfo and combine result buildInfoResult := p.emitBuildInfo(ctx, options) - if buildInfoResult != nil && buildInfoResult.EmittedFiles != nil { + if buildInfoResult != nil { result.Diagnostics = append(result.Diagnostics, buildInfoResult.Diagnostics...) result.EmittedFiles = append(result.EmittedFiles, buildInfoResult.EmittedFiles...) } @@ -279,14 +281,9 @@ func (p *Program) emitBuildInfo(ctx context.Context, options compiler.EmitOption } } p.snapshot.buildInfoEmitPending.Store(false) - - var emittedFiles []string - if p.snapshot.options.ListEmittedFiles.IsTrue() { - emittedFiles = []string{buildInfoFileName} - } return &compiler.EmitResult{ EmitSkipped: false, - EmittedFiles: emittedFiles, + EmittedFiles: []string{buildInfoFileName}, } } @@ -314,8 +311,10 @@ func (p *Program) ensureHasErrorsForState(ctx context.Context, program *compiler } if len(program.GetConfigFileParsingDiagnostics()) > 0 || len(program.GetSyntacticDiagnostics(ctx, nil)) > 0 || + len(program.GetProgramDiagnostics()) > 0 || len(program.GetBindDiagnostics(ctx, nil)) > 0 || - len(program.GetOptionsDiagnostics(ctx)) > 0 { + len(program.GetOptionsDiagnostics(ctx)) > 0 || + len(program.GetGlobalDiagnostics(ctx)) > 0 { return core.TSTrue } else { return core.TSFalse diff --git a/internal/incremental/snapshot.go b/internal/incremental/snapshot.go index f0808597fc..4abc2890be 100644 --- a/internal/incremental/snapshot.go +++ b/internal/incremental/snapshot.go @@ -28,6 +28,15 @@ func (f *fileInfo) Signature() string { return f.signature func (f *fileInfo) AffectsGlobalScope() bool { return f.affectsGlobalScope } func (f *fileInfo) ImpliedNodeFormat() core.ResolutionMode { return f.impliedNodeFormat } +func ComputeHash(text string, hashWithText bool) string { + hashBytes := xxh3.Hash128([]byte(text)).Bytes() + hash := hex.EncodeToString(hashBytes[:]) + if hashWithText { + hash += "-" + text + } + return hash +} + type FileEmitKind uint32 const ( @@ -295,10 +304,5 @@ func diagnosticToStringBuilder(diagnostic *ast.Diagnostic, file *ast.SourceFile, } func (s *snapshot) computeHash(text string) string { - hashBytes := xxh3.Hash128([]byte(text)).Bytes() - hash := hex.EncodeToString(hashBytes[:]) - if s.hashWithText { - hash += "-" + text - } - return hash + return ComputeHash(text, s.hashWithText) } diff --git a/internal/incremental/snapshottobuildinfo.go b/internal/incremental/snapshottobuildinfo.go index 169d53f43f..ada3104cc0 100644 --- a/internal/incremental/snapshottobuildinfo.go +++ b/internal/incremental/snapshottobuildinfo.go @@ -26,10 +26,14 @@ func snapshotToBuildInfo(snapshot *snapshot, program *compiler.Program, buildInf }, fileNameToFileId: make(map[string]BuildInfoFileId), fileNamesToFileIdListId: make(map[string]BuildInfoFileIdListId), + roots: make(map[*ast.SourceFile]tspath.Path), } + to.buildInfo.Version = core.Version() if snapshot.options.IsIncremental() { + to.collectRootFiles() to.setFileInfoAndEmitSignatures() + to.setRootOfIncrementalProgram() to.setCompilerOptions() to.setReferencedMap() to.setChangeFileSet() @@ -39,12 +43,9 @@ func snapshotToBuildInfo(snapshot *snapshot, program *compiler.Program, buildInf if snapshot.latestChangedDtsFile != "" { to.buildInfo.LatestChangedDtsFile = to.relativeToBuildInfo(snapshot.latestChangedDtsFile) } + } else { + to.setRootOfNonIncrementalProgram() } - // else { - // const buildInfo: NonIncrementalBuildInfo = { - // root: arrayFrom(rootFileNames, r => relativeToBuildInfo(r)), - // }; - // } to.buildInfo.Errors = snapshot.hasErrors.IsTrue() to.buildInfo.CheckPending = snapshot.checkPending return &to.buildInfo @@ -58,6 +59,7 @@ type toBuildInfo struct { comparePathsOptions tspath.ComparePathsOptions fileNameToFileId map[string]BuildInfoFileId fileNamesToFileIdListId map[string]BuildInfoFileIdListId + roots map[*ast.SourceFile]tspath.Path } func (t *toBuildInfo) relativeToBuildInfo(path string) string { @@ -169,6 +171,20 @@ func (t *toBuildInfo) toBuildInfoDiagnosticsOfFile(filePath tspath.Path, diags * return nil } +func (t *toBuildInfo) collectRootFiles() { + for _, fileName := range t.program.GetRootFileNames() { + var file *ast.SourceFile + if redirect := t.program.GetParseFileRedirect(fileName); redirect != "" { + file = t.program.GetSourceFile(redirect) + } else { + file = t.program.GetSourceFile(fileName) + } + if file != nil { + t.roots[file] = tspath.ToPath(fileName, t.comparePathsOptions.CurrentDirectory, t.comparePathsOptions.UseCaseSensitiveFileNames) + } + } +} + func (t *toBuildInfo) setFileInfoAndEmitSignatures() { t.buildInfo.FileInfos = core.Map(t.program.GetSourceFiles(), func(file *ast.SourceFile) *BuildInfoFileInfo { info, _ := t.snapshot.fileInfos.Load(file.Path()) @@ -203,6 +219,38 @@ func (t *toBuildInfo) setFileInfoAndEmitSignatures() { }) } +func (t *toBuildInfo) setRootOfIncrementalProgram() { + keys := slices.Collect(maps.Keys(t.roots)) + slices.SortFunc(keys, func(a, b *ast.SourceFile) int { + return int(t.toFileId(a.Path())) - int(t.toFileId(b.Path())) + }) + for _, file := range keys { + root := t.toFileId(t.roots[file]) + resolved := t.toFileId(file.Path()) + if t.buildInfo.Root == nil { + // First fileId as is + t.buildInfo.Root = append(t.buildInfo.Root, &BuildInfoRoot{Start: resolved}) + } else { + last := t.buildInfo.Root[len(t.buildInfo.Root)-1] + if last.End == resolved-1 { + // If its [..., last = [start, end = fileId - 1]], update last to [start, fileId] + last.End = resolved + } else if last.End == 0 && last.Start == resolved-1 { + // If its [..., last = start = fileId - 1 ], update last to [start, fileId] + last.End = resolved + } else { + t.buildInfo.Root = append(t.buildInfo.Root, &BuildInfoRoot{Start: resolved}) + } + } + if root != resolved { + t.buildInfo.ResolvedRoot = append(t.buildInfo.ResolvedRoot, &BuildInfoResolvedRoot{ + Resolved: resolved, + Root: root, + }) + } + } +} + func (t *toBuildInfo) setCompilerOptions() { tsoptions.ForEachCompilerOptionValue( t.snapshot.options, @@ -286,3 +334,11 @@ func (t *toBuildInfo) setAffectedFilesPendingEmit() { }) } } + +func (t *toBuildInfo) setRootOfNonIncrementalProgram() { + t.buildInfo.Root = core.Map(t.program.GetRootFileNames(), func(fileName string) *BuildInfoRoot { + return &BuildInfoRoot{ + NonIncremental: t.relativeToBuildInfo(string(tspath.ToPath(fileName, t.comparePathsOptions.CurrentDirectory, t.comparePathsOptions.UseCaseSensitiveFileNames))), + } + }) +} diff --git a/internal/outputpaths/outputpaths.go b/internal/outputpaths/outputpaths.go index fa4622996a..097a7ccc2c 100644 --- a/internal/outputpaths/outputpaths.go +++ b/internal/outputpaths/outputpaths.go @@ -53,7 +53,7 @@ func GetOutputPathsFor(sourceFile *ast.SourceFile, options *core.CompilerOptions if options.EmitDeclarationOnly != core.TSTrue && !isJsonEmittedToSameLocation { paths.jsFilePath = ownOutputFilePath if !ast.IsJsonSourceFile(sourceFile) { - paths.sourceMapFilePath = getSourceMapFilePath(paths.jsFilePath, options) + paths.sourceMapFilePath = GetSourceMapFilePath(paths.jsFilePath, options) } } if forceDtsEmit || options.GetEmitDeclarations() && !isJsonFile { @@ -74,6 +74,21 @@ func ForEachEmittedFile(host OutputPathsHost, options *core.CompilerOptions, act return false } +func GetOutputJSFileName(inputFileName string, options *core.CompilerOptions, host OutputPathsHost) string { + if options.EmitDeclarationOnly.IsTrue() { + return "" + } + outputFileName := GetOutputJSFileNameWorker(inputFileName, options, host) + if !tspath.FileExtensionIs(outputFileName, tspath.ExtensionJson) || + tspath.ComparePaths(inputFileName, outputFileName, tspath.ComparePathsOptions{ + CurrentDirectory: host.GetCurrentDirectory(), + UseCaseSensitiveFileNames: host.UseCaseSensitiveFileNames(), + }) != 0 { + return outputFileName + } + return "" +} + func GetOutputJSFileNameWorker(inputFileName string, options *core.CompilerOptions, host OutputPathsHost) string { return tspath.ChangeExtension( getOutputPathWithoutChangingExtension(inputFileName, options.OutDir, host), @@ -176,7 +191,7 @@ func getOwnEmitOutputFilePath(fileName string, options *core.CompilerOptions, ho return emitOutputFilePathWithoutExtension + extension } -func getSourceMapFilePath(jsFilePath string, options *core.CompilerOptions) string { +func GetSourceMapFilePath(jsFilePath string, options *core.CompilerOptions) string { if options.SourceMap.IsTrue() && !options.InlineSourceMap.IsTrue() { return jsFilePath + ".map" } diff --git a/internal/testutil/incrementaltestutil/fs.go b/internal/testutil/incrementaltestutil/fs.go index cd3fa6b9a1..a89d57024f 100644 --- a/internal/testutil/incrementaltestutil/fs.go +++ b/internal/testutil/incrementaltestutil/fs.go @@ -10,7 +10,7 @@ import ( "github.com/microsoft/typescript-go/internal/vfs" ) -var fakeTsVersion = "FakeTSVersion" +var FakeTsVersion = "FakeTSVersion" type FsHandlingBuildInfo struct { vfs.FS @@ -24,7 +24,7 @@ func (f *FsHandlingBuildInfo) ReadFile(path string) (contents string, ok bool) { // read buildinfo and modify version var buildInfo incremental.BuildInfo err := json.Unmarshal([]byte(contents), &buildInfo) - if err == nil && buildInfo.Version == fakeTsVersion { + if err == nil && buildInfo.Version == FakeTsVersion { buildInfo.Version = core.Version() newContents, err := json.Marshal(&buildInfo) if err != nil { @@ -42,7 +42,7 @@ func (f *FsHandlingBuildInfo) WriteFile(path string, data string, writeByteOrder if err := json.Unmarshal([]byte(data), &buildInfo); err == nil { if buildInfo.Version == core.Version() { // Change it to fakeTsVersion - buildInfo.Version = fakeTsVersion + buildInfo.Version = FakeTsVersion newData, err := json.Marshal(&buildInfo) if err != nil { return fmt.Errorf("testFs.WriteFile: failed to marshal build info after fixing version: %w", err) diff --git a/internal/testutil/incrementaltestutil/readablebuildinfo.go b/internal/testutil/incrementaltestutil/readablebuildinfo.go index dbfa965087..8b95d56e8a 100644 --- a/internal/testutil/incrementaltestutil/readablebuildinfo.go +++ b/internal/testutil/incrementaltestutil/readablebuildinfo.go @@ -17,9 +17,9 @@ type readableBuildInfo struct { Version string `json:"version,omitzero"` // Common between incremental and tsc -b buildinfo for non incremental programs - Errors bool `json:"errors,omitzero"` - CheckPending bool `json:"checkPending,omitzero"` - // Root []BuildInfoRoot `json:"root,omitzero"` + Errors bool `json:"errors,omitzero"` + CheckPending bool `json:"checkPending,omitzero"` + Root []*readableBuildInfoRoot `json:"root,omitzero"` // IncrementalProgram info FileNames []string `json:"fileNames,omitzero"` @@ -33,8 +33,13 @@ type readableBuildInfo struct { AffectedFilesPendingEmit []*readableBuildInfoFilePendingEmit `json:"affectedFilesPendingEmit,omitzero"` LatestChangedDtsFile string `json:"latestChangedDtsFile,omitzero"` // Because this is only output file in the program, we dont need fileId to deduplicate name EmitSignatures []*readableBuildInfoEmitSignature `json:"emitSignatures,omitzero"` - // resolvedRoot: readonly IncrementalBuildInfoResolvedRoot[] | undefined; - Size int `json:"size,omitzero"` // Size of the build info file + ResolvedRoot []*readableBuildInfoResolvedRoot `json:"resolvedRoot,omitzero"` + Size int `json:"size,omitzero"` // Size of the build info file +} + +type readableBuildInfoRoot struct { + Files []string `json:"files,omitzero"` + Original *incremental.BuildInfoRoot `json:"original,omitzero"` } type readableBuildInfoFileInfo struct { @@ -174,6 +179,27 @@ type readableBuildInfoEmitSignature struct { Original *incremental.BuildInfoEmitSignature `json:"original,omitzero"` } +type readableBuildInfoResolvedRoot struct { + Resolved string + Root string +} + +func (b *readableBuildInfoResolvedRoot) MarshalJSON() ([]byte, error) { + return json.Marshal([2]string{b.Resolved, b.Root}) +} + +func (b *readableBuildInfoResolvedRoot) UnmarshalJSON(data []byte) error { + var resolvedAndRoot *[2]string + if err := json.Unmarshal(data, &resolvedAndRoot); err == nil { + *b = readableBuildInfoResolvedRoot{ + Resolved: resolvedAndRoot[0], + Root: resolvedAndRoot[1], + } + return nil + } + return fmt.Errorf("invalid BuildInfoResolvedRoot: %s", data) +} + func toReadableBuildInfo(buildInfo *incremental.BuildInfo, buildInfoText string) string { readable := readableBuildInfo{ buildInfo: buildInfo, @@ -186,6 +212,7 @@ func toReadableBuildInfo(buildInfo *incremental.BuildInfo, buildInfoText string) Size: len(buildInfoText), } readable.setFileInfos() + readable.setRoot() readable.setFileIdsList() readable.setReferencedMap() readable.setChangeFileSet() @@ -193,6 +220,7 @@ func toReadableBuildInfo(buildInfo *incremental.BuildInfo, buildInfoText string) readable.setEmitDiagnostics() readable.setAffectedFilesPendingEmit() readable.setEmitSignatures() + readable.setResolvedRoot() contents, err := jsonutil.MarshalIndent(&readable, "", " ") if err != nil { panic("readableBuildInfo: failed to marshal readable build info: " + err.Error()) @@ -256,6 +284,26 @@ func (r *readableBuildInfo) setFileInfos() { }) } +func (r *readableBuildInfo) setRoot() { + r.Root = core.Map(r.buildInfo.Root, func(original *incremental.BuildInfoRoot) *readableBuildInfoRoot { + var files []string + if original.NonIncremental != "" { + files = []string{original.NonIncremental} + } else if original.End == 0 { + files = []string{r.toFilePath(original.Start)} + } else { + files = make([]string, 0, original.End-original.Start+1) + for i := original.Start; i <= original.End; i++ { + files = append(files, r.toFilePath(i)) + } + } + return &readableBuildInfoRoot{ + Files: files, + Original: original, + } + }) +} + func (r *readableBuildInfo) setFileIdsList() { r.FileIdsList = core.Map(r.buildInfo.FileIdsList, func(ids []incremental.BuildInfoFileId) []string { return core.Map(ids, r.toFilePath) @@ -358,3 +406,12 @@ func (r *readableBuildInfo) setEmitSignatures() { } }) } + +func (r *readableBuildInfo) setResolvedRoot() { + r.ResolvedRoot = core.Map(r.buildInfo.ResolvedRoot, func(original *incremental.BuildInfoResolvedRoot) *readableBuildInfoResolvedRoot { + return &readableBuildInfoResolvedRoot{ + Resolved: r.toFilePath(original.Resolved), + Root: r.toFilePath(original.Root), + } + }) +} diff --git a/internal/tsoptions/parsedcommandline.go b/internal/tsoptions/parsedcommandline.go index a75f06ee5f..25dc4fc582 100644 --- a/internal/tsoptions/parsedcommandline.go +++ b/internal/tsoptions/parsedcommandline.go @@ -135,6 +135,52 @@ func (p *ParsedCommandLine) GetOutputDeclarationFileNames() iter.Seq2[string, st } } +func (p *ParsedCommandLine) GetOutputFileNames() iter.Seq[string] { + return func(yield func(outputName string) bool) { + for _, fileName := range p.ParsedConfig.FileNames { + if tspath.IsDeclarationFileName(fileName) { + continue + } + jsFileName := outputpaths.GetOutputJSFileName(fileName, p.CompilerOptions(), p) + isJson := tspath.FileExtensionIs(fileName, tspath.ExtensionJson) + if jsFileName != "" { + if !yield(jsFileName) { + return + } + if !isJson { + sourceMap := outputpaths.GetSourceMapFilePath(jsFileName, p.CompilerOptions()) + if sourceMap != "" { + if !yield(sourceMap) { + return + } + } + } + } + if isJson { + continue + } + if p.CompilerOptions().GetEmitDeclarations() { + dtsFileName := outputpaths.GetOutputDeclarationFileNameWorker(fileName, p.CompilerOptions(), p) + if dtsFileName != "" { + if !yield(dtsFileName) { + return + } + if p.CompilerOptions().GetAreDeclarationMapsEnabled() { + declarationMap := dtsFileName + ".map" + if !yield(declarationMap) { + return + } + } + } + } + } + } +} + +func (p *ParsedCommandLine) GetBuildInfoFileName() string { + return outputpaths.GetBuildInfoFileName(p.CompilerOptions(), p.comparePathsOptions) +} + // WildcardDirectories returns the cached wildcard directories, initializing them if needed func (p *ParsedCommandLine) WildcardDirectories() map[string]bool { if p == nil { @@ -179,10 +225,6 @@ func (p *ParsedCommandLine) CompilerOptions() *core.CompilerOptions { return p.ParsedConfig.CompilerOptions } -func (p *ParsedCommandLine) GetBuildInfoFileName() string { - return outputpaths.GetBuildInfoFileName(p.CompilerOptions(), p.comparePathsOptions) -} - func (p *ParsedCommandLine) SetTypeAcquisition(o *core.TypeAcquisition) { p.ParsedConfig.TypeAcquisition = o } diff --git a/internal/tsoptions/tsconfigparsing.go b/internal/tsoptions/tsconfigparsing.go index 8a90a3475b..e59ca4e6f3 100644 --- a/internal/tsoptions/tsconfigparsing.go +++ b/internal/tsoptions/tsconfigparsing.go @@ -1257,9 +1257,10 @@ func parseJsonConfigFileContentWorker( } getProjectReferences := func(basePath string) []*core.ProjectReference { - var projectReferences []*core.ProjectReference = []*core.ProjectReference{} + var projectReferences []*core.ProjectReference newReferencesOfRaw := getPropFromRaw("references", func(element any) bool { return reflect.TypeOf(element) == orderedMapType }, "object") if newReferencesOfRaw.sliceValue != nil { + projectReferences = []*core.ProjectReference{} for _, reference := range newReferencesOfRaw.sliceValue { for _, ref := range parseProjectReference(reference) { if reflect.TypeOf(ref.Path).Kind() != reflect.String { diff --git a/internal/vfs/cachedvfs/cachedvfs.go b/internal/vfs/cachedvfs/cachedvfs.go index 0e284fe043..6fcc3d92f4 100644 --- a/internal/vfs/cachedvfs/cachedvfs.go +++ b/internal/vfs/cachedvfs/cachedvfs.go @@ -2,6 +2,7 @@ package cachedvfs import ( "sync/atomic" + "time" "github.com/microsoft/typescript-go/internal/collections" "github.com/microsoft/typescript-go/internal/vfs" @@ -116,10 +117,14 @@ func (fsys *FS) Remove(path string) error { return fsys.fs.Remove(path) } +func (fsys *FS) Chtimes(path string, aTime time.Time, mTime time.Time) error { + return fsys.fs.Chtimes(path, aTime, mTime) +} + func (fsys *FS) Stat(path string) vfs.FileInfo { if fsys.enabled.Load() { if ret, ok := fsys.statCache.Load(path); ok { - return ret.(vfs.FileInfo) + return ret } } @@ -141,5 +146,6 @@ 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/iovfs/iofs.go b/internal/vfs/iovfs/iofs.go index 8b4fd5777d..b5a07848ef 100644 --- a/internal/vfs/iovfs/iofs.go +++ b/internal/vfs/iovfs/iofs.go @@ -4,6 +4,7 @@ import ( "fmt" "io/fs" "strings" + "time" "github.com/microsoft/typescript-go/internal/stringutil" "github.com/microsoft/typescript-go/internal/tspath" @@ -22,6 +23,7 @@ type WritableFS interface { MkdirAll(path string, perm fs.FileMode) error // Removes `path` and all its contents. Will return the first error it encounters. Remove(path string) error + Chtimes(path string, aTime time.Time, mTime time.Time) error } // From creates a new FS from an [fs.FS]. @@ -56,6 +58,7 @@ func From(fsys fs.FS, useCaseSensitiveFileNames bool) vfs.FS { var writeFile func(path string, content string, writeByteOrderMark bool) error var mkdirAll func(path string) error var remove func(path string) error + var chtimes func(path string, aTime time.Time, mTime time.Time) error if fsys, ok := fsys.(WritableFS); ok { writeFile = func(path string, content string, writeByteOrderMark bool) error { rest, _ := strings.CutPrefix(path, "/") @@ -75,6 +78,10 @@ func From(fsys fs.FS, useCaseSensitiveFileNames bool) vfs.FS { rest, _ := strings.CutPrefix(path, "/") return fsys.Remove(rest) } + chtimes = func(path string, aTime time.Time, mTime time.Time) error { + rest, _ := strings.CutPrefix(path, "/") + return fsys.Chtimes(rest, aTime, mTime) + } } else { writeFile = func(string, string, bool) error { panic("writeFile not supported") @@ -85,6 +92,9 @@ func From(fsys fs.FS, useCaseSensitiveFileNames bool) vfs.FS { remove = func(string) error { panic("remove not supported") } + chtimes = func(string, time.Time, time.Time) error { + panic("chtimes not supported") + } } return &ioFS{ @@ -107,6 +117,7 @@ func From(fsys fs.FS, useCaseSensitiveFileNames bool) vfs.FS { writeFile: writeFile, mkdirAll: mkdirAll, remove: remove, + chtimes: chtimes, } } @@ -118,6 +129,7 @@ type ioFS struct { writeFile func(path string, content string, writeByteOrderMark bool) error mkdirAll func(path string) error remove func(path string) error + chtimes func(path string, aTime time.Time, mTime time.Time) error } var _ vfs.FS = (*ioFS)(nil) @@ -156,6 +168,11 @@ func (vfs *ioFS) Remove(path string) error { return vfs.remove(path) } +func (vfs *ioFS) Chtimes(path string, aTime time.Time, mTime time.Time) error { + _ = internal.RootLength(path) // Assert path is rooted + return vfs.chtimes(path, aTime, mTime) +} + func (vfs *ioFS) Realpath(path string) string { root, rest := internal.SplitPath(path) // splitPath normalizes the path into parts (e.g. "c:/foo/bar" -> "c:/", "foo/bar") diff --git a/internal/vfs/osvfs/os.go b/internal/vfs/osvfs/os.go index 47439b59d1..d811d6ff71 100644 --- a/internal/vfs/osvfs/os.go +++ b/internal/vfs/osvfs/os.go @@ -6,6 +6,7 @@ import ( "path/filepath" "runtime" "strings" + "time" "unicode" "github.com/microsoft/typescript-go/internal/tspath" @@ -170,3 +171,7 @@ func (vfs *osFS) Remove(path string) error { // todo: #701 add retry mechanism? return os.RemoveAll(path) } + +func (vfs *osFS) Chtimes(path string, aTime time.Time, mTime time.Time) error { + return os.Chtimes(path, aTime, mTime) +} diff --git a/internal/vfs/vfs.go b/internal/vfs/vfs.go index 8bc95a0986..986eda8429 100644 --- a/internal/vfs/vfs.go +++ b/internal/vfs/vfs.go @@ -2,6 +2,7 @@ package vfs import ( "io/fs" + "time" ) //go:generate go tool github.com/matryer/moq -fmt goimports -out vfsmock/mock_generated.go -pkg vfsmock . FS @@ -24,6 +25,9 @@ type FS interface { // Removes `path` and all its contents. Will return the first error it encounters. Remove(path string) error + // Chtimes changes the access and modification times of the named + Chtimes(path string, aTime time.Time, mTime time.Time) error + // DirectoryExists returns true if the path is a directory. DirectoryExists(path string) bool diff --git a/internal/vfs/vfsmock/mock_generated.go b/internal/vfs/vfsmock/mock_generated.go index f18d46dd4e..88b875abc7 100644 --- a/internal/vfs/vfsmock/mock_generated.go +++ b/internal/vfs/vfsmock/mock_generated.go @@ -5,6 +5,7 @@ package vfsmock import ( "sync" + "time" "github.com/microsoft/typescript-go/internal/vfs" ) @@ -19,6 +20,9 @@ var _ vfs.FS = &FSMock{} // // // make and configure a mocked vfs.FS // mockedFS := &FSMock{ +// ChtimesFunc: func(path string, aTime time.Time, mTime time.Time) error { +// panic("mock out the Chtimes method") +// }, // DirectoryExistsFunc: func(path string) bool { // panic("mock out the DirectoryExists method") // }, @@ -56,6 +60,9 @@ var _ vfs.FS = &FSMock{} // // } type FSMock struct { + // ChtimesFunc mocks the Chtimes method. + ChtimesFunc func(path string, aTime time.Time, mTime time.Time) error + // DirectoryExistsFunc mocks the DirectoryExists method. DirectoryExistsFunc func(path string) bool @@ -88,6 +95,15 @@ type FSMock struct { // calls tracks calls to the methods. calls struct { + // Chtimes holds details about calls to the Chtimes method. + Chtimes []struct { + // Path is the path argument value. + Path string + // ATime is the aTime argument value. + ATime time.Time + // MTime is the mTime argument value. + MTime time.Time + } // DirectoryExists holds details about calls to the DirectoryExists method. DirectoryExists []struct { // Path is the path argument value. @@ -142,6 +158,7 @@ type FSMock struct { WriteByteOrderMark bool } } + lockChtimes sync.RWMutex lockDirectoryExists sync.RWMutex lockFileExists sync.RWMutex lockGetAccessibleEntries sync.RWMutex @@ -154,6 +171,46 @@ type FSMock struct { lockWriteFile sync.RWMutex } +// Chtimes calls ChtimesFunc. +func (mock *FSMock) Chtimes(path string, aTime time.Time, mTime time.Time) error { + if mock.ChtimesFunc == nil { + panic("FSMock.ChtimesFunc: method is nil but FS.Chtimes was just called") + } + callInfo := struct { + Path string + ATime time.Time + MTime time.Time + }{ + Path: path, + ATime: aTime, + MTime: mTime, + } + mock.lockChtimes.Lock() + mock.calls.Chtimes = append(mock.calls.Chtimes, callInfo) + mock.lockChtimes.Unlock() + return mock.ChtimesFunc(path, aTime, mTime) +} + +// ChtimesCalls gets all the calls that were made to Chtimes. +// Check the length with: +// +// len(mockedFS.ChtimesCalls()) +func (mock *FSMock) ChtimesCalls() []struct { + Path string + ATime time.Time + MTime time.Time +} { + var calls []struct { + Path string + ATime time.Time + MTime time.Time + } + mock.lockChtimes.RLock() + calls = mock.calls.Chtimes + mock.lockChtimes.RUnlock() + return calls +} + // DirectoryExists calls DirectoryExistsFunc. func (mock *FSMock) DirectoryExists(path string) bool { if mock.DirectoryExistsFunc == nil { diff --git a/internal/vfs/vfsmock/wrapper.go b/internal/vfs/vfsmock/wrapper.go index 02ba3acd2f..9ca2fc7a4a 100644 --- a/internal/vfs/vfsmock/wrapper.go +++ b/internal/vfs/vfsmock/wrapper.go @@ -11,6 +11,7 @@ func Wrap(fs vfs.FS) *FSMock { ReadFileFunc: fs.ReadFile, RealpathFunc: fs.Realpath, RemoveFunc: fs.Remove, + ChtimesFunc: fs.Chtimes, StatFunc: fs.Stat, UseCaseSensitiveFileNamesFunc: fs.UseCaseSensitiveFileNames, WalkDirFunc: fs.WalkDir, diff --git a/internal/vfs/vfstest/vfstest.go b/internal/vfs/vfstest/vfstest.go index 861a8c4212..d2fb14bdf3 100644 --- a/internal/vfs/vfstest/vfstest.go +++ b/internal/vfs/vfstest/vfstest.go @@ -28,6 +28,28 @@ type mapFS struct { useCaseSensitiveFileNames bool symlinks map[canonicalPath]canonicalPath + + timeImpl *Time +} + +type Time struct { + start time.Time + now time.Time + nowMu sync.Mutex +} + +func (t *Time) Now() time.Time { + t.nowMu.Lock() + defer t.nowMu.Unlock() + if t.now.IsZero() { + t.now = t.start + } + t.now = t.now.Add(1 * time.Second) // Simulate some time passing + return t.now +} + +func (t *Time) SinceStart() time.Duration { + return t.Now().Sub(t.start) } var ( @@ -47,8 +69,20 @@ type sys struct { // without trailing directory separators. // The paths must be all POSIX-style or all Windows-style, but not both. func FromMap[File any](m map[string]File, useCaseSensitiveFileNames bool) vfs.FS { + fs, _ := FromMapWithTime(m, useCaseSensitiveFileNames) + return fs +} + +// FromMap creates a new [vfs.FS] from a map of paths to file contents. +// Those file contents may be strings, byte slices, or [fstest.MapFile]s. +// +// The paths must be normalized absolute paths according to the tspath package, +// without trailing directory separators. +// The paths must be all POSIX-style or all Windows-style, but not both. +func FromMapWithTime[File any](m map[string]File, useCaseSensitiveFileNames bool) (vfs.FS, *Time) { posix := false windows := false + timeImpl := &Time{start: time.Now()} checkPath := func(p string) { if !tspath.IsRootedDiskPath(p) { @@ -67,17 +101,22 @@ func FromMap[File any](m map[string]File, useCaseSensitiveFileNames bool) vfs.FS } mfs := make(fstest.MapFS, len(m)) - for p, f := range m { + // Sorted creation to ensure times are always guaranteed to be in order. + keys := slices.Collect(maps.Keys(m)) + slices.SortFunc(keys, comparePathsByParts) + for _, p := range keys { + f := m[p] checkPath(p) var file *fstest.MapFile switch f := any(f).(type) { case string: - file = &fstest.MapFile{Data: []byte(f)} + file = &fstest.MapFile{Data: []byte(f), ModTime: timeImpl.Now()} case []byte: - file = &fstest.MapFile{Data: f} + file = &fstest.MapFile{Data: f, ModTime: timeImpl.Now()} case *fstest.MapFile: file = f + file.ModTime = timeImpl.Now() default: panic(fmt.Sprintf("invalid file type %T", f)) } @@ -100,13 +139,14 @@ func FromMap[File any](m map[string]File, useCaseSensitiveFileNames bool) vfs.FS panic("mixed posix and windows paths") } - return iovfs.From(convertMapFS(mfs, useCaseSensitiveFileNames), useCaseSensitiveFileNames) + return iovfs.From(convertMapFS(mfs, useCaseSensitiveFileNames, timeImpl), useCaseSensitiveFileNames), timeImpl } -func convertMapFS(input fstest.MapFS, useCaseSensitiveFileNames bool) *mapFS { +func convertMapFS(input fstest.MapFS, useCaseSensitiveFileNames bool, timeImpl *Time) *mapFS { m := &mapFS{ m: make(fstest.MapFS, len(input)), useCaseSensitiveFileNames: useCaseSensitiveFileNames, + timeImpl: timeImpl, } // Verify that the input is well-formed. @@ -320,7 +360,8 @@ func (m *mapFS) mkdirAll(p string, perm fs.FileMode) error { for _, dir := range toCreate { m.setEntry(dir, m.getCanonicalPath(dir), fstest.MapFile{ - Mode: fs.ModeDir | perm&^umask, + Mode: fs.ModeDir | perm&^umask, + ModTime: m.timeImpl.Now(), }) } @@ -482,7 +523,7 @@ func (m *mapFS) WriteFile(path string, data []byte, perm fs.FileMode) error { m.setEntry(path, cp, fstest.MapFile{ Data: data, - ModTime: time.Now(), + ModTime: m.timeImpl.Now(), Mode: perm &^ umask, }) @@ -496,6 +537,20 @@ func (m *mapFS) Remove(path string) error { return m.remove(path) } +func (m *mapFS) Chtimes(path string, aTime time.Time, mTime time.Time) error { + m.mu.Lock() + defer m.mu.Unlock() + canonical := m.getCanonicalPath(path) + canonicalString := string(canonical) + fileInfo := m.m[canonicalString] + if fileInfo == nil { + // file does not exist + return fs.ErrNotExist + } + fileInfo.ModTime = mTime + return nil +} + func must[T any](v T, err error) T { if err != nil { panic(err) diff --git a/internal/vfs/vfstest/vfstest_test.go b/internal/vfs/vfstest/vfstest_test.go index a0c0da026a..cf86d1f054 100644 --- a/internal/vfs/vfstest/vfstest_test.go +++ b/internal/vfs/vfstest/vfstest_test.go @@ -9,6 +9,7 @@ import ( "sync" "testing" "testing/fstest" + "time" "unicode/utf16" "github.com/microsoft/typescript-go/internal/testutil" @@ -34,7 +35,7 @@ func TestInsensitive(t *testing.T) { Data: contents, Sys: 1234, }, - }, false /*useCaseSensitiveFileNames*/) + }, false /*useCaseSensitiveFileNames*/, &Time{start: time.Now()}) sensitive, err := fs.ReadFile(vfs, "foo/bar/baz") assert.NilError(t, err) @@ -97,7 +98,7 @@ func TestInsensitiveUpper(t *testing.T) { Data: contents, Sys: 1234, }, - }, false /*useCaseSensitiveFileNames*/) + }, false /*useCaseSensitiveFileNames*/, &Time{start: time.Now()}) sensitive, err := fs.ReadFile(vfs, "foo/bar/baz") assert.NilError(t, err) @@ -142,7 +143,7 @@ func TestSensitive(t *testing.T) { Data: contents, Sys: 1234, }, - }, true /*useCaseSensitiveFileNames*/) + }, true /*useCaseSensitiveFileNames*/, &Time{start: time.Now()}) sensitive, err := fs.ReadFile(vfs, "foo/bar/baz") assert.NilError(t, err) @@ -170,7 +171,7 @@ func TestSensitiveDuplicatePath(t *testing.T) { } testutil.AssertPanics(t, func() { - convertMapFS(testfs, false /*useCaseSensitiveFileNames*/) + convertMapFS(testfs, false /*useCaseSensitiveFileNames*/, &Time{start: time.Now()}) }, `duplicate path: "Foo" and "foo" have the same canonical path`) } @@ -186,7 +187,7 @@ func TestInsensitiveDuplicatePath(t *testing.T) { }, } - convertMapFS(testfs, true /*useCaseSensitiveFileNames*/) + convertMapFS(testfs, true /*useCaseSensitiveFileNames*/, &Time{start: time.Now()}) } func dirEntriesToNames(entries []fs.DirEntry) []string { @@ -303,7 +304,7 @@ func TestParentDirFile(t *testing.T) { } testutil.AssertPanics(t, func() { - convertMapFS(testfs, false /*useCaseSensitiveFileNames*/) + convertMapFS(testfs, false /*useCaseSensitiveFileNames*/, &Time{start: time.Now()}) }, `failed to create intermediate directories for "foo/oops": mkdir "foo": path exists but is not a directory`) } diff --git a/testdata/baselines/reference/tsbuild/clean/file-name-and-output-name-clashing.js b/testdata/baselines/reference/tsbuild/clean/file-name-and-output-name-clashing.js new file mode 100644 index 0000000000..1d6c33937a --- /dev/null +++ b/testdata/baselines/reference/tsbuild/clean/file-name-and-output-name-clashing.js @@ -0,0 +1,16 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/bar.ts] *new* + +//// [/home/src/workspaces/solution/index.js] *new* + +//// [/home/src/workspaces/solution/tsconfig.json] *new* +{ + "compilerOptions": { "allowJs": true } +} + +tsgo --b --clean +ExitStatus:: Success +Output:: + diff --git a/testdata/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js b/testdata/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js new file mode 100644 index 0000000000..2d49e3108b --- /dev/null +++ b/testdata/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js @@ -0,0 +1,99 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/project/src/main.tsx] *new* +export const x = 10; +//// [/home/src/workspaces/solution/project/tsconfig.json] *new* +{ + "compilerOptions": { "declaration": true }, + "include": ["src/**/*.tsx", "src/**/*.ts"] +} + +tsgo --b project -v --explainFiles +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project/tsconfig.json + +[HH:MM:SS AM] Project 'project/tsconfig.json' is out of date because output file 'project/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project/tsconfig.json'... + +//// [/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/project/src/main.d.ts] *new* +export declare const x = 10; + +//// [/home/src/workspaces/solution/project/src/main.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + +//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":["./src/main.tsx"]} +//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/main.tsx" + ], + "original": "./src/main.tsx" + } + ], + "size": 53 +} + +/home/src/workspaces/solution/project/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project/src/main.tsx +Signatures:: +(stored at emit) /home/src/workspaces/solution/project/src/main.tsx + + +Edit [0]:: no change + +tsgo --b project -v --explainFiles +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project/tsconfig.json + +[HH:MM:SS AM] Project 'project/tsconfig.json' is up to date because newest input 'project/src/main.tsx' is older than output 'project/src/main.js' + + + + +Edit [1]:: clean build + +tsgo -b project --clean +ExitStatus:: Success +Output:: +//// [/home/src/workspaces/solution/project/src/main.d.ts] *deleted* +//// [/home/src/workspaces/solution/project/src/main.js] *deleted* +//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *deleted* + diff --git a/testdata/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js b/testdata/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js new file mode 100644 index 0000000000..535caa762e --- /dev/null +++ b/testdata/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js @@ -0,0 +1,1609 @@ +currentDirectory::/home/src/workspaces/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/project/a.ts] *new* +export const a = 10;const aLocal = 10; +//// [/home/src/workspaces/project/b.ts] *new* +export const b = 10;const bLocal = 10; +//// [/home/src/workspaces/project/c.ts] *new* +import { a } from "./a";export const c = a; +//// [/home/src/workspaces/project/d.ts] *new* +import { b } from "./b";export const d = b; +//// [/home/src/workspaces/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": true + } +} + +tsgo --build --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/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.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 10; + +//// [/home/src/workspaces/project/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; + +//// [/home/src/workspaces/project/c.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; + +//// [/home/src/workspaces/project/d.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;"],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1271 +} + +/home/src/workspaces/project/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 +*refresh* /home/src/workspaces/project/c.ts +*refresh* /home/src/workspaces/project/d.ts +Signatures:: + + +Edit [0]:: with sourceMap + +tsgo --build --verbose --sourceMap +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 10; +//# sourceMappingURL=a.js.map +//// [/home/src/workspaces/project/a.js.map] *new* +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,MAAM,MAAM,GAAG,EAAE,CAAC"} +//// [/home/src/workspaces/project/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; +//# sourceMappingURL=b.js.map +//// [/home/src/workspaces/project/b.js.map] *new* +{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,MAAM,MAAM,GAAG,EAAE,CAAC"} +//// [/home/src/workspaces/project/c.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=c.js.map +//// [/home/src/workspaces/project/c.js.map] *new* +{"version":3,"file":"c.js","sourceRoot":"","sources":["c.ts"],"names":[],"mappings":";;;AAAA,2BAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} +//// [/home/src/workspaces/project/d.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=d.js.map +//// [/home/src/workspaces/project/d.js.map] *new* +{"version":3,"file":"d.js","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":";;;AAAA,2BAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;"],"fileIdsList":[[2],[3]],"options":{"sourceMap":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "sourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1300 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [1]:: should re-emit only js so they dont contain sourcemap + +tsgo --build --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 10; + +//// [/home/src/workspaces/project/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; + +//// [/home/src/workspaces/project/c.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; + +//// [/home/src/workspaces/project/d.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;"],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1271 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: with declaration, emit Dts and should not emit js + +tsgo --build --verbose --declaration +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.d.ts] *new* +export declare const a = 10; + +//// [/home/src/workspaces/project/b.d.ts] *new* +export declare const b = 10; + +//// [/home/src/workspaces/project/c.d.ts] *new* +export declare const c = 10; + +//// [/home/src/workspaces/project/d.d.ts] *new* +export declare const d = 10; + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1750 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: +(stored at emit) /home/src/workspaces/project/a.ts +(stored at emit) /home/src/workspaces/project/b.ts +(stored at emit) /home/src/workspaces/project/c.ts +(stored at emit) /home/src/workspaces/project/d.ts + + +Edit [3]:: with declaration and declarationMap + +tsgo --build --verbose --declaration --declarationMap +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.d.ts] *modified* +export declare const a = 10; +//# sourceMappingURL=a.d.ts.map +//// [/home/src/workspaces/project/a.d.ts.map] *new* +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +//// [/home/src/workspaces/project/b.d.ts] *modified* +export declare const b = 10; +//# sourceMappingURL=b.d.ts.map +//// [/home/src/workspaces/project/b.d.ts.map] *new* +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +//// [/home/src/workspaces/project/c.d.ts] *modified* +export declare const c = 10; +//# sourceMappingURL=c.d.ts.map +//// [/home/src/workspaces/project/c.d.ts.map] *new* +{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["c.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} +//// [/home/src/workspaces/project/d.d.ts] *modified* +export declare const d = 10; +//# sourceMappingURL=d.d.ts.map +//// [/home/src/workspaces/project/d.d.ts.map] *new* +{"version":3,"file":"d.d.ts","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1772 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [4]:: no change + +tsgo --build --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is up to date because newest input 'd.ts' is older than output 'tsconfig.tsbuildinfo' + + + + +Edit [5]:: local change +//// [/home/src/workspaces/project/a.ts] *modified* +export const a = 10;const aLocal = 100; + +tsgo --build --verbose +ExitStatus:: Success +Output:: +[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'... + +//// [/home/src/workspaces/project/a.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 100; + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1720 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/project/a.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/project/a.ts + + +Edit [6]:: with declaration and declarationMap + +tsgo --build --verbose --declaration --declarationMap +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.d.ts] *rewrite with same content* +//// [/home/src/workspaces/project/a.d.ts.map] *rewrite with same content* +//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content* +//// [/home/src/workspaces/project/b.d.ts.map] *rewrite with same content* +//// [/home/src/workspaces/project/c.d.ts] *rewrite with same content* +//// [/home/src/workspaces/project/c.d.ts.map] *rewrite with same content* +//// [/home/src/workspaces/project/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/project/d.d.ts.map] *rewrite with same content* +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1773 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [7]:: no change + +tsgo --build --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is up to date because newest input 'a.ts' is older than output 'tsconfig.tsbuildinfo' + + + + +Edit [8]:: with inlineSourceMap + +tsgo --build --verbose --inlineSourceMap +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 100; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQUEsTUFBTSxNQUFNLEdBQUcsR0FBRyxDQUFDIn0= +//// [/home/src/workspaces/project/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQUEsTUFBTSxNQUFNLEdBQUcsRUFBRSxDQUFDIn0= +//// [/home/src/workspaces/project/c.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= +//// [/home/src/workspaces/project/d.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"inlineSourceMap":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "inlineSourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1755 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [9]:: with sourceMap + +tsgo --build --verbose --sourceMap +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 100; +//# sourceMappingURL=a.js.map +//// [/home/src/workspaces/project/a.js.map] *modified* +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,MAAM,MAAM,GAAG,GAAG,CAAC"} +//// [/home/src/workspaces/project/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; +//# sourceMappingURL=b.js.map +//// [/home/src/workspaces/project/b.js.map] *rewrite with same content* +//// [/home/src/workspaces/project/c.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=c.js.map +//// [/home/src/workspaces/project/c.js.map] *rewrite with same content* +//// [/home/src/workspaces/project/d.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=d.js.map +//// [/home/src/workspaces/project/d.js.map] *rewrite with same content* +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"sourceMap":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "sourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1749 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [10]:: emit js files + +tsgo --build --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 100; + +//// [/home/src/workspaces/project/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; + +//// [/home/src/workspaces/project/c.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; + +//// [/home/src/workspaces/project/d.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1720 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [11]:: with declaration and declarationMap + +tsgo --build --verbose --declaration --declarationMap +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.d.ts] *rewrite with same content* +//// [/home/src/workspaces/project/a.d.ts.map] *rewrite with same content* +//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content* +//// [/home/src/workspaces/project/b.d.ts.map] *rewrite with same content* +//// [/home/src/workspaces/project/c.d.ts] *rewrite with same content* +//// [/home/src/workspaces/project/c.d.ts.map] *rewrite with same content* +//// [/home/src/workspaces/project/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/project/d.d.ts.map] *rewrite with same content* +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1773 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [12]:: with declaration and declarationMap, should not re-emit + +tsgo --build --verbose --declaration --declarationMap +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is up to date because newest input 'a.ts' is older than output 'tsconfig.tsbuildinfo' + + diff --git a/testdata/baselines/reference/tsbuild/commandLine/different-options.js b/testdata/baselines/reference/tsbuild/commandLine/different-options.js new file mode 100644 index 0000000000..a8886b367e --- /dev/null +++ b/testdata/baselines/reference/tsbuild/commandLine/different-options.js @@ -0,0 +1,1316 @@ +currentDirectory::/home/src/workspaces/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/project/a.ts] *new* +export const a = 10;const aLocal = 10; +//// [/home/src/workspaces/project/b.ts] *new* +export const b = 10;const bLocal = 10; +//// [/home/src/workspaces/project/c.ts] *new* +import { a } from "./a";export const c = a; +//// [/home/src/workspaces/project/d.ts] *new* +import { b } from "./b";export const d = b; +//// [/home/src/workspaces/project/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true + } +} + +tsgo --build --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/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 const a = 10; + +//// [/home/src/workspaces/project/a.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 10; + +//// [/home/src/workspaces/project/b.d.ts] *new* +export declare const b = 10; + +//// [/home/src/workspaces/project/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; + +//// [/home/src/workspaces/project/c.d.ts] *new* +export declare const c = 10; + +//// [/home/src/workspaces/project/c.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; + +//// [/home/src/workspaces/project/d.d.ts] *new* +export declare const d = 10; + +//// [/home/src/workspaces/project/d.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1782 +} + +/home/src/workspaces/project/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 +*refresh* /home/src/workspaces/project/c.ts +*refresh* /home/src/workspaces/project/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/project/a.ts +(stored at emit) /home/src/workspaces/project/b.ts +(stored at emit) /home/src/workspaces/project/c.ts +(stored at emit) /home/src/workspaces/project/d.ts + + +Edit [0]:: with sourceMap + +tsgo --build --verbose --sourceMap +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 10; +//# sourceMappingURL=a.js.map +//// [/home/src/workspaces/project/a.js.map] *new* +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,MAAM,MAAM,GAAG,EAAE,CAAC"} +//// [/home/src/workspaces/project/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; +//# sourceMappingURL=b.js.map +//// [/home/src/workspaces/project/b.js.map] *new* +{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,MAAM,MAAM,GAAG,EAAE,CAAC"} +//// [/home/src/workspaces/project/c.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=c.js.map +//// [/home/src/workspaces/project/c.js.map] *new* +{"version":3,"file":"c.js","sourceRoot":"","sources":["c.ts"],"names":[],"mappings":";;;AAAA,2BAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} +//// [/home/src/workspaces/project/d.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=d.js.map +//// [/home/src/workspaces/project/d.js.map] *new* +{"version":3,"file":"d.js","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":";;;AAAA,2BAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"sourceMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true, + "sourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1799 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [1]:: should re-emit only js so they dont contain sourcemap + +tsgo --build --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 10; + +//// [/home/src/workspaces/project/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; + +//// [/home/src/workspaces/project/c.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; + +//// [/home/src/workspaces/project/d.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1782 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [2]:: with declaration should not emit anything + +tsgo --build --verbose --declaration +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is up to date because newest input 'd.ts' is older than output 'tsconfig.tsbuildinfo' + + + + +Edit [3]:: no change + +tsgo --build --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is up to date because newest input 'd.ts' is older than output 'tsconfig.tsbuildinfo' + + + + +Edit [4]:: with declaration and declarationMap + +tsgo --build --verbose --declaration --declarationMap +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.d.ts] *modified* +export declare const a = 10; +//# sourceMappingURL=a.d.ts.map +//// [/home/src/workspaces/project/a.d.ts.map] *new* +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +//// [/home/src/workspaces/project/b.d.ts] *modified* +export declare const b = 10; +//# sourceMappingURL=b.d.ts.map +//// [/home/src/workspaces/project/b.d.ts.map] *new* +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +//// [/home/src/workspaces/project/c.d.ts] *modified* +export declare const c = 10; +//# sourceMappingURL=c.d.ts.map +//// [/home/src/workspaces/project/c.d.ts.map] *new* +{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["c.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} +//// [/home/src/workspaces/project/d.d.ts] *modified* +export declare const d = 10; +//# sourceMappingURL=d.d.ts.map +//// [/home/src/workspaces/project/d.d.ts.map] *new* +{"version":3,"file":"d.d.ts","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"declaration":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1823 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [5]:: should re-emit only dts so they dont contain sourcemap + +tsgo --build --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.d.ts] *modified* +export declare const a = 10; + +//// [/home/src/workspaces/project/b.d.ts] *modified* +export declare const b = 10; + +//// [/home/src/workspaces/project/c.d.ts] *modified* +export declare const c = 10; + +//// [/home/src/workspaces/project/d.d.ts] *modified* +export declare const d = 10; + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1782 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [6]:: with emitDeclarationOnly should not emit anything + +tsgo --build --verbose --emitDeclarationOnly +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is up to date because newest input 'd.ts' is older than output 'tsconfig.tsbuildinfo' + + + + +Edit [7]:: no change + +tsgo --build --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is up to date because newest input 'd.ts' is older than output 'tsconfig.tsbuildinfo' + + + + +Edit [8]:: local change +//// [/home/src/workspaces/project/a.ts] *modified* +export const a = 10;const aLocal = 100; + +tsgo --build --verbose +ExitStatus:: Success +Output:: +[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'... + +//// [/home/src/workspaces/project/a.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 100; + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1783 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/project/a.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/project/a.ts + + +Edit [9]:: with declaration should not emit anything + +tsgo --build --verbose --declaration +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is up to date because newest input 'a.ts' is older than output 'tsconfig.tsbuildinfo' + + + + +Edit [10]:: with inlineSourceMap + +tsgo --build --verbose --inlineSourceMap +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 100; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQUEsTUFBTSxNQUFNLEdBQUcsR0FBRyxDQUFDIn0= +//// [/home/src/workspaces/project/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQUEsTUFBTSxNQUFNLEdBQUcsRUFBRSxDQUFDIn0= +//// [/home/src/workspaces/project/c.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= +//// [/home/src/workspaces/project/d.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"inlineSourceMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true, + "inlineSourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1806 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [11]:: with sourceMap + +tsgo --build --verbose --sourceMap +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/a.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 100; +//# sourceMappingURL=a.js.map +//// [/home/src/workspaces/project/a.js.map] *modified* +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,MAAM,MAAM,GAAG,GAAG,CAAC"} +//// [/home/src/workspaces/project/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; +//# sourceMappingURL=b.js.map +//// [/home/src/workspaces/project/b.js.map] *rewrite with same content* +//// [/home/src/workspaces/project/c.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=c.js.map +//// [/home/src/workspaces/project/c.js.map] *rewrite with same content* +//// [/home/src/workspaces/project/d.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=d.js.map +//// [/home/src/workspaces/project/d.js.map] *rewrite with same content* +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"sourceMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true, + "sourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1800 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js b/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js new file mode 100644 index 0000000000..74717454ba --- /dev/null +++ b/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js @@ -0,0 +1,1083 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/project1/src/a.ts] *new* +export const a = 10;const aLocal = 10; +//// [/home/src/workspaces/solution/project1/src/b.ts] *new* +export const b = 10;const bLocal = 10; +//// [/home/src/workspaces/solution/project1/src/c.ts] *new* +import { a } from "./a";export const c = a; +//// [/home/src/workspaces/solution/project1/src/d.ts] *new* +import { b } from "./b";export const d = b; +//// [/home/src/workspaces/solution/project1/src/tsconfig.json] *new* +{ + "compilerOptions": { "incremental": true, "declaration": true, "emitDeclarationOnly": true } +} +//// [/home/src/workspaces/solution/project2/src/e.ts] *new* +export const e = 10; +//// [/home/src/workspaces/solution/project2/src/f.ts] *new* +import { a } from "../../project1/src/a"; export const f = a; +//// [/home/src/workspaces/solution/project2/src/g.ts] *new* +import { b } from "../../project1/src/b"; export const g = b; +//// [/home/src/workspaces/solution/project2/src/tsconfig.json] *new* +{ + "compilerOptions": { "incremental": true, "declaration": true, "emitDeclarationOnly": true }, + "references": [{ "path": "../../project1/src" }] +} + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output file 'project1/src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because output file 'project2/src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/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/project1/src/a.d.ts] *new* +export declare const a = 10; + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *new* +export declare const b = 10; + +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *new* +export declare const c = 10; + +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *new* +export declare const d = 10; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"emitDeclarationOnly":true,"declaration":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "emitDeclarationOnly": true, + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1783 +} +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *new* +export declare const e = 10; + +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *new* +export declare const f = 10; + +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *new* +export declare const g = 10; + +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"emitDeclarationOnly":true,"declaration":true},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "emitDeclarationOnly": true, + "declaration": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "size": 1837 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [0]:: no change + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/d.ts' is older than output 'project1/src/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: + + +Edit [1]:: change +//// [/home/src/workspaces/solution/project1/src/a.ts] *modified* +export const a = 10;const aLocal = 10;const aa = 10; + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/a.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"emitDeclarationOnly":true,"declaration":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "emitDeclarationOnly": true, + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1797 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/a.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/a.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: + + +Edit [2]:: emit js files + +tsgo --b project2/src --verbose --emitDeclarationOnly false +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because buildinfo file 'project1/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 10; +const aa = 10; + +//// [/home/src/workspaces/solution/project1/src/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; + +//// [/home/src/workspaces/solution/project1/src/c.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; + +//// [/home/src/workspaces/solution/project1/src/d.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"emitDeclarationOnly":false,"declaration":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "emitDeclarationOnly": false, + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1798 +} +//// [/home/src/workspaces/solution/project2/src/e.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.e = void 0; +exports.e = 10; + +//// [/home/src/workspaces/solution/project2/src/f.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.f = void 0; +const a_1 = require("../../project1/src/a"); +exports.f = a_1.a; + +//// [/home/src/workspaces/solution/project2/src/g.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.g = void 0; +const b_1 = require("../../project1/src/b"); +exports.g = b_1.b; + +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"emitDeclarationOnly":false,"declaration":true},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "emitDeclarationOnly": false, + "declaration": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "size": 1838 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: + + +Edit [3]:: no change + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/a.ts' is older than output 'project1/src/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: + + +Edit [4]:: no change run with js emit + +tsgo --b project2/src --verbose --emitDeclarationOnly false +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/a.ts' is older than output 'project1/src/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: + + +Edit [5]:: js emit with change +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const blocal = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly false +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/b.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; +const blocal = 10; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"faa2f145f8fb2df488a27873cf169a9a-export const b = 10;const bLocal = 10;const blocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"emitDeclarationOnly":false,"declaration":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "faa2f145f8fb2df488a27873cf169a9a-export const b = 10;const bLocal = 10;const blocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "faa2f145f8fb2df488a27873cf169a9a-export const b = 10;const bLocal = 10;const blocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "emitDeclarationOnly": false, + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1816 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/b.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/b.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: diff --git a/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration.js b/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration.js new file mode 100644 index 0000000000..9e075e4ca1 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration.js @@ -0,0 +1,572 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/project1/src/a.ts] *new* +export const a = 10;const aLocal = 10; +//// [/home/src/workspaces/solution/project1/src/b.ts] *new* +export const b = 10;const bLocal = 10; +//// [/home/src/workspaces/solution/project1/src/c.ts] *new* +import { a } from "./a";export const c = a; +//// [/home/src/workspaces/solution/project1/src/d.ts] *new* +import { b } from "./b";export const d = b; +//// [/home/src/workspaces/solution/project1/src/tsconfig.json] *new* +{ + "compilerOptions": { "declaration": true, "emitDeclarationOnly": true } +} +//// [/home/src/workspaces/solution/project2/src/e.ts] *new* +export const e = 10; +//// [/home/src/workspaces/solution/project2/src/f.ts] *new* +import { a } from "../../project1/src/a"; export const f = a; +//// [/home/src/workspaces/solution/project2/src/g.ts] *new* +import { b } from "../../project1/src/b"; export const g = b; +//// [/home/src/workspaces/solution/project2/src/tsconfig.json] *new* +{ + "compilerOptions": { "declaration": true, "emitDeclarationOnly": true }, + "references": [{ "path": "../../project1/src" }] +} + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output file 'project1/src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because output file 'project2/src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/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/project1/src/a.d.ts] *new* +export declare const a = 10; + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *new* +export declare const b = 10; + +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *new* +export declare const c = 10; + +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *new* +export declare const d = 10; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts","./d.ts"]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": "./a.ts" + }, + { + "files": [ + "./b.ts" + ], + "original": "./b.ts" + }, + { + "files": [ + "./c.ts" + ], + "original": "./c.ts" + }, + { + "files": [ + "./d.ts" + ], + "original": "./d.ts" + } + ], + "size": 72 +} +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *new* +export declare const e = 10; + +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *new* +export declare const f = 10; + +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *new* +export declare const g = 10; + +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":["./e.ts","./f.ts","./g.ts"]} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./e.ts" + ], + "original": "./e.ts" + }, + { + "files": [ + "./f.ts" + ], + "original": "./f.ts" + }, + { + "files": [ + "./g.ts" + ], + "original": "./g.ts" + } + ], + "size": 77 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [0]:: no change + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/d.ts' is older than output 'project1/src/a.d.ts' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [1]:: change +//// [/home/src/workspaces/solution/project1/src/a.ts] *modified* +export const a = 10;const aLocal = 10;const aa = 10; + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/a.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [2]:: emit js files + +tsgo --b project2/src --verbose --emitDeclarationOnly false +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output file 'project1/src/a.js' does not exist + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/a.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 10; +const aa = 10; + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; + +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/c.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; + +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.e = void 0; +exports.e = 10; + +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.f = void 0; +const a_1 = require("../../project1/src/a"); +exports.f = a_1.a; + +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.g = void 0; +const b_1 = require("../../project1/src/b"); +exports.g = b_1.b; + +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [3]:: no change + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/a.ts' is older than output 'project1/src/a.d.ts' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [4]:: no change run with js emit + +tsgo --b project2/src --verbose --emitDeclarationOnly false +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/a.ts' is older than output 'project1/src/a.js' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [5]:: js emit with change +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const blocal = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly false +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/b.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/a.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; +const blocal = 10; + +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/c.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts diff --git a/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline.js b/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline.js new file mode 100644 index 0000000000..bdb716992f --- /dev/null +++ b/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline.js @@ -0,0 +1,958 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/project1/src/a.ts] *new* +export const a = 10;const aLocal = 10; +//// [/home/src/workspaces/solution/project1/src/b.ts] *new* +export const b = 10;const bLocal = 10; +//// [/home/src/workspaces/solution/project1/src/c.ts] *new* +import { a } from "./a";export const c = a; +//// [/home/src/workspaces/solution/project1/src/d.ts] *new* +import { b } from "./b";export const d = b; +//// [/home/src/workspaces/solution/project1/src/tsconfig.json] *new* +{ + "compilerOptions": { "composite": true, "emitDeclarationOnly": true } +} +//// [/home/src/workspaces/solution/project2/src/e.ts] *new* +export const e = 10; +//// [/home/src/workspaces/solution/project2/src/f.ts] *new* +import { a } from "../../project1/src/a"; export const f = a; +//// [/home/src/workspaces/solution/project2/src/g.ts] *new* +import { b } from "../../project1/src/b"; export const g = b; +//// [/home/src/workspaces/solution/project2/src/tsconfig.json] *new* +{ + "compilerOptions": { "composite": true, "emitDeclarationOnly": true }, + "references": [{ "path": "../../project1/src" }] +} + +tsgo --b project2/src --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output file 'project1/src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because output file 'project2/src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +//// [/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/project1/src/a.d.ts] *new* +export declare const a = 10; + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *new* +export declare const b = 10; + +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *new* +export declare const c = 10; + +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *new* +export declare const d = 10; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1815 +} +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *new* +export declare const e = 10; + +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *new* +export declare const f = 10; + +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *new* +export declare const g = 10; + +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"composite":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[6,2]],"latestChangedDtsFile":"./g.d.ts"} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "latestChangedDtsFile": "./g.d.ts", + "size": 1826 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project2/src/e.ts +*refresh* /home/src/workspaces/solution/project1/src/a.d.ts +*refresh* /home/src/workspaces/solution/project2/src/f.ts +*refresh* /home/src/workspaces/solution/project1/src/b.d.ts +*refresh* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [0]:: no change + +tsgo --b project2/src --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/d.ts' is older than output 'project1/src/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is up to date because newest input 'project2/src/g.ts' is older than output 'project2/src/tsconfig.tsbuildinfo' + + + + +Edit [1]:: change +//// [/home/src/workspaces/solution/project1/src/a.ts] *modified* +export const a = 10;const aLocal = 10;const aa = 10; + +tsgo --b project2/src --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/a.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[HH:MM:SS AM] Updating output timestamps of project 'project2/src/tsconfig.json'... + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1829 +} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *mTime changed* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/a.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/a.ts + + +Edit [2]:: emit js files + +tsgo --b project2/src --verbose --emitDeclarationOnly false +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because buildinfo file 'project1/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +//// [/home/src/workspaces/solution/project1/src/a.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +const aLocal = 10; +const aa = 10; + +//// [/home/src/workspaces/solution/project1/src/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; + +//// [/home/src/workspaces/solution/project1/src/c.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; + +//// [/home/src/workspaces/solution/project1/src/d.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"emitDeclarationOnly":false},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": false + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1830 +} +//// [/home/src/workspaces/solution/project2/src/e.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.e = void 0; +exports.e = 10; + +//// [/home/src/workspaces/solution/project2/src/f.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.f = void 0; +const a_1 = require("../../project1/src/a"); +exports.f = a_1.a; + +//// [/home/src/workspaces/solution/project2/src/g.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.g = void 0; +const b_1 = require("../../project1/src/b"); +exports.g = b_1.b; + +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"composite":true,"emitDeclarationOnly":false},"referencedMap":[[4,1],[6,2]],"latestChangedDtsFile":"./g.d.ts"} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": false + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "latestChangedDtsFile": "./g.d.ts", + "size": 1827 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [3]:: no change + +tsgo --b project2/src --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/a.ts' is older than output 'project1/src/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is up to date because newest input 'project2/src/g.ts' is older than output 'project2/src/tsconfig.tsbuildinfo' + + + + +Edit [4]:: no change run with js emit + +tsgo --b project2/src --verbose --emitDeclarationOnly false +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/a.ts' is older than output 'project1/src/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is up to date because newest input 'project2/src/g.ts' is older than output 'project2/src/tsconfig.tsbuildinfo' + + + + +Edit [5]:: js emit with change +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const blocal = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly false +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/b.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[HH:MM:SS AM] Updating output timestamps of project 'project2/src/tsconfig.json'... + +//// [/home/src/workspaces/solution/project1/src/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; +const blocal = 10; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"faa2f145f8fb2df488a27873cf169a9a-export const b = 10;const bLocal = 10;const blocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"emitDeclarationOnly":false},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "faa2f145f8fb2df488a27873cf169a9a-export const b = 10;const bLocal = 10;const blocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "faa2f145f8fb2df488a27873cf169a9a-export const b = 10;const bLocal = 10;const blocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": false + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1848 +} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *mTime changed* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/b.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/b.ts diff --git a/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js b/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js new file mode 100644 index 0000000000..5955062432 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js @@ -0,0 +1,2063 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/project1/src/a.ts] *new* +export const a = 10;const aLocal = 10; +//// [/home/src/workspaces/solution/project1/src/b.ts] *new* +export const b = 10;const bLocal = 10; +//// [/home/src/workspaces/solution/project1/src/c.ts] *new* +import { a } from "./a";export const c = a; +//// [/home/src/workspaces/solution/project1/src/d.ts] *new* +import { b } from "./b";export const d = b; +//// [/home/src/workspaces/solution/project1/src/tsconfig.json] *new* +{ + "compilerOptions": { "incremental": true, "declaration": true } +} +//// [/home/src/workspaces/solution/project2/src/e.ts] *new* +export const e = 10; +//// [/home/src/workspaces/solution/project2/src/f.ts] *new* +import { a } from "../../project1/src/a"; export const f = a; +//// [/home/src/workspaces/solution/project2/src/g.ts] *new* +import { b } from "../../project1/src/b"; export const g = b; +//// [/home/src/workspaces/solution/project2/src/tsconfig.json] *new* +{ + "compilerOptions": { "incremental": true, "declaration": true }, + "references": [{ "path": "../../project1/src" }] +} + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output file 'project1/src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because output file 'project2/src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/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/project1/src/a.d.ts] *new* +export declare const a = 10; + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *new* +export declare const b = 10; + +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *new* +export declare const c = 10; + +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *new* +export declare const d = 10; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"emitDeclarationOnly":true,"declaration":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "emitDeclarationOnly": true, + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1783 +} +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *new* +export declare const e = 10; + +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *new* +export declare const f = 10; + +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *new* +export declare const g = 10; + +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"emitDeclarationOnly":true,"declaration":true},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "emitDeclarationOnly": true, + "declaration": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "size": 1837 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [0]:: no change + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/d.ts' is older than output 'project1/src/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: + + +Edit [1]:: local change +//// [/home/src/workspaces/solution/project1/src/a.ts] *modified* +export const a = 10;const aLocal = 10;const aa = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/a.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"emitDeclarationOnly":true,"declaration":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "emitDeclarationOnly": true, + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1797 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/a.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/a.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: + + +Edit [2]:: non local change +//// [/home/src/workspaces/solution/project1/src/a.ts] *modified* +export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/a.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *modified* +export declare const a = 10; +export declare const aaa = 10; + +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"emitDeclarationOnly":true,"declaration":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "emitDeclarationOnly": true, + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1851 +} +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"emitDeclarationOnly":true,"declaration":true},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "emitDeclarationOnly": true, + "declaration": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "size": 1869 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/a.ts +(computed .d.ts) /home/src/workspaces/solution/project1/src/c.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(used version) /home/src/workspaces/solution/project1/src/a.d.ts +(computed .d.ts) /home/src/workspaces/solution/project2/src/f.ts + + +Edit [3]:: emit js files + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because buildinfo file 'project1/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.aaa = exports.a = void 0; +exports.a = 10; +const aLocal = 10; +const aa = 10; +exports.aaa = 10; + +//// [/home/src/workspaces/solution/project1/src/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; + +//// [/home/src/workspaces/solution/project1/src/c.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; + +//// [/home/src/workspaces/solution/project1/src/d.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1824 +} +//// [/home/src/workspaces/solution/project2/src/e.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.e = void 0; +exports.e = 10; + +//// [/home/src/workspaces/solution/project2/src/f.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.f = void 0; +const a_1 = require("../../project1/src/a"); +exports.f = a_1.a; + +//// [/home/src/workspaces/solution/project2/src/g.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.g = void 0; +const b_1 = require("../../project1/src/b"); +exports.g = b_1.b; + +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"declaration":true},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "size": 1842 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: + + +Edit [4]:: no change + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/a.ts' is older than output 'project1/src/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: + + +Edit [5]:: js emit with change without emitDeclarationOnly +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const alocal = 10; + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/b.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; +const alocal = 10; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n","impliedNodeFormat":1},{"version":"f386e1d064172e4046fcc4616723f508-export const b = 10;const bLocal = 10;const alocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "f386e1d064172e4046fcc4616723f508-export const b = 10;const bLocal = 10;const alocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "f386e1d064172e4046fcc4616723f508-export const b = 10;const bLocal = 10;const alocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1842 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/b.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/b.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: + + +Edit [6]:: local change +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/b.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n","impliedNodeFormat":1},{"version":"aaade84f46dfd556c2424cda559cceb1-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"emitDeclarationOnly":true,"declaration":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "aaade84f46dfd556c2424cda559cceb1-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "aaade84f46dfd556c2424cda559cceb1-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "emitDeclarationOnly": true, + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1885 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/b.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/b.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: + + +Edit [7]:: non local change +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/b.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *modified* +export declare const b = 10; +export declare const aaaaa = 10; + +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n","impliedNodeFormat":1},{"version":"5ec434ed3f5c4b5bf474f907d0251bc7-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;","signature":"b41428b0658a7579227ae092a39341d9-export declare const b = 10;\nexport declare const aaaaa = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"emitDeclarationOnly":true,"declaration":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "5ec434ed3f5c4b5bf474f907d0251bc7-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;", + "signature": "b41428b0658a7579227ae092a39341d9-export declare const b = 10;\nexport declare const aaaaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "5ec434ed3f5c4b5bf474f907d0251bc7-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;", + "signature": "b41428b0658a7579227ae092a39341d9-export declare const b = 10;\nexport declare const aaaaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "emitDeclarationOnly": true, + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1943 +} +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"b41428b0658a7579227ae092a39341d9-export declare const b = 10;\nexport declare const aaaaa = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"emitDeclarationOnly":true,"declaration":true},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "b41428b0658a7579227ae092a39341d9-export declare const b = 10;\nexport declare const aaaaa = 10;\n", + "signature": "b41428b0658a7579227ae092a39341d9-export declare const b = 10;\nexport declare const aaaaa = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "emitDeclarationOnly": true, + "declaration": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "size": 1903 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/b.ts +(computed .d.ts) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(used version) /home/src/workspaces/solution/project1/src/b.d.ts +(computed .d.ts) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [8]:: js emit with change without emitDeclarationOnly +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10; + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because buildinfo file 'project1/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *modified* +export declare const b = 10; +export declare const aaaaa = 10; +export declare const a2 = 10; + +//// [/home/src/workspaces/solution/project1/src/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a2 = exports.aaaaa = exports.b = void 0; +exports.b = 10; +const bLocal = 10; +const alocal = 10; +const aaaa = 10; +exports.aaaaa = 10; +exports.a2 = 10; + +//// [/home/src/workspaces/solution/project1/src/c.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n","impliedNodeFormat":1},{"version":"5bfdbc5e13f033397af0ab302f42fdf2-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;","signature":"c354a25014e4712419cbd9266c28e943-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true},"referencedMap":[[4,1],[5,2]]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "5bfdbc5e13f033397af0ab302f42fdf2-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;", + "signature": "c354a25014e4712419cbd9266c28e943-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "5bfdbc5e13f033397af0ab302f42fdf2-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;", + "signature": "c354a25014e4712419cbd9266c28e943-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "size": 1968 +} +//// [/home/src/workspaces/solution/project2/src/e.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"c354a25014e4712419cbd9266c28e943-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"declaration":true},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6]} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "c354a25014e4712419cbd9266c28e943-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n", + "signature": "c354a25014e4712419cbd9266c28e943-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "size": 1907 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/b.ts +(computed .d.ts) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(used version) /home/src/workspaces/solution/project1/src/b.d.ts +(computed .d.ts) /home/src/workspaces/solution/project2/src/g.ts diff --git a/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration.js b/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration.js new file mode 100644 index 0000000000..dd9c6f837c --- /dev/null +++ b/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration.js @@ -0,0 +1,818 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/project1/src/a.ts] *new* +export const a = 10;const aLocal = 10; +//// [/home/src/workspaces/solution/project1/src/b.ts] *new* +export const b = 10;const bLocal = 10; +//// [/home/src/workspaces/solution/project1/src/c.ts] *new* +import { a } from "./a";export const c = a; +//// [/home/src/workspaces/solution/project1/src/d.ts] *new* +import { b } from "./b";export const d = b; +//// [/home/src/workspaces/solution/project1/src/tsconfig.json] *new* +{ + "compilerOptions": { "declaration": true } +} +//// [/home/src/workspaces/solution/project2/src/e.ts] *new* +export const e = 10; +//// [/home/src/workspaces/solution/project2/src/f.ts] *new* +import { a } from "../../project1/src/a"; export const f = a; +//// [/home/src/workspaces/solution/project2/src/g.ts] *new* +import { b } from "../../project1/src/b"; export const g = b; +//// [/home/src/workspaces/solution/project2/src/tsconfig.json] *new* +{ + "compilerOptions": { "declaration": true }, + "references": [{ "path": "../../project1/src" }] +} + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output file 'project1/src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because output file 'project2/src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/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/project1/src/a.d.ts] *new* +export declare const a = 10; + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *new* +export declare const b = 10; + +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *new* +export declare const c = 10; + +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *new* +export declare const d = 10; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts","./d.ts"]} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": "./a.ts" + }, + { + "files": [ + "./b.ts" + ], + "original": "./b.ts" + }, + { + "files": [ + "./c.ts" + ], + "original": "./c.ts" + }, + { + "files": [ + "./d.ts" + ], + "original": "./d.ts" + } + ], + "size": 72 +} +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *new* +export declare const e = 10; + +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *new* +export declare const f = 10; + +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *new* +export declare const g = 10; + +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":["./e.ts","./f.ts","./g.ts"]} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./e.ts" + ], + "original": "./e.ts" + }, + { + "files": [ + "./f.ts" + ], + "original": "./f.ts" + }, + { + "files": [ + "./g.ts" + ], + "original": "./g.ts" + } + ], + "size": 77 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [0]:: no change + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/d.ts' is older than output 'project1/src/a.d.ts' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [1]:: local change +//// [/home/src/workspaces/solution/project1/src/a.ts] *modified* +export const a = 10;const aLocal = 10;const aa = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/a.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [2]:: non local change +//// [/home/src/workspaces/solution/project1/src/a.ts] *modified* +export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/a.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *modified* +export declare const a = 10; +export declare const aaa = 10; + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [3]:: emit js files + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output file 'project1/src/a.js' does not exist + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/a.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.aaa = exports.a = void 0; +exports.a = 10; +const aLocal = 10; +const aa = 10; +exports.aaa = 10; + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; + +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/c.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; + +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.e = void 0; +exports.e = 10; + +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.f = void 0; +const a_1 = require("../../project1/src/a"); +exports.f = a_1.a; + +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.g = void 0; +const b_1 = require("../../project1/src/b"); +exports.g = b_1.b; + +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [4]:: no change + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/a.ts' is older than output 'project1/src/a.d.ts' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [5]:: js emit with change without emitDeclarationOnly +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const alocal = 10; + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/b.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/a.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; +const alocal = 10; + +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/c.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [6]:: local change +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/b.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [7]:: non local change +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/b.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *modified* +export declare const b = 10; +export declare const aaaaa = 10; + +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [8]:: js emit with change without emitDeclarationOnly +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10; + +tsgo --b project2/src --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/b.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +project2/src/tsconfig.json:3:20 - error TS6306: Referenced project '/home/src/workspaces/solution/project1/src' must have setting "composite": true. + +3 "references": [{ "path": "../../project1/src" }] +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Found 1 error in project2/src/tsconfig.json:3 + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/a.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *modified* +export declare const b = 10; +export declare const aaaaa = 10; +export declare const a2 = 10; + +//// [/home/src/workspaces/solution/project1/src/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a2 = exports.aaaaa = exports.b = void 0; +exports.b = 10; +const bLocal = 10; +const alocal = 10; +const aaaa = 10; +exports.aaaaa = 10; +exports.a2 = 10; + +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/c.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/e.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /home/src/workspaces/solution/project2/src/e.ts +*not cached* /home/src/workspaces/solution/project1/src/a.d.ts +*not cached* /home/src/workspaces/solution/project2/src/f.ts +*not cached* /home/src/workspaces/solution/project1/src/b.d.ts +*not cached* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts diff --git a/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline.js b/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline.js new file mode 100644 index 0000000000..8284791027 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline.js @@ -0,0 +1,1880 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/project1/src/a.ts] *new* +export const a = 10;const aLocal = 10; +//// [/home/src/workspaces/solution/project1/src/b.ts] *new* +export const b = 10;const bLocal = 10; +//// [/home/src/workspaces/solution/project1/src/c.ts] *new* +import { a } from "./a";export const c = a; +//// [/home/src/workspaces/solution/project1/src/d.ts] *new* +import { b } from "./b";export const d = b; +//// [/home/src/workspaces/solution/project1/src/tsconfig.json] *new* +{ + "compilerOptions": { "composite": true } +} +//// [/home/src/workspaces/solution/project2/src/e.ts] *new* +export const e = 10; +//// [/home/src/workspaces/solution/project2/src/f.ts] *new* +import { a } from "../../project1/src/a"; export const f = a; +//// [/home/src/workspaces/solution/project2/src/g.ts] *new* +import { b } from "../../project1/src/b"; export const g = b; +//// [/home/src/workspaces/solution/project2/src/tsconfig.json] *new* +{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../../project1/src" }] +} + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output file 'project1/src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because output file 'project2/src/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +//// [/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/project1/src/a.d.ts] *new* +export declare const a = 10; + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *new* +export declare const b = 10; + +//// [/home/src/workspaces/solution/project1/src/c.d.ts] *new* +export declare const c = 10; + +//// [/home/src/workspaces/solution/project1/src/d.d.ts] *new* +export declare const d = 10; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1815 +} +//// [/home/src/workspaces/solution/project2/src/e.d.ts] *new* +export declare const e = 10; + +//// [/home/src/workspaces/solution/project2/src/f.d.ts] *new* +export declare const f = 10; + +//// [/home/src/workspaces/solution/project2/src/g.d.ts] *new* +export declare const g = 10; + +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"composite":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[6,2]],"latestChangedDtsFile":"./g.d.ts"} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "latestChangedDtsFile": "./g.d.ts", + "size": 1826 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project1/src/a.ts +(stored at emit) /home/src/workspaces/solution/project1/src/b.ts +(stored at emit) /home/src/workspaces/solution/project1/src/c.ts +(stored at emit) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project2/src/e.ts +*refresh* /home/src/workspaces/solution/project1/src/a.d.ts +*refresh* /home/src/workspaces/solution/project2/src/f.ts +*refresh* /home/src/workspaces/solution/project1/src/b.d.ts +*refresh* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/e.ts +(stored at emit) /home/src/workspaces/solution/project2/src/f.ts +(stored at emit) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [0]:: no change + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/d.ts' is older than output 'project1/src/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is up to date because newest input 'project2/src/g.ts' is older than output 'project2/src/tsconfig.tsbuildinfo' + + + + +Edit [1]:: local change +//// [/home/src/workspaces/solution/project1/src/a.ts] *modified* +export const a = 10;const aLocal = 10;const aa = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/a.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[HH:MM:SS AM] Updating output timestamps of project 'project2/src/tsconfig.json'... + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "6c5c8e86bc8b70be4222f71e05b56f78-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./d.d.ts", + "size": 1829 +} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *mTime changed* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/a.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/a.ts + + +Edit [2]:: non local change +//// [/home/src/workspaces/solution/project1/src/a.ts] *modified* +export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/a.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because output 'project2/src/tsconfig.tsbuildinfo' is older than input 'project1/src' + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +//// [/home/src/workspaces/solution/project1/src/a.d.ts] *modified* +export declare const a = 10; +export declare const aaa = 10; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./a.d.ts"} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./a.d.ts", + "size": 1883 +} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"composite":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[6,2]],"latestChangedDtsFile":"./g.d.ts"} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "latestChangedDtsFile": "./g.d.ts", + "size": 1858 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/a.ts +*refresh* /home/src/workspaces/solution/project1/src/c.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/a.ts +(computed .d.ts) /home/src/workspaces/solution/project1/src/c.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/a.d.ts +*refresh* /home/src/workspaces/solution/project2/src/f.ts +Signatures:: +(used version) /home/src/workspaces/solution/project1/src/a.d.ts +(computed .d.ts) /home/src/workspaces/solution/project2/src/f.ts + + +Edit [3]:: emit js files + +tsgo --b project2/src --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because buildinfo file 'project1/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +//// [/home/src/workspaces/solution/project1/src/a.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.aaa = exports.a = void 0; +exports.a = 10; +const aLocal = 10; +const aa = 10; +exports.aaa = 10; + +//// [/home/src/workspaces/solution/project1/src/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; + +//// [/home/src/workspaces/solution/project1/src/c.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +const a_1 = require("./a"); +exports.c = a_1.a; + +//// [/home/src/workspaces/solution/project1/src/d.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +const b_1 = require("./b"); +exports.d = b_1.b; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./a.d.ts"} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./a.d.ts", + "size": 1856 +} +//// [/home/src/workspaces/solution/project2/src/e.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.e = void 0; +exports.e = 10; + +//// [/home/src/workspaces/solution/project2/src/f.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.f = void 0; +const a_1 = require("../../project1/src/a"); +exports.f = a_1.a; + +//// [/home/src/workspaces/solution/project2/src/g.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.g = void 0; +const b_1 = require("../../project1/src/b"); +exports.g = b_1.b; + +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"composite":true},"referencedMap":[[4,1],[6,2]],"latestChangedDtsFile":"./g.d.ts"} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "latestChangedDtsFile": "./g.d.ts", + "size": 1831 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: + + +Edit [4]:: no change + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is up to date because newest input 'project1/src/a.ts' is older than output 'project1/src/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is up to date because newest input 'project2/src/g.ts' is older than output 'project2/src/tsconfig.tsbuildinfo' + + + + +Edit [5]:: js emit with change without emitDeclarationOnly +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const alocal = 10; + +tsgo --b project2/src --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/b.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[HH:MM:SS AM] Updating output timestamps of project 'project2/src/tsconfig.json'... + +//// [/home/src/workspaces/solution/project1/src/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +const bLocal = 10; +const alocal = 10; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n","impliedNodeFormat":1},{"version":"f386e1d064172e4046fcc4616723f508-export const b = 10;const bLocal = 10;const alocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./a.d.ts"} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "f386e1d064172e4046fcc4616723f508-export const b = 10;const bLocal = 10;const alocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "f386e1d064172e4046fcc4616723f508-export const b = 10;const bLocal = 10;const alocal = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./a.d.ts", + "size": 1874 +} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *mTime changed* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/b.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/b.ts + + +Edit [6]:: local change +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/b.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[HH:MM:SS AM] Updating output timestamps of project 'project2/src/tsconfig.json'... + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n","impliedNodeFormat":1},{"version":"aaade84f46dfd556c2424cda559cceb1-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./a.d.ts"} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "aaade84f46dfd556c2424cda559cceb1-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "aaade84f46dfd556c2424cda559cceb1-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;", + "signature": "eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./a.d.ts", + "size": 1917 +} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *mTime changed* + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/b.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/b.ts + + +Edit [7]:: non local change +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10; + +tsgo --b project2/src --verbose --emitDeclarationOnly +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because output 'project1/src/tsconfig.tsbuildinfo' is older than input 'project1/src/b.ts' + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because output 'project2/src/tsconfig.tsbuildinfo' is older than input 'project1/src' + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *modified* +export declare const b = 10; +export declare const aaaaa = 10; + +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n","impliedNodeFormat":1},{"version":"5ec434ed3f5c4b5bf474f907d0251bc7-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;","signature":"b41428b0658a7579227ae092a39341d9-export declare const b = 10;\nexport declare const aaaaa = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./b.d.ts"} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "5ec434ed3f5c4b5bf474f907d0251bc7-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;", + "signature": "b41428b0658a7579227ae092a39341d9-export declare const b = 10;\nexport declare const aaaaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "5ec434ed3f5c4b5bf474f907d0251bc7-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;", + "signature": "b41428b0658a7579227ae092a39341d9-export declare const b = 10;\nexport declare const aaaaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./b.d.ts", + "size": 1975 +} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"b41428b0658a7579227ae092a39341d9-export declare const b = 10;\nexport declare const aaaaa = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"composite":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[6,2]],"latestChangedDtsFile":"./g.d.ts"} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "b41428b0658a7579227ae092a39341d9-export declare const b = 10;\nexport declare const aaaaa = 10;\n", + "signature": "b41428b0658a7579227ae092a39341d9-export declare const b = 10;\nexport declare const aaaaa = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "latestChangedDtsFile": "./g.d.ts", + "size": 1892 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/b.ts +(computed .d.ts) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/b.d.ts +*refresh* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(used version) /home/src/workspaces/solution/project1/src/b.d.ts +(computed .d.ts) /home/src/workspaces/solution/project2/src/g.ts + + +Edit [8]:: js emit with change without emitDeclarationOnly +//// [/home/src/workspaces/solution/project1/src/b.ts] *modified* +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10; + +tsgo --b project2/src --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * project1/src/tsconfig.json + * project2/src/tsconfig.json + +[HH:MM:SS AM] Project 'project1/src/tsconfig.json' is out of date because buildinfo file 'project1/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'project1/src/tsconfig.json'... + +[HH:MM:SS AM] Project 'project2/src/tsconfig.json' is out of date because buildinfo file 'project2/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[HH:MM:SS AM] Building project 'project2/src/tsconfig.json'... + +//// [/home/src/workspaces/solution/project1/src/a.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/b.d.ts] *modified* +export declare const b = 10; +export declare const aaaaa = 10; +export declare const a2 = 10; + +//// [/home/src/workspaces/solution/project1/src/b.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a2 = exports.aaaaa = exports.b = void 0; +exports.b = 10; +const bLocal = 10; +const alocal = 10; +const aaaa = 10; +exports.aaaaa = 10; +exports.a2 = 10; + +//// [/home/src/workspaces/solution/project1/src/c.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/d.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n","impliedNodeFormat":1},{"version":"5bfdbc5e13f033397af0ab302f42fdf2-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;","signature":"c354a25014e4712419cbd9266c28e943-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./b.d.ts"} +//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c7d25266cf9b041c81c1bb9d74e21155-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./b.ts", + "version": "5bfdbc5e13f033397af0ab302f42fdf2-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;", + "signature": "c354a25014e4712419cbd9266c28e943-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "5bfdbc5e13f033397af0ab302f42fdf2-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;", + "signature": "c354a25014e4712419cbd9266c28e943-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./c.ts", + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./d.ts", + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./a.ts" + ], + [ + "./b.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "latestChangedDtsFile": "./b.d.ts", + "size": 2000 +} +//// [/home/src/workspaces/solution/project2/src/e.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/f.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/g.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2,4,6],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"26403a4711355fb137eef9a25ce87785-export const e = 10;","signature":"f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n","impliedNodeFormat":1},"5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n",{"version":"e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n","impliedNodeFormat":1},"c354a25014e4712419cbd9266c28e943-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n",{"version":"06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[3],[5]],"options":{"composite":true},"referencedMap":[[4,1],[6,2]],"latestChangedDtsFile":"./g.d.ts"} +//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./e.ts" + ], + "original": 2 + }, + { + "files": [ + "./f.ts" + ], + "original": 4 + }, + { + "files": [ + "./g.ts" + ], + "original": 6 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./e.ts", + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "26403a4711355fb137eef9a25ce87785-export const e = 10;", + "signature": "f994d14efb4fce4ea854d5cfd729fc0d-export declare const e = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/a.d.ts", + "version": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "signature": "5e35917ffa37324af3ace0b179493b37-export declare const a = 10;\nexport declare const aaa = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./f.ts", + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e7c04a1af5b0f6d8541b63ff23aca1e3-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "17442bcc150c3a3dd19c25d5affcc9fa-export declare const f = 10;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../project1/src/b.d.ts", + "version": "c354a25014e4712419cbd9266c28e943-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n", + "signature": "c354a25014e4712419cbd9266c28e943-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./g.ts", + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "06b9b3562579ebca65e399849c2a6a3a-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "4b3f5082fb1783241d51fa14c76e770a-export declare const g = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "latestChangedDtsFile": "./g.d.ts", + "size": 1896 +} + +/home/src/workspaces/solution/project1/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/b.ts +*refresh* /home/src/workspaces/solution/project1/src/d.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project1/src/b.ts +(computed .d.ts) /home/src/workspaces/solution/project1/src/d.ts + +/home/src/workspaces/solution/project2/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project1/src/b.d.ts +*refresh* /home/src/workspaces/solution/project2/src/g.ts +Signatures:: +(used version) /home/src/workspaces/solution/project1/src/b.d.ts +(computed .d.ts) /home/src/workspaces/solution/project2/src/g.ts diff --git a/testdata/baselines/reference/tsbuild/commandLine/help.js b/testdata/baselines/reference/tsbuild/commandLine/help.js index 098ec04b55..d565e54fc2 100644 --- a/testdata/baselines/reference/tsbuild/commandLine/help.js +++ b/testdata/baselines/reference/tsbuild/commandLine/help.js @@ -6,7 +6,6 @@ tsgo --build --help ExitStatus:: Success Output:: Version FakeTSVersion - tsc: The TypeScript Compiler - Version FakeTSVersion BUILD OPTIONS diff --git a/testdata/baselines/reference/tsbuild/commandLine/when-build-not-first-argument.js b/testdata/baselines/reference/tsbuild/commandLine/when-build-not-first-argument.js index 608553534e..d44964311b 100644 --- a/testdata/baselines/reference/tsbuild/commandLine/when-build-not-first-argument.js +++ b/testdata/baselines/reference/tsbuild/commandLine/when-build-not-first-argument.js @@ -7,3 +7,4 @@ ExitStatus:: DiagnosticsPresent_OutputsSkipped Output:: error TS5093: Compiler option '--verbose' may only be used with '--build'. error TS6369: Option '--build' must be the first command line argument. + diff --git a/testdata/baselines/reference/tsbuild/configFileErrors/missing-config-file.js b/testdata/baselines/reference/tsbuild/configFileErrors/missing-config-file.js new file mode 100644 index 0000000000..c194821e7e --- /dev/null +++ b/testdata/baselines/reference/tsbuild/configFileErrors/missing-config-file.js @@ -0,0 +1,12 @@ +currentDirectory::/home/src/workspaces/project +useCaseSensitiveFileNames::true +Input:: + +tsgo --b bogus.json +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +error TS6053: File '/home/src/workspaces/project/bogus.json' not found. + +Found 1 error. + + diff --git a/testdata/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file.js b/testdata/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file.js new file mode 100644 index 0000000000..396284c950 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file.js @@ -0,0 +1,398 @@ +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 +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +tsconfig.json:7:9 - error TS1005: ',' expected. + +7 "b.ts" +   ~~~~~~ + + +Found 1 error in tsconfig.json:7 + +//// [/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","root":[[2,3]],"fileNames":["../../tslibs/TS/Lib/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", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "latestChangedDtsFile": "./b.d.ts", + "size": 1351 +} + +/home/src/workspaces/project/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" + ] +} + +tsgo --b +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +tsconfig.json:7:9 - error TS1005: ',' expected. + +7 "b.ts" +   ~~~~~~ + + +Found 1 error in tsconfig.json:7 + + +/home/src/workspaces/project/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() { } + +tsgo --b +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +tsconfig.json:7:9 - error TS1005: ',' expected. + +7 "b.ts" +   ~~~~~~ + + +Found 1 error in tsconfig.json:7 + +//// [/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","root":[[2,3]],"fileNames":["../../tslibs/TS/Lib/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", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "latestChangedDtsFile": "./a.d.ts", + "size": 1439 +} + +/home/src/workspaces/project/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]:: no change + +tsgo --b +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +tsconfig.json:7:9 - error TS1005: ',' expected. + +7 "b.ts" +   ~~~~~~ + + +Found 1 error in tsconfig.json:7 + + +/home/src/workspaces/project/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" + ] +} + +tsgo --b +ExitStatus:: Success +Output:: +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../tslibs/TS/Lib/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": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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": 1402 +} + +/home/src/workspaces/project/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/tsbuild/configFileErrors/when-tsconfig-extends-the-missing-file.js b/testdata/baselines/reference/tsbuild/configFileErrors/when-tsconfig-extends-the-missing-file.js new file mode 100644 index 0000000000..7ced5982d5 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/configFileErrors/when-tsconfig-extends-the-missing-file.js @@ -0,0 +1,70 @@ +currentDirectory::/home/src/workspaces/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/project/tsconfig.first.json] *new* +{ + "extends": "./foobar.json", + "compilerOptions": { + "composite": true + } +} +//// [/home/src/workspaces/project/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "./tsconfig.first.json" }, + { "path": "./tsconfig.second.json" } + ] +} +//// [/home/src/workspaces/project/tsconfig.second.json] *new* +{ + "extends": "./foobar.json", + "compilerOptions": { + "composite": true + } +} + +tsgo --b +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +error TS5083: Cannot read file '/home/src/workspaces/project/foobar.json'. +error TS18003: No inputs were found in config file '/home/src/workspaces/project/tsconfig.first.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '[]'. +error TS5083: Cannot read file '/home/src/workspaces/project/foobar.json'. +error TS18003: No inputs were found in config file '/home/src/workspaces/project/tsconfig.second.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '[]'. + +Found 4 errors. + +//// [/home/src/workspaces/project/tsconfig.first.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"fileInfos":[],"options":{"composite":true}} +//// [/home/src/workspaces/project/tsconfig.first.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "fileInfos": [], + "options": { + "composite": true + }, + "size": 85 +} +//// [/home/src/workspaces/project/tsconfig.second.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"fileInfos":[],"options":{"composite":true}} +//// [/home/src/workspaces/project/tsconfig.second.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "fileInfos": [], + "options": { + "composite": true + }, + "size": 85 +} + +/home/src/workspaces/project/tsconfig.first.json:: +SemanticDiagnostics:: +Signatures:: + +/home/src/workspaces/project/tsconfig.second.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuild/configFileExtends/configDir-template.js b/testdata/baselines/reference/tsbuild/configFileExtends/configDir-template.js new file mode 100644 index 0000000000..6e249b61d7 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/configFileExtends/configDir-template.js @@ -0,0 +1,118 @@ +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 --explainFiles --v +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'outDir/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/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; }; + +/home/src/projects/myproject/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 diff --git a/testdata/baselines/reference/tsbuild/configFileExtends/resolves-the-symlink-path.js b/testdata/baselines/reference/tsbuild/configFileExtends/resolves-the-symlink-path.js new file mode 100644 index 0000000000..cdc11a7e53 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/configFileExtends/resolves-the-symlink-path.js @@ -0,0 +1,113 @@ +currentDirectory::/users/user/projects/myproject +useCaseSensitiveFileNames::true +Input:: +//// [/users/user/projects/myconfigs/node_modules/@something/tsconfig-base/tsconfig.json] *new* +{ + "compilerOptions": { "composite": true } +} +//// [/users/user/projects/myconfigs/node_modules/@something/tsconfig-node/tsconfig.json] *new* +{ + "extends": "@something/tsconfig-base/tsconfig.json", + "compilerOptions": { + "removeComments": true + } +} +//// [/users/user/projects/myproject/src/index.ts] *new* +// some comment +export const x = 10; +//// [/users/user/projects/myproject/src/tsconfig.json] *new* +{ + "extends": "@something/tsconfig-node/tsconfig.json" +} + +tsgo --b src --extendedDiagnostics +ExitStatus:: Success +Output:: +//// [/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; }; +//// [/users/user/projects/myproject/src/index.d.ts] *new* +export declare const x = 10; + +//// [/users/user/projects/myproject/src/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + +//// [/users/user/projects/myproject/src/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["../../../../../home/src/tslibs/TS/Lib/lib.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},{"version":"03965946b1acc2afec91a302f9646317-// some comment\nexport const x = 10;","signature":"f9b4154a9a5944099ecf197d4519d083-export declare const x = 10;\n","impliedNodeFormat":1}],"options":{"composite":true,"removeComments":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/users/user/projects/myproject/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "../../../../../home/src/tslibs/TS/Lib/lib.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../../home/src/tslibs/TS/Lib/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": "./index.ts", + "version": "03965946b1acc2afec91a302f9646317-// some comment\nexport const x = 10;", + "signature": "f9b4154a9a5944099ecf197d4519d083-export declare const x = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "03965946b1acc2afec91a302f9646317-// some comment\nexport const x = 10;", + "signature": "f9b4154a9a5944099ecf197d4519d083-export declare const x = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "removeComments": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1172 +} + +/users/user/projects/myproject/src/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /users/user/projects/myproject/src/index.ts +Signatures:: +(stored at emit) /users/user/projects/myproject/src/index.ts diff --git a/testdata/baselines/reference/tsbuild/configFileExtends/when-building-project-uses-reference-and-both-extend-config-with-include.js b/testdata/baselines/reference/tsbuild/configFileExtends/when-building-project-uses-reference-and-both-extend-config-with-include.js new file mode 100644 index 0000000000..bab4980ef4 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/configFileExtends/when-building-project-uses-reference-and-both-extend-config-with-include.js @@ -0,0 +1,255 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/shared/index.ts] *new* +export const a: Unrestricted = 1; +//// [/home/src/workspaces/solution/shared/tsconfig-base.json] *new* +{ + "include": ["./typings-base/"], +} +//// [/home/src/workspaces/solution/shared/tsconfig.json] *new* +{ + "extends": "./tsconfig-base.json", + "compilerOptions": { + "composite": true, + "outDir": "../target-tsc-build/", + "rootDir": "..", + }, + "files": ["./index.ts"], +} +//// [/home/src/workspaces/solution/shared/typings-base/globals.d.ts] *new* +type Unrestricted = any; +//// [/home/src/workspaces/solution/tsconfig.json] *new* +{ + "references": [ + { "path": "./shared/tsconfig.json" }, + { "path": "./webpack/tsconfig.json" }, + ], + "files": [], +} +//// [/home/src/workspaces/solution/webpack/index.ts] *new* +export const b: Unrestricted = 1; +//// [/home/src/workspaces/solution/webpack/tsconfig.json] *new* +{ + "extends": "../shared/tsconfig-base.json", + "compilerOptions": { + "composite": true, + "outDir": "../target-tsc-build/", + "rootDir": "..", + }, + "files": ["./index.ts"], + "references": [{ "path": "../shared/tsconfig.json" }], +} + +tsgo --b webpack/tsconfig.json --v --listFiles +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * shared/tsconfig.json + * webpack/tsconfig.json + +[HH:MM:SS AM] Project 'shared/tsconfig.json' is out of date because output file 'target-tsc-build/shared/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'shared/tsconfig.json'... + +/home/src/tslibs/TS/Lib/lib.d.ts +/home/src/workspaces/solution/shared/index.ts +/home/src/workspaces/solution/shared/typings-base/globals.d.ts +[HH:MM:SS AM] Project 'webpack/tsconfig.json' is out of date because output file 'target-tsc-build/webpack/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'webpack/tsconfig.json'... + +/home/src/tslibs/TS/Lib/lib.d.ts +/home/src/workspaces/solution/webpack/index.ts +/home/src/workspaces/solution/shared/typings-base/globals.d.ts +//// [/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/target-tsc-build/shared/index.d.ts] *new* +export declare const a: Unrestricted; + +//// [/home/src/workspaces/solution/target-tsc-build/shared/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 1; + +//// [/home/src/workspaces/solution/target-tsc-build/shared/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","../../shared/index.ts","../../shared/typings-base/globals.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":"038419a8862a47ff75929bd3632cfaa0-export const a: Unrestricted = 1;","signature":"3d46c415eae6cd0e760bea3fa85ba3aa-export declare const a: Unrestricted;\n","impliedNodeFormat":1},{"version":"0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"outDir":"..","rootDir":"../.."},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspaces/solution/target-tsc-build/shared/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../shared/index.ts", + "../../shared/typings-base/globals.d.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "../../shared/index.ts", + "../../shared/typings-base/globals.d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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/index.ts", + "version": "038419a8862a47ff75929bd3632cfaa0-export const a: Unrestricted = 1;", + "signature": "3d46c415eae6cd0e760bea3fa85ba3aa-export declare const a: Unrestricted;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "038419a8862a47ff75929bd3632cfaa0-export const a: Unrestricted = 1;", + "signature": "3d46c415eae6cd0e760bea3fa85ba3aa-export declare const a: Unrestricted;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../shared/typings-base/globals.d.ts", + "version": "0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;", + "signature": "0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "outDir": "..", + "rootDir": "../.." + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1351 +} +//// [/home/src/workspaces/solution/target-tsc-build/webpack/index.d.ts] *new* +export declare const b: Unrestricted; + +//// [/home/src/workspaces/solution/target-tsc-build/webpack/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 1; + +//// [/home/src/workspaces/solution/target-tsc-build/webpack/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","../../webpack/index.ts","../../shared/typings-base/globals.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":"55323568c1e8cde378750e233962127b-export const b: Unrestricted = 1;","signature":"ab6809558636ca24521fe1a6d7861d37-export declare const b: Unrestricted;\n","impliedNodeFormat":1},{"version":"0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"outDir":"..","rootDir":"../.."},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspaces/solution/target-tsc-build/webpack/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../webpack/index.ts", + "../../shared/typings-base/globals.d.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "../../webpack/index.ts", + "../../shared/typings-base/globals.d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "../../webpack/index.ts", + "version": "55323568c1e8cde378750e233962127b-export const b: Unrestricted = 1;", + "signature": "ab6809558636ca24521fe1a6d7861d37-export declare const b: Unrestricted;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "55323568c1e8cde378750e233962127b-export const b: Unrestricted = 1;", + "signature": "ab6809558636ca24521fe1a6d7861d37-export declare const b: Unrestricted;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../shared/typings-base/globals.d.ts", + "version": "0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;", + "signature": "0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "outDir": "..", + "rootDir": "../.." + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1352 +} + +/home/src/workspaces/solution/shared/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/shared/index.ts +*refresh* /home/src/workspaces/solution/shared/typings-base/globals.d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/shared/index.ts + +/home/src/workspaces/solution/webpack/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/webpack/index.ts +*refresh* /home/src/workspaces/solution/shared/typings-base/globals.d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/webpack/index.ts diff --git a/testdata/baselines/reference/tsbuild/configFileExtends/when-building-solution-with-projects-extends-config-with-include.js b/testdata/baselines/reference/tsbuild/configFileExtends/when-building-solution-with-projects-extends-config-with-include.js new file mode 100644 index 0000000000..ec7039a342 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/configFileExtends/when-building-solution-with-projects-extends-config-with-include.js @@ -0,0 +1,256 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/shared/index.ts] *new* +export const a: Unrestricted = 1; +//// [/home/src/workspaces/solution/shared/tsconfig-base.json] *new* +{ + "include": ["./typings-base/"], +} +//// [/home/src/workspaces/solution/shared/tsconfig.json] *new* +{ + "extends": "./tsconfig-base.json", + "compilerOptions": { + "composite": true, + "outDir": "../target-tsc-build/", + "rootDir": "..", + }, + "files": ["./index.ts"], +} +//// [/home/src/workspaces/solution/shared/typings-base/globals.d.ts] *new* +type Unrestricted = any; +//// [/home/src/workspaces/solution/tsconfig.json] *new* +{ + "references": [ + { "path": "./shared/tsconfig.json" }, + { "path": "./webpack/tsconfig.json" }, + ], + "files": [], +} +//// [/home/src/workspaces/solution/webpack/index.ts] *new* +export const b: Unrestricted = 1; +//// [/home/src/workspaces/solution/webpack/tsconfig.json] *new* +{ + "extends": "../shared/tsconfig-base.json", + "compilerOptions": { + "composite": true, + "outDir": "../target-tsc-build/", + "rootDir": "..", + }, + "files": ["./index.ts"], + "references": [{ "path": "../shared/tsconfig.json" }], +} + +tsgo --b --v --listFiles +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * shared/tsconfig.json + * webpack/tsconfig.json + * tsconfig.json + +[HH:MM:SS AM] Project 'shared/tsconfig.json' is out of date because output file 'target-tsc-build/shared/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'shared/tsconfig.json'... + +/home/src/tslibs/TS/Lib/lib.d.ts +/home/src/workspaces/solution/shared/index.ts +/home/src/workspaces/solution/shared/typings-base/globals.d.ts +[HH:MM:SS AM] Project 'webpack/tsconfig.json' is out of date because output file 'target-tsc-build/webpack/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'webpack/tsconfig.json'... + +/home/src/tslibs/TS/Lib/lib.d.ts +/home/src/workspaces/solution/webpack/index.ts +/home/src/workspaces/solution/shared/typings-base/globals.d.ts +//// [/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/target-tsc-build/shared/index.d.ts] *new* +export declare const a: Unrestricted; + +//// [/home/src/workspaces/solution/target-tsc-build/shared/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 1; + +//// [/home/src/workspaces/solution/target-tsc-build/shared/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","../../shared/index.ts","../../shared/typings-base/globals.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":"038419a8862a47ff75929bd3632cfaa0-export const a: Unrestricted = 1;","signature":"3d46c415eae6cd0e760bea3fa85ba3aa-export declare const a: Unrestricted;\n","impliedNodeFormat":1},{"version":"0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"outDir":"..","rootDir":"../.."},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspaces/solution/target-tsc-build/shared/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../shared/index.ts", + "../../shared/typings-base/globals.d.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "../../shared/index.ts", + "../../shared/typings-base/globals.d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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/index.ts", + "version": "038419a8862a47ff75929bd3632cfaa0-export const a: Unrestricted = 1;", + "signature": "3d46c415eae6cd0e760bea3fa85ba3aa-export declare const a: Unrestricted;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "038419a8862a47ff75929bd3632cfaa0-export const a: Unrestricted = 1;", + "signature": "3d46c415eae6cd0e760bea3fa85ba3aa-export declare const a: Unrestricted;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../shared/typings-base/globals.d.ts", + "version": "0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;", + "signature": "0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "outDir": "..", + "rootDir": "../.." + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1351 +} +//// [/home/src/workspaces/solution/target-tsc-build/webpack/index.d.ts] *new* +export declare const b: Unrestricted; + +//// [/home/src/workspaces/solution/target-tsc-build/webpack/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 1; + +//// [/home/src/workspaces/solution/target-tsc-build/webpack/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../../../tslibs/TS/Lib/lib.d.ts","../../webpack/index.ts","../../shared/typings-base/globals.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":"55323568c1e8cde378750e233962127b-export const b: Unrestricted = 1;","signature":"ab6809558636ca24521fe1a6d7861d37-export declare const b: Unrestricted;\n","impliedNodeFormat":1},{"version":"0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true,"outDir":"..","rootDir":"../.."},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspaces/solution/target-tsc-build/webpack/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../webpack/index.ts", + "../../shared/typings-base/globals.d.ts" + ], + "original": [ + 2, + 3 + ] + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "../../webpack/index.ts", + "../../shared/typings-base/globals.d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "../../webpack/index.ts", + "version": "55323568c1e8cde378750e233962127b-export const b: Unrestricted = 1;", + "signature": "ab6809558636ca24521fe1a6d7861d37-export declare const b: Unrestricted;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "55323568c1e8cde378750e233962127b-export const b: Unrestricted = 1;", + "signature": "ab6809558636ca24521fe1a6d7861d37-export declare const b: Unrestricted;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../shared/typings-base/globals.d.ts", + "version": "0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;", + "signature": "0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "0818246edc003d659f6bac1bc37ad307-type Unrestricted = any;", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "outDir": "..", + "rootDir": "../.." + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1352 +} + +/home/src/workspaces/solution/shared/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/shared/index.ts +*refresh* /home/src/workspaces/solution/shared/typings-base/globals.d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/shared/index.ts + +/home/src/workspaces/solution/webpack/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/webpack/index.ts +*refresh* /home/src/workspaces/solution/shared/typings-base/globals.d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/webpack/index.ts 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 new file mode 100644 index 0000000000..2248fb2ae6 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors-with-incremental.js @@ -0,0 +1,215 @@ +currentDirectory::/home/src/workspaces/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/project/index.ts] *new* +import ky from 'ky'; +export const api = ky.extend({}); +//// [/home/src/workspaces/project/node_modules/ky/distribution/index.d.ts] *new* +type KyInstance = { + extend(options: Record): KyInstance; +} +declare const ky: KyInstance; +export default ky; +//// [/home/src/workspaces/project/node_modules/ky/package.json] *new* +{ + "name": "ky", + "type": "module", + "main": "./distribution/index.js" +} +//// [/home/src/workspaces/project/package.json] *new* +{ + "type": "module", +} +//// [/home/src/workspaces/project/tsconfig.json] *new* +{ + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "incremental": true, + "declaration": true, + "skipLibCheck": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo -b --explainFiles --listEmittedFiles --v +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +index.ts:2:14 - error TS4023: Exported variable 'api' has or is using name 'KyInstance' from external module "/home/src/workspaces/project/node_modules/ky/distribution/index" but cannot be named. + +2 export const api = ky.extend({}); +   ~~~ + +TSFILE: /home/src/workspaces/project/index.js +TSFILE: /home/src/workspaces/project/index.d.ts +TSFILE: /home/src/workspaces/project/tsconfig.tsbuildinfo + +Found 1 error in index.ts:2 + +//// [/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; }; +//// [/home/src/workspaces/project/index.d.ts] *new* +export declare const api: { + extend(options: Record): KyInstance; +}; + +//// [/home/src/workspaces/project/index.js] *new* +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.api = void 0; +const ky_1 = __importDefault(require("ky")); +exports.api = ky_1.default.extend({}); + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[3],"fileNames":["../../tslibs/TS/Lib/lib.esnext.full.d.ts","./node_modules/ky/distribution/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},{"version":"b9b50c37c18e43d94b0dd4fb43967f10-type KyInstance = {\n extend(options: Record): KyInstance;\n}\ndeclare const ky: KyInstance;\nexport default ky;","impliedNodeFormat":99},{"version":"0f5091e963c17913313e4969c59e6eb4-import ky from 'ky';\nexport const api = ky.extend({});","signature":"5816fe34b5cf354b0d0d19bc77874616-export declare const api: {\n extend(options: Record): KyInstance;\n};\n\n(34,3): error4023: Exported variable 'api' has or is using name 'KyInstance' from external module \"/home/src/workspaces/project/node_modules/ky/distribution/index\" but cannot be named.","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true,"module":199,"skipLibCheck":true,"skipDefaultLibCheck":true},"referencedMap":[[3,1]],"emitDiagnosticsPerFile":[[3,[{"pos":34,"end":37,"code":4023,"category":1,"message":"Exported variable 'api' has or is using name 'KyInstance' from external module \"/home/src/workspaces/project/node_modules/ky/distribution/index\" but cannot be named."}]]]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 3 + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.esnext.full.d.ts", + "./node_modules/ky/distribution/index.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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/ky/distribution/index.d.ts", + "version": "b9b50c37c18e43d94b0dd4fb43967f10-type KyInstance = {\n extend(options: Record): KyInstance;\n}\ndeclare const ky: KyInstance;\nexport default ky;", + "signature": "b9b50c37c18e43d94b0dd4fb43967f10-type KyInstance = {\n extend(options: Record): KyInstance;\n}\ndeclare const ky: KyInstance;\nexport default ky;", + "impliedNodeFormat": "ESNext", + "original": { + "version": "b9b50c37c18e43d94b0dd4fb43967f10-type KyInstance = {\n extend(options: Record): KyInstance;\n}\ndeclare const ky: KyInstance;\nexport default ky;", + "impliedNodeFormat": 99 + } + }, + { + "fileName": "./index.ts", + "version": "0f5091e963c17913313e4969c59e6eb4-import ky from 'ky';\nexport const api = ky.extend({});", + "signature": "5816fe34b5cf354b0d0d19bc77874616-export declare const api: {\n extend(options: Record): KyInstance;\n};\n\n(34,3): error4023: Exported variable 'api' has or is using name 'KyInstance' from external module \"/home/src/workspaces/project/node_modules/ky/distribution/index\" but cannot be named.", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "0f5091e963c17913313e4969c59e6eb4-import ky from 'ky';\nexport const api = ky.extend({});", + "signature": "5816fe34b5cf354b0d0d19bc77874616-export declare const api: {\n extend(options: Record): KyInstance;\n};\n\n(34,3): error4023: Exported variable 'api' has or is using name 'KyInstance' from external module \"/home/src/workspaces/project/node_modules/ky/distribution/index\" but cannot be named.", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./node_modules/ky/distribution/index.d.ts" + ] + ], + "options": { + "declaration": true, + "module": 199, + "skipLibCheck": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "./index.ts": [ + "./node_modules/ky/distribution/index.d.ts" + ] + }, + "emitDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "pos": 34, + "end": 37, + "code": 4023, + "category": 1, + "message": "Exported variable 'api' has or is using name 'KyInstance' from external module \"/home/src/workspaces/project/node_modules/ky/distribution/index\" but cannot be named." + } + ] + ] + ], + "size": 1984 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts +*refresh* /home/src/workspaces/project/node_modules/ky/distribution/index.d.ts +*refresh* /home/src/workspaces/project/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/project/index.ts + + +Edit [0]:: no change + +tsgo -b --explainFiles --listEmittedFiles --v +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +index.ts:2:14 - error TS4023: Exported variable 'api' has or is using name 'KyInstance' from external module "/home/src/workspaces/project/node_modules/ky/distribution/index" but cannot be named. + +2 export const api = ky.extend({}); +   ~~~ + +TSFILE: /home/src/workspaces/project/tsconfig.tsbuildinfo + +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* + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors.js b/testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors.js new file mode 100644 index 0000000000..539db455a6 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors.js @@ -0,0 +1,154 @@ +currentDirectory::/home/src/workspaces/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/project/index.ts] *new* +import ky from 'ky'; +export const api = ky.extend({}); +//// [/home/src/workspaces/project/node_modules/ky/distribution/index.d.ts] *new* +type KyInstance = { + extend(options: Record): KyInstance; +} +declare const ky: KyInstance; +export default ky; +//// [/home/src/workspaces/project/node_modules/ky/package.json] *new* +{ + "name": "ky", + "type": "module", + "main": "./distribution/index.js" +} +//// [/home/src/workspaces/project/package.json] *new* +{ + "type": "module", +} +//// [/home/src/workspaces/project/tsconfig.json] *new* +{ + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "incremental": false, + "declaration": true, + "skipLibCheck": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo -b --explainFiles --listEmittedFiles --v +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +index.ts:2:14 - error TS4023: Exported variable 'api' has or is using name 'KyInstance' from external module "/home/src/workspaces/project/node_modules/ky/distribution/index" but cannot be named. + +2 export const api = ky.extend({}); +   ~~~ + +TSFILE: /home/src/workspaces/project/index.js +TSFILE: /home/src/workspaces/project/index.d.ts +TSFILE: /home/src/workspaces/project/tsconfig.tsbuildinfo + +Found 1 error in index.ts:2 + +//// [/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; }; +//// [/home/src/workspaces/project/index.d.ts] *new* +export declare const api: { + extend(options: Record): KyInstance; +}; + +//// [/home/src/workspaces/project/index.js] *new* +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.api = void 0; +const ky_1 = __importDefault(require("ky")); +exports.api = ky_1.default.extend({}); + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","errors":true,"root":["./index.ts"]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "errors": true, + "root": [ + { + "files": [ + "./index.ts" + ], + "original": "./index.ts" + } + ], + "size": 63 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts +*refresh* /home/src/workspaces/project/node_modules/ky/distribution/index.d.ts +*refresh* /home/src/workspaces/project/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/project/index.ts + + +Edit [0]:: no change + +tsgo -b --explainFiles --listEmittedFiles --v +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +index.ts:2:14 - error TS4023: Exported variable 'api' has or is using name 'KyInstance' from external module "/home/src/workspaces/project/node_modules/ky/distribution/index" but cannot be named. + +2 export const api = ky.extend({}); +   ~~~ + +TSFILE: /home/src/workspaces/project/index.js +TSFILE: /home/src/workspaces/project/index.d.ts +TSFILE: /home/src/workspaces/project/tsconfig.tsbuildinfo + +Found 1 error in index.ts:2 + +//// [/home/src/workspaces/project/index.d.ts] *rewrite with same content* +//// [/home/src/workspaces/project/index.js] *rewrite with same content* +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts +*refresh* /home/src/workspaces/project/node_modules/ky/distribution/index.d.ts +*refresh* /home/src/workspaces/project/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/project/index.ts diff --git a/testdata/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash-but-uses-no-references.js b/testdata/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash-but-uses-no-references.js new file mode 100644 index 0000000000..e1c73b89b9 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash-but-uses-no-references.js @@ -0,0 +1,257 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/src/common/nominal.ts] *new* +/// +export declare type Nominal = MyNominal; +//// [/home/src/workspaces/solution/src/common/tsconfig.json] *new* +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "include": ["./nominal.ts"], +} +//// [/home/src/workspaces/solution/src/common/types.d.ts] *new* +declare type MyNominal = T & { + specialKey: Name; +}; +//// [/home/src/workspaces/solution/src/subProject/index.ts] *new* +import { Nominal } from '../common/nominal'; +export type MyNominal = Nominal; +//// [/home/src/workspaces/solution/src/subProject/tsconfig.json] *new* +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "references": [{ "path": "../common" }], + "include": ["./index.ts"], +} +//// [/home/src/workspaces/solution/src/subProject2/index.ts] *new* +import { MyNominal } from '../subProject/index'; +const variable = { + key: 'value' as MyNominal, +}; +export function getVar(): keyof typeof variable { + return 'key'; +} +//// [/home/src/workspaces/solution/src/subProject2/tsconfig.json] *new* +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "references": [{ "path": "../subProject" }], + "include": ["./index.ts"], +} +//// [/home/src/workspaces/solution/src/tsconfig.json] *new* +{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "./subProject" }, { "path": "./subProject2" }], + "include": [], +} +//// [/home/src/workspaces/solution/tsconfig.base.json] *new* +{ + "compilerOptions": { + "rootDir": "./", + "outDir": "lib", + }, +} +//// [/home/src/workspaces/solution/tsconfig.json] *new* +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { "composite": true }, + "include": ["./src/**/*.ts"], +} + +tsgo --b --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'lib/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/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/lib/src/common/nominal.d.ts] *new* +/// +export declare type Nominal = MyNominal; + +//// [/home/src/workspaces/solution/lib/src/common/nominal.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/// + +//// [/home/src/workspaces/solution/lib/src/subProject/index.d.ts] *new* +import { Nominal } from '../common/nominal'; +export type MyNominal = Nominal; + +//// [/home/src/workspaces/solution/lib/src/subProject/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/home/src/workspaces/solution/lib/src/subProject2/index.d.ts] *new* +import { MyNominal } from '../subProject/index'; +declare const variable: { + key: MyNominal; +}; +export declare function getVar(): keyof typeof variable; +export {}; + +//// [/home/src/workspaces/solution/lib/src/subProject2/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getVar = getVar; +const variable = { + key: 'value', +}; +function getVar() { + return 'key'; +} + +//// [/home/src/workspaces/solution/lib/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../../tslibs/TS/Lib/lib.d.ts","../src/common/types.d.ts","../src/common/nominal.ts","../src/subProject/index.ts","../src/subProject2/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":"364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02b2be40ad0c54e8b7965b3b3a70cf4d-/// \nexport declare type Nominal = MyNominal;","signature":"87033119a9b5a8355ed894292b93ddfc-/// \nexport declare type Nominal = MyNominal;\n","impliedNodeFormat":1},{"version":"f3259c501eab7f535f47f925d1b0ad90-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;","signature":"ba931f9684d9e8eb38e02da33050dc55-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;\n","impliedNodeFormat":1},{"version":"8da8251ddcb1a6ba7d3777c22bdb0c2f-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}","signature":"94380a791d16e2a4caa75d34b4c1d230-import { MyNominal } from '../subProject/index';\ndeclare const variable: {\n key: MyNominal;\n};\nexport declare function getVar(): keyof typeof variable;\nexport {};\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3],[4]],"options":{"composite":true,"outDir":"./","rootDir":".."},"referencedMap":[[3,1],[4,2],[5,3]],"latestChangedDtsFile":"./src/subProject2/index.d.ts"} +//// [/home/src/workspaces/solution/lib/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../src/common/types.d.ts", + "../src/common/nominal.ts", + "../src/subProject/index.ts", + "../src/subProject2/index.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../../tslibs/TS/Lib/lib.d.ts", + "../src/common/types.d.ts", + "../src/common/nominal.ts", + "../src/subProject/index.ts", + "../src/subProject2/index.ts" + ], + "fileInfos": [ + { + "fileName": "../../../tslibs/TS/Lib/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/common/types.d.ts", + "version": "364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};", + "signature": "364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/common/nominal.ts", + "version": "02b2be40ad0c54e8b7965b3b3a70cf4d-/// \nexport declare type Nominal = MyNominal;", + "signature": "87033119a9b5a8355ed894292b93ddfc-/// \nexport declare type Nominal = MyNominal;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "02b2be40ad0c54e8b7965b3b3a70cf4d-/// \nexport declare type Nominal = MyNominal;", + "signature": "87033119a9b5a8355ed894292b93ddfc-/// \nexport declare type Nominal = MyNominal;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/subProject/index.ts", + "version": "f3259c501eab7f535f47f925d1b0ad90-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;", + "signature": "ba931f9684d9e8eb38e02da33050dc55-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "f3259c501eab7f535f47f925d1b0ad90-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;", + "signature": "ba931f9684d9e8eb38e02da33050dc55-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../src/subProject2/index.ts", + "version": "8da8251ddcb1a6ba7d3777c22bdb0c2f-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}", + "signature": "94380a791d16e2a4caa75d34b4c1d230-import { MyNominal } from '../subProject/index';\ndeclare const variable: {\n key: MyNominal;\n};\nexport declare function getVar(): keyof typeof variable;\nexport {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8da8251ddcb1a6ba7d3777c22bdb0c2f-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}", + "signature": "94380a791d16e2a4caa75d34b4c1d230-import { MyNominal } from '../subProject/index';\ndeclare const variable: {\n key: MyNominal;\n};\nexport declare function getVar(): keyof typeof variable;\nexport {};\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../src/common/types.d.ts" + ], + [ + "../src/common/nominal.ts" + ], + [ + "../src/subProject/index.ts" + ] + ], + "options": { + "composite": true, + "outDir": "./", + "rootDir": ".." + }, + "referencedMap": { + "../src/common/nominal.ts": [ + "../src/common/types.d.ts" + ], + "../src/subProject/index.ts": [ + "../src/common/nominal.ts" + ], + "../src/subProject2/index.ts": [ + "../src/subProject/index.ts" + ] + }, + "latestChangedDtsFile": "./src/subProject2/index.d.ts", + "size": 2527 +} + +/home/src/workspaces/solution/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/src/common/types.d.ts +*refresh* /home/src/workspaces/solution/src/common/nominal.ts +*refresh* /home/src/workspaces/solution/src/subProject/index.ts +*refresh* /home/src/workspaces/solution/src/subProject2/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/src/common/nominal.ts +(stored at emit) /home/src/workspaces/solution/src/subProject/index.ts +(stored at emit) /home/src/workspaces/solution/src/subProject2/index.ts diff --git a/testdata/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash.js b/testdata/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash.js new file mode 100644 index 0000000000..164813e037 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/declarationEmit/when-declaration-file-is-referenced-through-triple-slash.js @@ -0,0 +1,427 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/src/common/nominal.ts] *new* +/// +export declare type Nominal = MyNominal; +//// [/home/src/workspaces/solution/src/common/tsconfig.json] *new* +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "include": ["./nominal.ts"], +} +//// [/home/src/workspaces/solution/src/common/types.d.ts] *new* +declare type MyNominal = T & { + specialKey: Name; +}; +//// [/home/src/workspaces/solution/src/subProject/index.ts] *new* +import { Nominal } from '../common/nominal'; +export type MyNominal = Nominal; +//// [/home/src/workspaces/solution/src/subProject/tsconfig.json] *new* +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "references": [{ "path": "../common" }], + "include": ["./index.ts"], +} +//// [/home/src/workspaces/solution/src/subProject2/index.ts] *new* +import { MyNominal } from '../subProject/index'; +const variable = { + key: 'value' as MyNominal, +}; +export function getVar(): keyof typeof variable { + return 'key'; +} +//// [/home/src/workspaces/solution/src/subProject2/tsconfig.json] *new* +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "composite": true }, + "references": [{ "path": "../subProject" }], + "include": ["./index.ts"], +} +//// [/home/src/workspaces/solution/src/tsconfig.json] *new* +{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "./subProject" }, { "path": "./subProject2" }], + "include": [], +} +//// [/home/src/workspaces/solution/tsconfig.base.json] *new* +{ + "compilerOptions": { + "rootDir": "./", + "outDir": "lib", + }, +} +//// [/home/src/workspaces/solution/tsconfig.json] *new* +{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "./src" }], + "include": [], +} + +tsgo --b --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * src/common/tsconfig.json + * src/subProject/tsconfig.json + * src/subProject2/tsconfig.json + * src/tsconfig.json + * tsconfig.json + +[HH:MM:SS AM] Project 'src/common/tsconfig.json' is out of date because output file 'lib/src/common/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'src/common/tsconfig.json'... + +[HH:MM:SS AM] Project 'src/subProject/tsconfig.json' is out of date because output file 'lib/src/subProject/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'src/subProject/tsconfig.json'... + +[HH:MM:SS AM] Project 'src/subProject2/tsconfig.json' is out of date because output file 'lib/src/subProject2/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'src/subProject2/tsconfig.json'... + +//// [/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/lib/src/common/nominal.d.ts] *new* +/// +export declare type Nominal = MyNominal; + +//// [/home/src/workspaces/solution/lib/src/common/nominal.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/// + +//// [/home/src/workspaces/solution/lib/src/common/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[3],"fileNames":["../../../../../tslibs/TS/Lib/lib.d.ts","../../../src/common/types.d.ts","../../../src/common/nominal.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":"364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02b2be40ad0c54e8b7965b3b3a70cf4d-/// \nexport declare type Nominal = MyNominal;","signature":"87033119a9b5a8355ed894292b93ddfc-/// \nexport declare type Nominal = MyNominal;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"outDir":"../..","rootDir":"../../.."},"referencedMap":[[3,1]],"latestChangedDtsFile":"./nominal.d.ts"} +//// [/home/src/workspaces/solution/lib/src/common/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../../src/common/nominal.ts" + ], + "original": 3 + } + ], + "fileNames": [ + "../../../../../tslibs/TS/Lib/lib.d.ts", + "../../../src/common/types.d.ts", + "../../../src/common/nominal.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../../tslibs/TS/Lib/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/common/types.d.ts", + "version": "364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};", + "signature": "364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../../../src/common/nominal.ts", + "version": "02b2be40ad0c54e8b7965b3b3a70cf4d-/// \nexport declare type Nominal = MyNominal;", + "signature": "87033119a9b5a8355ed894292b93ddfc-/// \nexport declare type Nominal = MyNominal;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "02b2be40ad0c54e8b7965b3b3a70cf4d-/// \nexport declare type Nominal = MyNominal;", + "signature": "87033119a9b5a8355ed894292b93ddfc-/// \nexport declare type Nominal = MyNominal;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../../src/common/types.d.ts" + ] + ], + "options": { + "composite": true, + "outDir": "../..", + "rootDir": "../../.." + }, + "referencedMap": { + "../../../src/common/nominal.ts": [ + "../../../src/common/types.d.ts" + ] + }, + "latestChangedDtsFile": "./nominal.d.ts", + "size": 1672 +} +//// [/home/src/workspaces/solution/lib/src/subProject/index.d.ts] *new* +import { Nominal } from '../common/nominal'; +export type MyNominal = Nominal; + +//// [/home/src/workspaces/solution/lib/src/subProject/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/home/src/workspaces/solution/lib/src/subProject/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[4],"fileNames":["../../../../../tslibs/TS/Lib/lib.d.ts","../../../src/common/types.d.ts","../common/nominal.d.ts","../../../src/subProject/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":"364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};","affectsGlobalScope":true,"impliedNodeFormat":1},"87033119a9b5a8355ed894292b93ddfc-/// \nexport declare type Nominal = MyNominal;\n",{"version":"f3259c501eab7f535f47f925d1b0ad90-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;","signature":"ba931f9684d9e8eb38e02da33050dc55-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"outDir":"../..","rootDir":"../../.."},"referencedMap":[[3,1],[4,2]],"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspaces/solution/lib/src/subProject/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../../src/subProject/index.ts" + ], + "original": 4 + } + ], + "fileNames": [ + "../../../../../tslibs/TS/Lib/lib.d.ts", + "../../../src/common/types.d.ts", + "../common/nominal.d.ts", + "../../../src/subProject/index.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../../tslibs/TS/Lib/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/common/types.d.ts", + "version": "364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};", + "signature": "364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../common/nominal.d.ts", + "version": "87033119a9b5a8355ed894292b93ddfc-/// \nexport declare type Nominal = MyNominal;\n", + "signature": "87033119a9b5a8355ed894292b93ddfc-/// \nexport declare type Nominal = MyNominal;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../../src/subProject/index.ts", + "version": "f3259c501eab7f535f47f925d1b0ad90-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;", + "signature": "ba931f9684d9e8eb38e02da33050dc55-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "f3259c501eab7f535f47f925d1b0ad90-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;", + "signature": "ba931f9684d9e8eb38e02da33050dc55-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../../src/common/types.d.ts" + ], + [ + "../common/nominal.d.ts" + ] + ], + "options": { + "composite": true, + "outDir": "../..", + "rootDir": "../../.." + }, + "referencedMap": { + "../common/nominal.d.ts": [ + "../../../src/common/types.d.ts" + ], + "../../../src/subProject/index.ts": [ + "../common/nominal.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1811 +} +//// [/home/src/workspaces/solution/lib/src/subProject2/index.d.ts] *new* +import { MyNominal } from '../subProject/index'; +declare const variable: { + key: MyNominal; +}; +export declare function getVar(): keyof typeof variable; +export {}; + +//// [/home/src/workspaces/solution/lib/src/subProject2/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getVar = getVar; +const variable = { + key: 'value', +}; +function getVar() { + return 'key'; +} + +//// [/home/src/workspaces/solution/lib/src/subProject2/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["../../../../../tslibs/TS/Lib/lib.d.ts","../../../src/common/types.d.ts","../common/nominal.d.ts","../subProject/index.d.ts","../../../src/subProject2/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":"364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};","affectsGlobalScope":true,"impliedNodeFormat":1},"87033119a9b5a8355ed894292b93ddfc-/// \nexport declare type Nominal = MyNominal;\n","ba931f9684d9e8eb38e02da33050dc55-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;\n",{"version":"8da8251ddcb1a6ba7d3777c22bdb0c2f-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}","signature":"94380a791d16e2a4caa75d34b4c1d230-import { MyNominal } from '../subProject/index';\ndeclare const variable: {\n key: MyNominal;\n};\nexport declare function getVar(): keyof typeof variable;\nexport {};\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3],[4]],"options":{"composite":true,"outDir":"../..","rootDir":"../../.."},"referencedMap":[[3,1],[4,2],[5,3]],"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspaces/solution/lib/src/subProject2/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../../src/subProject2/index.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "../../../../../tslibs/TS/Lib/lib.d.ts", + "../../../src/common/types.d.ts", + "../common/nominal.d.ts", + "../subProject/index.d.ts", + "../../../src/subProject2/index.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../../tslibs/TS/Lib/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/common/types.d.ts", + "version": "364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};", + "signature": "364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "364cbcda81a2b382e1f50a8c4ab62993-declare type MyNominal = T & {\n specialKey: Name;\n};", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "../common/nominal.d.ts", + "version": "87033119a9b5a8355ed894292b93ddfc-/// \nexport declare type Nominal = MyNominal;\n", + "signature": "87033119a9b5a8355ed894292b93ddfc-/// \nexport declare type Nominal = MyNominal;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../subProject/index.d.ts", + "version": "ba931f9684d9e8eb38e02da33050dc55-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;\n", + "signature": "ba931f9684d9e8eb38e02da33050dc55-import { Nominal } from '../common/nominal';\nexport type MyNominal = Nominal;\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../../../src/subProject2/index.ts", + "version": "8da8251ddcb1a6ba7d3777c22bdb0c2f-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}", + "signature": "94380a791d16e2a4caa75d34b4c1d230-import { MyNominal } from '../subProject/index';\ndeclare const variable: {\n key: MyNominal;\n};\nexport declare function getVar(): keyof typeof variable;\nexport {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8da8251ddcb1a6ba7d3777c22bdb0c2f-import { MyNominal } from '../subProject/index';\nconst variable = {\n key: 'value' as MyNominal,\n};\nexport function getVar(): keyof typeof variable {\n return 'key';\n}", + "signature": "94380a791d16e2a4caa75d34b4c1d230-import { MyNominal } from '../subProject/index';\ndeclare const variable: {\n key: MyNominal;\n};\nexport declare function getVar(): keyof typeof variable;\nexport {};\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../../src/common/types.d.ts" + ], + [ + "../common/nominal.d.ts" + ], + [ + "../subProject/index.d.ts" + ] + ], + "options": { + "composite": true, + "outDir": "../..", + "rootDir": "../../.." + }, + "referencedMap": { + "../common/nominal.d.ts": [ + "../../../src/common/types.d.ts" + ], + "../subProject/index.d.ts": [ + "../common/nominal.d.ts" + ], + "../../../src/subProject2/index.ts": [ + "../subProject/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 2135 +} + +/home/src/workspaces/solution/src/common/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/src/common/types.d.ts +*refresh* /home/src/workspaces/solution/src/common/nominal.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/src/common/nominal.ts + +/home/src/workspaces/solution/src/subProject/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/src/common/types.d.ts +*refresh* /home/src/workspaces/solution/lib/src/common/nominal.d.ts +*refresh* /home/src/workspaces/solution/src/subProject/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/src/subProject/index.ts + +/home/src/workspaces/solution/src/subProject2/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/src/common/types.d.ts +*refresh* /home/src/workspaces/solution/lib/src/common/nominal.d.ts +*refresh* /home/src/workspaces/solution/lib/src/subProject/index.d.ts +*refresh* /home/src/workspaces/solution/src/subProject2/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/src/subProject2/index.ts diff --git a/testdata/baselines/reference/tsbuild/declarationEmit/when-declaration-file-used-inferred-type-from-referenced-project.js b/testdata/baselines/reference/tsbuild/declarationEmit/when-declaration-file-used-inferred-type-from-referenced-project.js new file mode 100644 index 0000000000..38963e76a0 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/declarationEmit/when-declaration-file-used-inferred-type-from-referenced-project.js @@ -0,0 +1,229 @@ +currentDirectory::/home/src/workspaces/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/project/packages/pkg1/src/index.ts] *new* +export interface IThing { + a: string; +} +export interface IThings { + thing1: IThing; +} +//// [/home/src/workspaces/project/packages/pkg1/tsconfig.json] *new* +{ + "extends": "../../tsconfig", + "compilerOptions": { "outDir": "lib" }, + "include": ["src"], +} +//// [/home/src/workspaces/project/packages/pkg2/src/index.ts] *new* +import { IThings } from '@fluentui/pkg1'; +export function fn4() { + const a: IThings = { thing1: { a: 'b' } }; + return a.thing1; +} +//// [/home/src/workspaces/project/packages/pkg2/tsconfig.json] *new* +{ + "extends": "../../tsconfig", + "compilerOptions": { "outDir": "lib" }, + "include": ["src"], + "references": [{ "path": "../pkg1" }], +} +//// [/home/src/workspaces/project/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "paths": { "@fluentui/*": ["./packages/*/src"] }, + }, +} + +tsgo --b packages/pkg2/tsconfig.json --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * packages/pkg1/tsconfig.json + * packages/pkg2/tsconfig.json + +[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because output file 'packages/pkg1/lib/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'packages/pkg1/tsconfig.json'... + +[HH:MM:SS AM] Project 'packages/pkg2/tsconfig.json' is out of date because output file 'packages/pkg2/lib/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'packages/pkg2/tsconfig.json'... + +//// [/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/packages/pkg1/lib/src/index.d.ts] *new* +export interface IThing { + a: string; +} +export interface IThings { + thing1: IThing; +} + +//// [/home/src/workspaces/project/packages/pkg1/lib/src/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +//// [/home/src/workspaces/project/packages/pkg1/lib/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["../../../../../tslibs/TS/Lib/lib.d.ts","../src/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":"f611077efa7cfdd7e90bebd6aef8d21e-export interface IThing {\n a: string;\n}\nexport interface IThings {\n thing1: IThing;\n}","signature":"a9c3ba42ffd025bdbe473878c71e06db-export interface IThing {\n a: string;\n}\nexport interface IThings {\n thing1: IThing;\n}\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./src/index.d.ts"} +//// [/home/src/workspaces/project/packages/pkg1/lib/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../src/index.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "../../../../../tslibs/TS/Lib/lib.d.ts", + "../src/index.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../../tslibs/TS/Lib/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/index.ts", + "version": "f611077efa7cfdd7e90bebd6aef8d21e-export interface IThing {\n a: string;\n}\nexport interface IThings {\n thing1: IThing;\n}", + "signature": "a9c3ba42ffd025bdbe473878c71e06db-export interface IThing {\n a: string;\n}\nexport interface IThings {\n thing1: IThing;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "f611077efa7cfdd7e90bebd6aef8d21e-export interface IThing {\n a: string;\n}\nexport interface IThings {\n thing1: IThing;\n}", + "signature": "a9c3ba42ffd025bdbe473878c71e06db-export interface IThing {\n a: string;\n}\nexport interface IThings {\n thing1: IThing;\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "outDir": "./" + }, + "latestChangedDtsFile": "./src/index.d.ts", + "size": 1291 +} +//// [/home/src/workspaces/project/packages/pkg2/lib/src/index.d.ts] *new* +export declare function fn4(): import("@fluentui/pkg1/lib").IThing; + +//// [/home/src/workspaces/project/packages/pkg2/lib/src/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fn4 = fn4; +function fn4() { + const a = { thing1: { a: 'b' } }; + return a.thing1; +} + +//// [/home/src/workspaces/project/packages/pkg2/lib/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[3],"fileNames":["../../../../../tslibs/TS/Lib/lib.d.ts","../../pkg1/lib/src/index.d.ts","../src/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},"a9c3ba42ffd025bdbe473878c71e06db-export interface IThing {\n a: string;\n}\nexport interface IThings {\n thing1: IThing;\n}\n",{"version":"4d4febb98ed4514d6d06322111030719-import { IThings } from '@fluentui/pkg1';\nexport function fn4() {\n const a: IThings = { thing1: { a: 'b' } };\n return a.thing1;\n}","signature":"f536bf864c731ec3cb58961dede15c18-export declare function fn4(): import(\"@fluentui/pkg1/lib\").IThing;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} +//// [/home/src/workspaces/project/packages/pkg2/lib/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../src/index.ts" + ], + "original": 3 + } + ], + "fileNames": [ + "../../../../../tslibs/TS/Lib/lib.d.ts", + "../../pkg1/lib/src/index.d.ts", + "../src/index.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../../tslibs/TS/Lib/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": "../../pkg1/lib/src/index.d.ts", + "version": "a9c3ba42ffd025bdbe473878c71e06db-export interface IThing {\n a: string;\n}\nexport interface IThings {\n thing1: IThing;\n}\n", + "signature": "a9c3ba42ffd025bdbe473878c71e06db-export interface IThing {\n a: string;\n}\nexport interface IThings {\n thing1: IThing;\n}\n", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "../src/index.ts", + "version": "4d4febb98ed4514d6d06322111030719-import { IThings } from '@fluentui/pkg1';\nexport function fn4() {\n const a: IThings = { thing1: { a: 'b' } };\n return a.thing1;\n}", + "signature": "f536bf864c731ec3cb58961dede15c18-export declare function fn4(): import(\"@fluentui/pkg1/lib\").IThing;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "4d4febb98ed4514d6d06322111030719-import { IThings } from '@fluentui/pkg1';\nexport function fn4() {\n const a: IThings = { thing1: { a: 'b' } };\n return a.thing1;\n}", + "signature": "f536bf864c731ec3cb58961dede15c18-export declare function fn4(): import(\"@fluentui/pkg1/lib\").IThing;\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "../../pkg1/lib/src/index.d.ts" + ] + ], + "options": { + "composite": true, + "outDir": "./" + }, + "referencedMap": { + "../src/index.ts": [ + "../../pkg1/lib/src/index.d.ts" + ] + }, + "latestChangedDtsFile": "./src/index.d.ts", + "size": 1517 +} + +/home/src/workspaces/project/packages/pkg1/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/project/packages/pkg1/src/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/project/packages/pkg1/src/index.ts + +/home/src/workspaces/project/packages/pkg2/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/project/packages/pkg1/lib/src/index.d.ts +*refresh* /home/src/workspaces/project/packages/pkg2/src/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/project/packages/pkg2/src/index.ts diff --git a/testdata/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js b/testdata/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js new file mode 100644 index 0000000000..21f9dc4d52 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js @@ -0,0 +1,685 @@ +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 --verbose +ExitStatus:: DiagnosticsPresent_OutputsGenerated +Output:: +[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/animal.ts:1:1 - 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 export type Size = "small" | "medium" | "large"; +  ~ + +animals/dog.ts:1:1 - 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. + +1 import Animal from '.'; +  ~ + +animals/index.ts:1:1 - 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. + +1 import Animal from './animal'; +  ~ + +[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'... + + +Found 3 errors in 3 files. + +Errors Files + 1 animals/animal.ts:1 + 1 animals/dog.ts:1 + 1 animals/index.ts:1 + +//// [/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":["../../../../../../home/src/tslibs/TS/Lib/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": [ + "../../../../../../home/src/tslibs/TS/Lib/lib.d.ts", + "../../animals/animal.ts", + "../../animals/index.ts", + "../core/utilities.d.ts", + "../../animals/dog.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../../../home/src/tslibs/TS/Lib/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": 2835 +} +//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[5],"fileNames":["../../../../../../home/src/tslibs/TS/Lib/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":[1,2,3,4,5],"latestChangedDtsFile":"./utilities.d.ts"} +//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../core/utilities.ts" + ], + "original": 5 + } + ], + "fileNames": [ + "../../../../../../home/src/tslibs/TS/Lib/lib.d.ts", + "../../animals/animal.ts", + "../../animals/dog.ts", + "../../animals/index.ts", + "../../core/utilities.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../../../home/src/tslibs/TS/Lib/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": [ + "../../../../../../home/src/tslibs/TS/Lib/lib.d.ts", + "../../animals/animal.ts", + "../../animals/dog.ts", + "../../animals/index.ts", + "../../core/utilities.ts" + ], + "latestChangedDtsFile": "./utilities.d.ts", + "size": 3205 +} +//// [/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":["../../../../../../home/src/tslibs/TS/Lib/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": [ + "../../../../../../home/src/tslibs/TS/Lib/lib.d.ts", + "../animals/animal.d.ts", + "../animals/dog.d.ts", + "../animals/index.d.ts", + "../../zoo/zoo.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../../../home/src/tslibs/TS/Lib/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": 2145 +} +//// [/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)() + ]; +} + + +/user/username/projects/demo/core/tsconfig.json:: +SemanticDiagnostics:: +*not cached* /home/src/tslibs/TS/Lib/lib.d.ts +*not cached* /user/username/projects/demo/animals/animal.ts +*not cached* /user/username/projects/demo/animals/dog.ts +*not cached* /user/username/projects/demo/animals/index.ts +*not cached* /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 + +/user/username/projects/demo/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 + +/user/username/projects/demo/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/tsbuild/demo/in-circular-branch-reports-the-error-about-it-by-stopping-build.js b/testdata/baselines/reference/tsbuild/demo/in-circular-branch-reports-the-error-about-it-by-stopping-build.js new file mode 100644 index 0000000000..a7a74c653e --- /dev/null +++ b/testdata/baselines/reference/tsbuild/demo/in-circular-branch-reports-the-error-about-it-by-stopping-build.js @@ -0,0 +1,133 @@ +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 --verbose +ExitStatus:: ProjectReferenceCycle_OutputsSkipped +Output:: +[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 + +Found 1 error. + + diff --git a/testdata/baselines/reference/tsbuild/demo/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js b/testdata/baselines/reference/tsbuild/demo/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js new file mode 100644 index 0000000000..312a20260c --- /dev/null +++ b/testdata/baselines/reference/tsbuild/demo/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js @@ -0,0 +1,560 @@ +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* +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 --verbose +ExitStatus:: Success +Output:: +[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'... + +//// [/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":["../../../../../../home/src/tslibs/TS/Lib/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": [ + "../../../../../../home/src/tslibs/TS/Lib/lib.d.ts", + "../../animals/animal.ts", + "../../animals/index.ts", + "../core/utilities.d.ts", + "../../animals/dog.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../../../home/src/tslibs/TS/Lib/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": 2835 +} +//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["../../../../../../home/src/tslibs/TS/Lib/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": [ + "../../../../../../home/src/tslibs/TS/Lib/lib.d.ts", + "../../core/utilities.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../../../home/src/tslibs/TS/Lib/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": 1627 +} +//// [/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":["../../../../../../home/src/tslibs/TS/Lib/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": [ + "../../../../../../home/src/tslibs/TS/Lib/lib.d.ts", + "../animals/animal.d.ts", + "../animals/dog.d.ts", + "../animals/index.d.ts", + "../../zoo/zoo.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../../../home/src/tslibs/TS/Lib/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": 2145 +} +//// [/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)() + ]; +} + + +/user/username/projects/demo/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 + +/user/username/projects/demo/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 + +/user/username/projects/demo/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]:: no change + +tsgo --b --verbose +ExitStatus:: Success +Output:: +[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 up to date because newest input 'core/utilities.ts' is older than output 'lib/core/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'animals/tsconfig.json' is up to date because newest input 'animals/index.ts' is older than output 'lib/animals/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'zoo/tsconfig.json' is up to date because newest input 'zoo/zoo.ts' is older than output 'lib/zoo/tsconfig.tsbuildinfo' + + diff --git a/testdata/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js b/testdata/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js new file mode 100644 index 0000000000..39cdbb46c1 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js @@ -0,0 +1,431 @@ +currentDirectory::/home/src/workspaces/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/project/src/a.ts] *new* +import { B } from "./b"; + +export interface A { + b: B; +} +//// [/home/src/workspaces/project/src/b.ts] *new* +import { C } from "./c"; + +export interface B { + b: C; +} +//// [/home/src/workspaces/project/src/c.ts] *new* +import { A } from "./a"; + +export interface C { + a: A; +} +//// [/home/src/workspaces/project/src/index.ts] *new* +export { A } from "./a"; +export { B } from "./b"; +export { C } from "./c"; +//// [/home/src/workspaces/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": true, + "target": "es5", + "module": "commonjs", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "src", + "emitDeclarationOnly": true, + }, +} + +tsgo --b --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/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/lib/a.d.ts] *new* +import { B } from "./b"; +export interface A { + b: B; +} +//# sourceMappingURL=a.d.ts.map +//// [/home/src/workspaces/project/lib/a.d.ts.map] *new* +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IACd,CAAC,EAAE,CAAC,CAAC;CACR"} +//// [/home/src/workspaces/project/lib/b.d.ts] *new* +import { C } from "./c"; +export interface B { + b: C; +} +//# sourceMappingURL=b.d.ts.map +//// [/home/src/workspaces/project/lib/b.d.ts.map] *new* +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["../src/b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IACd,CAAC,EAAE,CAAC,CAAC;CACR"} +//// [/home/src/workspaces/project/lib/c.d.ts] *new* +import { A } from "./a"; +export interface C { + a: A; +} +//# sourceMappingURL=c.d.ts.map +//// [/home/src/workspaces/project/lib/c.d.ts.map] *new* +{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["../src/c.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IACd,CAAC,EAAE,CAAC,CAAC;CACR"} +//// [/home/src/workspaces/project/lib/index.d.ts] *new* +export { A } from "./a"; +export { B } from "./b"; +export { C } from "./c"; +//# sourceMappingURL=index.d.ts.map +//// [/home/src/workspaces/project/lib/index.d.ts.map] *new* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/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":"e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}","signature":"57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n","impliedNodeFormat":1},{"version":"635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}","signature":"2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n","impliedNodeFormat":1},{"version":"0c094e56b7619bf6cde26939daf7a796-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}","signature":"2904de9e1ae84b014654eae6ae9d57b8-import { B } from \"./b\";\nexport interface A {\n b: B;\n}\n","impliedNodeFormat":1},{"version":"9752277022f460184d673fd343fe2c3f-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";","signature":"c689f6bb5a7ac5a812528f5b6ccb6872-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2],[4],[2,3,4]],"options":{"alwaysStrict":true,"composite":true,"emitDeclarationOnly":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","strict":true,"sourceMap":true,"target":1},"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"latestChangedDtsFile":"./lib/index.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/c.ts", + "./src/b.ts", + "./src/a.ts", + "./src/index.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./src/c.ts", + "./src/b.ts", + "./src/a.ts", + "./src/index.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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/c.ts", + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/b.ts", + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/a.ts", + "version": "0c094e56b7619bf6cde26939daf7a796-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}", + "signature": "2904de9e1ae84b014654eae6ae9d57b8-import { B } from \"./b\";\nexport interface A {\n b: B;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "0c094e56b7619bf6cde26939daf7a796-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}", + "signature": "2904de9e1ae84b014654eae6ae9d57b8-import { B } from \"./b\";\nexport interface A {\n b: B;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/index.ts", + "version": "9752277022f460184d673fd343fe2c3f-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";", + "signature": "c689f6bb5a7ac5a812528f5b6ccb6872-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "9752277022f460184d673fd343fe2c3f-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";", + "signature": "c689f6bb5a7ac5a812528f5b6ccb6872-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./src/b.ts" + ], + [ + "./src/c.ts" + ], + [ + "./src/a.ts" + ], + [ + "./src/c.ts", + "./src/b.ts", + "./src/a.ts" + ] + ], + "options": { + "alwaysStrict": true, + "composite": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "module": 1, + "outDir": "./lib", + "rootDir": "./src", + "strict": true, + "sourceMap": true, + "target": 1 + }, + "referencedMap": { + "./src/a.ts": [ + "./src/b.ts" + ], + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ], + "./src/index.ts": [ + "./src/c.ts", + "./src/b.ts", + "./src/a.ts" + ] + }, + "latestChangedDtsFile": "./lib/index.d.ts", + "size": 2297 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/project/src/c.ts +*refresh* /home/src/workspaces/project/src/b.ts +*refresh* /home/src/workspaces/project/src/a.ts +*refresh* /home/src/workspaces/project/src/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/project/src/c.ts +(stored at emit) /home/src/workspaces/project/src/b.ts +(stored at emit) /home/src/workspaces/project/src/a.ts +(stored at emit) /home/src/workspaces/project/src/index.ts + + +Edit [0]:: incremental-declaration-changes +//// [/home/src/workspaces/project/src/a.ts] *modified* +import { B } from "./b"; + +export interface A { + b: B; foo: any; +} + +tsgo --b --verbose +ExitStatus:: Success +Output:: +[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 'src/a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/lib/a.d.ts] *modified* +import { B } from "./b"; +export interface A { + b: B; + foo: any; +} +//# sourceMappingURL=a.d.ts.map +//// [/home/src/workspaces/project/lib/a.d.ts.map] *modified* +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IACd,CAAC,EAAE,CAAC,CAAC;IAAC,GAAG,EAAE,GAAG,CAAC;CAClB"} +//// [/home/src/workspaces/project/lib/b.d.ts.map] *rewrite with same content* +//// [/home/src/workspaces/project/lib/c.d.ts.map] *rewrite with same content* +//// [/home/src/workspaces/project/lib/index.d.ts.map] *rewrite with same content* +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/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":"e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}","signature":"57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n","impliedNodeFormat":1},{"version":"635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}","signature":"2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n","impliedNodeFormat":1},{"version":"078c59719381373c2fc227a7b5ee0f0b-import { B } from \"./b\";\n\nexport interface A {\n b: B; foo: any;\n}","signature":"ddf8205c0552214926ecdcce4664e925-import { B } from \"./b\";\nexport interface A {\n b: B;\n foo: any;\n}\n","impliedNodeFormat":1},{"version":"9752277022f460184d673fd343fe2c3f-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";","signature":"c689f6bb5a7ac5a812528f5b6ccb6872-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2],[4],[2,3,4]],"options":{"alwaysStrict":true,"composite":true,"emitDeclarationOnly":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","strict":true,"sourceMap":true,"target":1},"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"latestChangedDtsFile":"./lib/a.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/c.ts", + "./src/b.ts", + "./src/a.ts", + "./src/index.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./src/c.ts", + "./src/b.ts", + "./src/a.ts", + "./src/index.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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/c.ts", + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/b.ts", + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/a.ts", + "version": "078c59719381373c2fc227a7b5ee0f0b-import { B } from \"./b\";\n\nexport interface A {\n b: B; foo: any;\n}", + "signature": "ddf8205c0552214926ecdcce4664e925-import { B } from \"./b\";\nexport interface A {\n b: B;\n foo: any;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "078c59719381373c2fc227a7b5ee0f0b-import { B } from \"./b\";\n\nexport interface A {\n b: B; foo: any;\n}", + "signature": "ddf8205c0552214926ecdcce4664e925-import { B } from \"./b\";\nexport interface A {\n b: B;\n foo: any;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/index.ts", + "version": "9752277022f460184d673fd343fe2c3f-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";", + "signature": "c689f6bb5a7ac5a812528f5b6ccb6872-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "9752277022f460184d673fd343fe2c3f-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";", + "signature": "c689f6bb5a7ac5a812528f5b6ccb6872-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./src/b.ts" + ], + [ + "./src/c.ts" + ], + [ + "./src/a.ts" + ], + [ + "./src/c.ts", + "./src/b.ts", + "./src/a.ts" + ] + ], + "options": { + "alwaysStrict": true, + "composite": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "module": 1, + "outDir": "./lib", + "rootDir": "./src", + "strict": true, + "sourceMap": true, + "target": 1 + }, + "referencedMap": { + "./src/a.ts": [ + "./src/b.ts" + ], + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ], + "./src/index.ts": [ + "./src/c.ts", + "./src/b.ts", + "./src/a.ts" + ] + }, + "latestChangedDtsFile": "./lib/a.d.ts", + "size": 2318 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/project/src/c.ts +*refresh* /home/src/workspaces/project/src/b.ts +*refresh* /home/src/workspaces/project/src/a.ts +*refresh* /home/src/workspaces/project/src/index.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/project/src/c.ts +(stored at emit) /home/src/workspaces/project/src/b.ts +(computed .d.ts) /home/src/workspaces/project/src/a.ts +(computed .d.ts) /home/src/workspaces/project/src/index.ts diff --git a/testdata/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js b/testdata/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js new file mode 100644 index 0000000000..cf593d69f2 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js @@ -0,0 +1,418 @@ +currentDirectory::/home/src/workspaces/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/project/src/a.ts] *new* +import { B } from "./b"; + +export interface A { + b: B; +} +//// [/home/src/workspaces/project/src/b.ts] *new* +import { C } from "./c"; + +export interface B { + b: C; +} +//// [/home/src/workspaces/project/src/c.ts] *new* +import { A } from "./a"; + +export interface C { + a: A; +} +//// [/home/src/workspaces/project/src/index.ts] *new* +export { A } from "./a"; +export { B } from "./b"; +export { C } from "./c"; +//// [/home/src/workspaces/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": true, + "target": "es5", + "module": "commonjs", + "declaration": true, + "declarationMap": false, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "src", + "emitDeclarationOnly": true, + }, +} + +tsgo --b --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/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/lib/a.d.ts] *new* +import { B } from "./b"; +export interface A { + b: B; +} + +//// [/home/src/workspaces/project/lib/b.d.ts] *new* +import { C } from "./c"; +export interface B { + b: C; +} + +//// [/home/src/workspaces/project/lib/c.d.ts] *new* +import { A } from "./a"; +export interface C { + a: A; +} + +//// [/home/src/workspaces/project/lib/index.d.ts] *new* +export { A } from "./a"; +export { B } from "./b"; +export { C } from "./c"; + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/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":"e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}","signature":"57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n","impliedNodeFormat":1},{"version":"635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}","signature":"2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n","impliedNodeFormat":1},{"version":"0c094e56b7619bf6cde26939daf7a796-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}","signature":"2904de9e1ae84b014654eae6ae9d57b8-import { B } from \"./b\";\nexport interface A {\n b: B;\n}\n","impliedNodeFormat":1},{"version":"9752277022f460184d673fd343fe2c3f-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";","signature":"c689f6bb5a7ac5a812528f5b6ccb6872-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2],[4],[2,3,4]],"options":{"alwaysStrict":true,"composite":true,"emitDeclarationOnly":true,"declaration":true,"declarationMap":false,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","strict":true,"sourceMap":true,"target":1},"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"latestChangedDtsFile":"./lib/index.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/c.ts", + "./src/b.ts", + "./src/a.ts", + "./src/index.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./src/c.ts", + "./src/b.ts", + "./src/a.ts", + "./src/index.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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/c.ts", + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/b.ts", + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/a.ts", + "version": "0c094e56b7619bf6cde26939daf7a796-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}", + "signature": "2904de9e1ae84b014654eae6ae9d57b8-import { B } from \"./b\";\nexport interface A {\n b: B;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "0c094e56b7619bf6cde26939daf7a796-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}", + "signature": "2904de9e1ae84b014654eae6ae9d57b8-import { B } from \"./b\";\nexport interface A {\n b: B;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/index.ts", + "version": "9752277022f460184d673fd343fe2c3f-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";", + "signature": "c689f6bb5a7ac5a812528f5b6ccb6872-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "9752277022f460184d673fd343fe2c3f-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";", + "signature": "c689f6bb5a7ac5a812528f5b6ccb6872-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./src/b.ts" + ], + [ + "./src/c.ts" + ], + [ + "./src/a.ts" + ], + [ + "./src/c.ts", + "./src/b.ts", + "./src/a.ts" + ] + ], + "options": { + "alwaysStrict": true, + "composite": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": false, + "esModuleInterop": true, + "module": 1, + "outDir": "./lib", + "rootDir": "./src", + "strict": true, + "sourceMap": true, + "target": 1 + }, + "referencedMap": { + "./src/a.ts": [ + "./src/b.ts" + ], + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ], + "./src/index.ts": [ + "./src/c.ts", + "./src/b.ts", + "./src/a.ts" + ] + }, + "latestChangedDtsFile": "./lib/index.d.ts", + "size": 2298 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/project/src/c.ts +*refresh* /home/src/workspaces/project/src/b.ts +*refresh* /home/src/workspaces/project/src/a.ts +*refresh* /home/src/workspaces/project/src/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/project/src/c.ts +(stored at emit) /home/src/workspaces/project/src/b.ts +(stored at emit) /home/src/workspaces/project/src/a.ts +(stored at emit) /home/src/workspaces/project/src/index.ts + + +Edit [0]:: incremental-declaration-changes +//// [/home/src/workspaces/project/src/a.ts] *modified* +import { B } from "./b"; + +export interface A { + b: B; foo: any; +} + +tsgo --b --verbose +ExitStatus:: Success +Output:: +[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 'src/a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/lib/a.d.ts] *modified* +import { B } from "./b"; +export interface A { + b: B; + foo: any; +} + +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/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":"e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}","signature":"57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n","impliedNodeFormat":1},{"version":"635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}","signature":"2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n","impliedNodeFormat":1},{"version":"078c59719381373c2fc227a7b5ee0f0b-import { B } from \"./b\";\n\nexport interface A {\n b: B; foo: any;\n}","signature":"ddf8205c0552214926ecdcce4664e925-import { B } from \"./b\";\nexport interface A {\n b: B;\n foo: any;\n}\n","impliedNodeFormat":1},{"version":"9752277022f460184d673fd343fe2c3f-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";","signature":"c689f6bb5a7ac5a812528f5b6ccb6872-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2],[4],[2,3,4]],"options":{"alwaysStrict":true,"composite":true,"emitDeclarationOnly":true,"declaration":true,"declarationMap":false,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","strict":true,"sourceMap":true,"target":1},"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"latestChangedDtsFile":"./lib/a.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/c.ts", + "./src/b.ts", + "./src/a.ts", + "./src/index.ts" + ], + "original": [ + 2, + 5 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./src/c.ts", + "./src/b.ts", + "./src/a.ts", + "./src/index.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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/c.ts", + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/b.ts", + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/a.ts", + "version": "078c59719381373c2fc227a7b5ee0f0b-import { B } from \"./b\";\n\nexport interface A {\n b: B; foo: any;\n}", + "signature": "ddf8205c0552214926ecdcce4664e925-import { B } from \"./b\";\nexport interface A {\n b: B;\n foo: any;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "078c59719381373c2fc227a7b5ee0f0b-import { B } from \"./b\";\n\nexport interface A {\n b: B; foo: any;\n}", + "signature": "ddf8205c0552214926ecdcce4664e925-import { B } from \"./b\";\nexport interface A {\n b: B;\n foo: any;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/index.ts", + "version": "9752277022f460184d673fd343fe2c3f-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";", + "signature": "c689f6bb5a7ac5a812528f5b6ccb6872-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "9752277022f460184d673fd343fe2c3f-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";", + "signature": "c689f6bb5a7ac5a812528f5b6ccb6872-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./src/b.ts" + ], + [ + "./src/c.ts" + ], + [ + "./src/a.ts" + ], + [ + "./src/c.ts", + "./src/b.ts", + "./src/a.ts" + ] + ], + "options": { + "alwaysStrict": true, + "composite": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": false, + "esModuleInterop": true, + "module": 1, + "outDir": "./lib", + "rootDir": "./src", + "strict": true, + "sourceMap": true, + "target": 1 + }, + "referencedMap": { + "./src/a.ts": [ + "./src/b.ts" + ], + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ], + "./src/index.ts": [ + "./src/c.ts", + "./src/b.ts", + "./src/a.ts" + ] + }, + "latestChangedDtsFile": "./lib/a.d.ts", + "size": 2319 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/project/src/c.ts +*refresh* /home/src/workspaces/project/src/b.ts +*refresh* /home/src/workspaces/project/src/a.ts +*refresh* /home/src/workspaces/project/src/index.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/project/src/c.ts +(stored at emit) /home/src/workspaces/project/src/b.ts +(computed .d.ts) /home/src/workspaces/project/src/a.ts +(computed .d.ts) /home/src/workspaces/project/src/index.ts diff --git a/testdata/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js b/testdata/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js new file mode 100644 index 0000000000..1501085a21 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js @@ -0,0 +1,495 @@ +currentDirectory::/home/src/workspaces/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/project/src/a.ts] *new* +export class B { prop = "hello"; } + +export interface A { + b: B; +} +//// [/home/src/workspaces/project/src/b.ts] *new* +import { C } from "./c"; + +export interface B { + b: C; +} +//// [/home/src/workspaces/project/src/c.ts] *new* +import { A } from "./a"; + +export interface C { + a: A; +} +//// [/home/src/workspaces/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": true, + "target": "es5", + "module": "commonjs", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "src", + "emitDeclarationOnly": true, + }, +} + +tsgo --b --verbose +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/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/lib/a.d.ts] *new* +export declare class B { + prop: string; +} +export interface A { + b: B; +} +//# sourceMappingURL=a.d.ts.map +//// [/home/src/workspaces/project/lib/a.d.ts.map] *new* +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,qBAAa,CAAC;IAAG,IAAI,SAAW;CAAE;AAElC,MAAM,WAAW,CAAC;IACd,CAAC,EAAE,CAAC,CAAC;CACR"} +//// [/home/src/workspaces/project/lib/b.d.ts] *new* +import { C } from "./c"; +export interface B { + b: C; +} +//# sourceMappingURL=b.d.ts.map +//// [/home/src/workspaces/project/lib/b.d.ts.map] *new* +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["../src/b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IACd,CAAC,EAAE,CAAC,CAAC;CACR"} +//// [/home/src/workspaces/project/lib/c.d.ts] *new* +import { A } from "./a"; +export interface C { + a: A; +} +//# sourceMappingURL=c.d.ts.map +//// [/home/src/workspaces/project/lib/c.d.ts.map] *new* +{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["../src/c.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IACd,CAAC,EAAE,CAAC,CAAC;CACR"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/a.ts","./src/c.ts","./src/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":"665f99944701507453d40566cb1ae14c-export class B { prop = \"hello\"; }\n\nexport interface A {\n b: B;\n}","signature":"99c00a9e07d33f360f88c1625460e5f4-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n}\n","impliedNodeFormat":1},{"version":"e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}","signature":"57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n","impliedNodeFormat":1},{"version":"635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}","signature":"2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"options":{"alwaysStrict":true,"composite":true,"emitDeclarationOnly":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","strict":true,"sourceMap":true,"target":1},"referencedMap":[[4,1],[3,2]],"latestChangedDtsFile":"./lib/b.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/a.ts", + "./src/c.ts", + "./src/b.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./src/a.ts", + "./src/c.ts", + "./src/b.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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/a.ts", + "version": "665f99944701507453d40566cb1ae14c-export class B { prop = \"hello\"; }\n\nexport interface A {\n b: B;\n}", + "signature": "99c00a9e07d33f360f88c1625460e5f4-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "665f99944701507453d40566cb1ae14c-export class B { prop = \"hello\"; }\n\nexport interface A {\n b: B;\n}", + "signature": "99c00a9e07d33f360f88c1625460e5f4-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/c.ts", + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/b.ts", + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./src/c.ts" + ], + [ + "./src/a.ts" + ] + ], + "options": { + "alwaysStrict": true, + "composite": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "module": 1, + "outDir": "./lib", + "rootDir": "./src", + "strict": true, + "sourceMap": true, + "target": 1 + }, + "referencedMap": { + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ] + }, + "latestChangedDtsFile": "./lib/b.d.ts", + "size": 1998 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/project/src/a.ts +*refresh* /home/src/workspaces/project/src/c.ts +*refresh* /home/src/workspaces/project/src/b.ts +Signatures:: +(stored at emit) /home/src/workspaces/project/src/a.ts +(stored at emit) /home/src/workspaces/project/src/c.ts +(stored at emit) /home/src/workspaces/project/src/b.ts + + +Edit [0]:: incremental-declaration-doesnt-change +//// [/home/src/workspaces/project/src/a.ts] *modified* +export class B { prop = "hello"; } + +class C { } +export interface A { + b: B; +} + +tsgo --b --verbose +ExitStatus:: Success +Output:: +[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 'src/a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/lib/a.d.ts.map] *modified* +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,qBAAa,CAAC;IAAG,IAAI,SAAW;CAAE;AAGlC,MAAM,WAAW,CAAC;IACd,CAAC,EAAE,CAAC,CAAC;CACR"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/a.ts","./src/c.ts","./src/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":"d6b87c1d5c5dc8a828f29d0ccdf50a96-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B;\n}","signature":"99c00a9e07d33f360f88c1625460e5f4-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n}\n","impliedNodeFormat":1},{"version":"e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}","signature":"57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n","impliedNodeFormat":1},{"version":"635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}","signature":"2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"options":{"alwaysStrict":true,"composite":true,"emitDeclarationOnly":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","strict":true,"sourceMap":true,"target":1},"referencedMap":[[4,1],[3,2]],"latestChangedDtsFile":"./lib/b.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/a.ts", + "./src/c.ts", + "./src/b.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./src/a.ts", + "./src/c.ts", + "./src/b.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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/a.ts", + "version": "d6b87c1d5c5dc8a828f29d0ccdf50a96-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B;\n}", + "signature": "99c00a9e07d33f360f88c1625460e5f4-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d6b87c1d5c5dc8a828f29d0ccdf50a96-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B;\n}", + "signature": "99c00a9e07d33f360f88c1625460e5f4-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/c.ts", + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/b.ts", + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./src/c.ts" + ], + [ + "./src/a.ts" + ] + ], + "options": { + "alwaysStrict": true, + "composite": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "module": 1, + "outDir": "./lib", + "rootDir": "./src", + "strict": true, + "sourceMap": true, + "target": 1 + }, + "referencedMap": { + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ] + }, + "latestChangedDtsFile": "./lib/b.d.ts", + "size": 2011 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/project/src/a.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/project/src/a.ts + + +Edit [1]:: incremental-declaration-changes +//// [/home/src/workspaces/project/src/a.ts] *modified* +export class B { prop = "hello"; } + +class C { } +export interface A { + b: B; foo: any; +} + +tsgo --b --verbose +ExitStatus:: Success +Output:: +[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 'src/a.ts' + +[HH:MM:SS AM] Building project 'tsconfig.json'... + +//// [/home/src/workspaces/project/lib/a.d.ts] *modified* +export declare class B { + prop: string; +} +export interface A { + b: B; + foo: any; +} +//# sourceMappingURL=a.d.ts.map +//// [/home/src/workspaces/project/lib/a.d.ts.map] *modified* +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,qBAAa,CAAC;IAAG,IAAI,SAAW;CAAE;AAGlC,MAAM,WAAW,CAAC;IACd,CAAC,EAAE,CAAC,CAAC;IAAC,GAAG,EAAE,GAAG,CAAC;CAClB"} +//// [/home/src/workspaces/project/lib/b.d.ts.map] *rewrite with same content* +//// [/home/src/workspaces/project/lib/c.d.ts.map] *rewrite with same content* +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/a.ts","./src/c.ts","./src/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":"f2ea1f64003c617e4826031e7133d22d-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B; foo: any;\n}","signature":"1bd611ec5b00f8f076ed030967bcfa3e-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n foo: any;\n}\n","impliedNodeFormat":1},{"version":"e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}","signature":"57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n","impliedNodeFormat":1},{"version":"635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}","signature":"2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"options":{"alwaysStrict":true,"composite":true,"emitDeclarationOnly":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","strict":true,"sourceMap":true,"target":1},"referencedMap":[[4,1],[3,2]],"latestChangedDtsFile":"./lib/a.d.ts"} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/a.ts", + "./src/c.ts", + "./src/b.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "../../tslibs/TS/Lib/lib.d.ts", + "./src/a.ts", + "./src/c.ts", + "./src/b.ts" + ], + "fileInfos": [ + { + "fileName": "../../tslibs/TS/Lib/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/a.ts", + "version": "f2ea1f64003c617e4826031e7133d22d-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B; foo: any;\n}", + "signature": "1bd611ec5b00f8f076ed030967bcfa3e-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n foo: any;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "f2ea1f64003c617e4826031e7133d22d-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B; foo: any;\n}", + "signature": "1bd611ec5b00f8f076ed030967bcfa3e-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n foo: any;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/c.ts", + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "e8d66a87a10151e3d8c84e04e3d962c9-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}", + "signature": "57c1fb7dd5816e999a47a54abfd60004-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./src/b.ts", + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "635cd13fa5127837a0f61aa9d436e764-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}", + "signature": "2c6af9ce6f102ba192048b07d4b44ebf-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./src/c.ts" + ], + [ + "./src/a.ts" + ] + ], + "options": { + "alwaysStrict": true, + "composite": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "module": 1, + "outDir": "./lib", + "rootDir": "./src", + "strict": true, + "sourceMap": true, + "target": 1 + }, + "referencedMap": { + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ] + }, + "latestChangedDtsFile": "./lib/a.d.ts", + "size": 2036 +} + +/home/src/workspaces/project/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/project/src/a.ts +*refresh* /home/src/workspaces/project/src/c.ts +*refresh* /home/src/workspaces/project/src/b.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/project/src/a.ts +(computed .d.ts) /home/src/workspaces/project/src/c.ts +(stored at emit) /home/src/workspaces/project/src/b.ts diff --git a/testdata/baselines/reference/tsbuild/solution/does-not-have-empty-files-diagnostic-when-files-is-empty-and-references-are-provided.js b/testdata/baselines/reference/tsbuild/solution/does-not-have-empty-files-diagnostic-when-files-is-empty-and-references-are-provided.js new file mode 100644 index 0000000000..7eced4db31 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/solution/does-not-have-empty-files-diagnostic-when-files-is-empty-and-references-are-provided.js @@ -0,0 +1,123 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/core/index.ts] *new* +export function multiply(a: number, b: number) { return a * b; } +//// [/home/src/workspaces/solution/core/tsconfig.json] *new* +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + }, +} +//// [/home/src/workspaces/solution/with-references/tsconfig.json] *new* +{ + "references": [ + { "path": "../core" }, + ], + "files": [], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b with-references +ExitStatus:: Success +Output:: +//// [/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/core/index.d.ts] *new* +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map +//// [/home/src/workspaces/solution/core/index.d.ts.map] *new* +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} +//// [/home/src/workspaces/solution/core/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.multiply = multiply; +function multiply(a, b) { return a * b; } + +//// [/home/src/workspaces/solution/core/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["../../../tslibs/TS/Lib/lib.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},{"version":"3e196dbeb0efd6f81808db37973c4e6d-export function multiply(a: number, b: number) { return a * b; }","signature":"0d04cb6a9ce77a203776db1857b08505-export declare function multiply(a: number, b: number): number;\n","impliedNodeFormat":1}],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspaces/solution/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "../../../tslibs/TS/Lib/lib.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "../../../tslibs/TS/Lib/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": "./index.ts", + "version": "3e196dbeb0efd6f81808db37973c4e6d-export function multiply(a: number, b: number) { return a * b; }", + "signature": "0d04cb6a9ce77a203776db1857b08505-export declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "3e196dbeb0efd6f81808db37973c4e6d-export function multiply(a: number, b: number) { return a * b; }", + "signature": "0d04cb6a9ce77a203776db1857b08505-export declare function multiply(a: number, b: number): number;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1265 +} + +/home/src/workspaces/solution/core/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/core/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/core/index.ts diff --git a/testdata/baselines/reference/tsbuild/solution/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js b/testdata/baselines/reference/tsbuild/solution/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js new file mode 100644 index 0000000000..d34cea0112 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/solution/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js @@ -0,0 +1,27 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/no-references/tsconfig.json] *new* +{ + "references": [], + "files": [], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + }, +} + +tsgo --b no-references +ExitStatus:: DiagnosticsPresent_OutputsSkipped +Output:: +no-references/tsconfig.json:3:14 - error TS18002: The 'files' list in config file '/home/src/workspaces/solution/no-references/tsconfig.json' is empty. + +3 "files": [], +   ~~ + + +Found 1 error in no-references/tsconfig.json:3 + + diff --git a/testdata/baselines/reference/tsbuild/solution/verify-that-subsequent-builds-after-initial-build-doesnt-build-anything.js b/testdata/baselines/reference/tsbuild/solution/verify-that-subsequent-builds-after-initial-build-doesnt-build-anything.js new file mode 100644 index 0000000000..e983152e1a --- /dev/null +++ b/testdata/baselines/reference/tsbuild/solution/verify-that-subsequent-builds-after-initial-build-doesnt-build-anything.js @@ -0,0 +1,314 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/src/folder/index.ts] *new* +export const x = 10; +//// [/home/src/workspaces/solution/src/folder/tsconfig.json] *new* +{ + "files": ["index.ts"], + "compilerOptions": { + "composite": true + } +} +//// [/home/src/workspaces/solution/src/folder2/index.ts] *new* +export const x = 10; +//// [/home/src/workspaces/solution/src/folder2/tsconfig.json] *new* +{ + "files": ["index.ts"], + "compilerOptions": { + "composite": true + } +} +//// [/home/src/workspaces/solution/src/tsconfig.json] *new* + { + "files": [], + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "./folder" }, + { "path": "./folder2" }, + ] +} +//// [/home/src/workspaces/solution/tests/index.ts] *new* +export const x = 10; +//// [/home/src/workspaces/solution/tests/tsconfig.json] *new* +{ + "files": ["index.ts"], + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "../src" } + ] +} +//// [/home/src/workspaces/solution/tsconfig.json] *new* +{ + "files": [], + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "./src" }, + { "path": "./tests" } + ] +} + +tsgo --b --v +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * src/folder/tsconfig.json + * src/folder2/tsconfig.json + * src/tsconfig.json + * tests/tsconfig.json + * tsconfig.json + +[HH:MM:SS AM] Project 'src/folder/tsconfig.json' is out of date because output file 'src/folder/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'src/folder/tsconfig.json'... + +[HH:MM:SS AM] Project 'src/folder2/tsconfig.json' is out of date because output file 'src/folder2/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project 'src/folder2/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'... + +//// [/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/src/folder/index.d.ts] *new* +export declare const x = 10; + +//// [/home/src/workspaces/solution/src/folder/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + +//// [/home/src/workspaces/solution/src/folder/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["../../../../tslibs/TS/Lib/lib.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},{"version":"28e8748a7acd58f4f59388926e914f86-export const x = 10;","signature":"f9b4154a9a5944099ecf197d4519d083-export declare const x = 10;\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspaces/solution/src/folder/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./index.ts", + "version": "28e8748a7acd58f4f59388926e914f86-export const x = 10;", + "signature": "f9b4154a9a5944099ecf197d4519d083-export declare const x = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28e8748a7acd58f4f59388926e914f86-export const x = 10;", + "signature": "f9b4154a9a5944099ecf197d4519d083-export declare const x = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1121 +} +//// [/home/src/workspaces/solution/src/folder2/index.d.ts] *new* +export declare const x = 10; + +//// [/home/src/workspaces/solution/src/folder2/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + +//// [/home/src/workspaces/solution/src/folder2/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["../../../../tslibs/TS/Lib/lib.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},{"version":"28e8748a7acd58f4f59388926e914f86-export const x = 10;","signature":"f9b4154a9a5944099ecf197d4519d083-export declare const x = 10;\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspaces/solution/src/folder2/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "../../../../tslibs/TS/Lib/lib.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "../../../../tslibs/TS/Lib/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": "./index.ts", + "version": "28e8748a7acd58f4f59388926e914f86-export const x = 10;", + "signature": "f9b4154a9a5944099ecf197d4519d083-export declare const x = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28e8748a7acd58f4f59388926e914f86-export const x = 10;", + "signature": "f9b4154a9a5944099ecf197d4519d083-export declare const x = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1121 +} +//// [/home/src/workspaces/solution/tests/index.d.ts] *new* +export declare const x = 10; + +//// [/home/src/workspaces/solution/tests/index.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + +//// [/home/src/workspaces/solution/tests/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["../../../tslibs/TS/Lib/lib.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},{"version":"28e8748a7acd58f4f59388926e914f86-export const x = 10;","signature":"f9b4154a9a5944099ecf197d4519d083-export declare const x = 10;\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts"} +//// [/home/src/workspaces/solution/tests/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "../../../tslibs/TS/Lib/lib.d.ts", + "./index.ts" + ], + "fileInfos": [ + { + "fileName": "../../../tslibs/TS/Lib/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": "./index.ts", + "version": "28e8748a7acd58f4f59388926e914f86-export const x = 10;", + "signature": "f9b4154a9a5944099ecf197d4519d083-export declare const x = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "28e8748a7acd58f4f59388926e914f86-export const x = 10;", + "signature": "f9b4154a9a5944099ecf197d4519d083-export declare const x = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./index.d.ts", + "size": 1118 +} + +/home/src/workspaces/solution/src/folder/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/src/folder/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/src/folder/index.ts + +/home/src/workspaces/solution/src/folder2/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/src/folder2/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/src/folder2/index.ts + +/home/src/workspaces/solution/tests/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/tests/index.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/tests/index.ts + + +Edit [0]:: no change + +tsgo --b --v +ExitStatus:: Success +Output:: +[HH:MM:SS AM] Projects in this build: + * src/folder/tsconfig.json + * src/folder2/tsconfig.json + * src/tsconfig.json + * tests/tsconfig.json + * tsconfig.json + +[HH:MM:SS AM] Project 'src/folder/tsconfig.json' is up to date because newest input 'src/folder/index.ts' is older than output 'src/folder/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'src/folder2/tsconfig.json' is up to date because newest input 'src/folder2/index.ts' is older than output 'src/folder2/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'tests/tsconfig.json' is up to date because newest input 'tests/index.ts' is older than output 'tests/tsconfig.tsbuildinfo' + + diff --git a/testdata/baselines/reference/tsbuild/solution/when-solution-is-referenced-indirectly.js b/testdata/baselines/reference/tsbuild/solution/when-solution-is-referenced-indirectly.js new file mode 100644 index 0000000000..d76e6cad12 --- /dev/null +++ b/testdata/baselines/reference/tsbuild/solution/when-solution-is-referenced-indirectly.js @@ -0,0 +1,364 @@ +currentDirectory::/home/src/workspaces/solution +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/solution/project1/tsconfig.json] *new* +{ + "compilerOptions": { "composite": true }, + "references": [] +} +//// [/home/src/workspaces/solution/project2/src/b.ts] *new* +export const b = 10; +//// [/home/src/workspaces/solution/project2/tsconfig.json] *new* +{ + "compilerOptions": { "composite": true }, + "references": [] +} +//// [/home/src/workspaces/solution/project3/src/c.ts] *new* +export const c = 10; +//// [/home/src/workspaces/solution/project3/tsconfig.json] *new* +{ + "compilerOptions": { "composite": true }, + "references": [ + { "path": "../project1" }, + { "path": "../project2" } + ] +} +//// [/home/src/workspaces/solution/project4/src/d.ts] *new* +export const d = 10; +//// [/home/src/workspaces/solution/project4/tsconfig.json] *new* +{ + "compilerOptions": { "composite": true }, + "references": [{ "path": "../project3" }] +} + +tsgo --b project4 --verbose --explainFiles +ExitStatus:: Success +Output:: +[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 '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] 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'... + +//// [/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/project2/src/b.d.ts] *new* +export declare const b = 10; + +//// [/home/src/workspaces/solution/project2/src/b.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; + +//// [/home/src/workspaces/solution/project2/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["../../../tslibs/TS/Lib/lib.d.ts","./src/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":"907abc8137ceb88f0ddd6eccfa92d573-export const b = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./src/b.d.ts"} +//// [/home/src/workspaces/solution/project2/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/b.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "../../../tslibs/TS/Lib/lib.d.ts", + "./src/b.ts" + ], + "fileInfos": [ + { + "fileName": "../../../tslibs/TS/Lib/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/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": { + "composite": true + }, + "latestChangedDtsFile": "./src/b.d.ts", + "size": 1118 +} +//// [/home/src/workspaces/solution/project3/src/c.d.ts] *new* +export declare const c = 10; + +//// [/home/src/workspaces/solution/project3/src/c.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +exports.c = 10; + +//// [/home/src/workspaces/solution/project3/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["../../../tslibs/TS/Lib/lib.d.ts","./src/c.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":"8bc1c94c71c8b47587db189712f5ab2c-export const c = 10;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./src/c.d.ts"} +//// [/home/src/workspaces/solution/project3/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/c.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "../../../tslibs/TS/Lib/lib.d.ts", + "./src/c.ts" + ], + "fileInfos": [ + { + "fileName": "../../../tslibs/TS/Lib/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/c.ts", + "version": "8bc1c94c71c8b47587db189712f5ab2c-export const c = 10;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8bc1c94c71c8b47587db189712f5ab2c-export const c = 10;", + "signature": "6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./src/c.d.ts", + "size": 1118 +} +//// [/home/src/workspaces/solution/project4/src/d.d.ts] *new* +export declare const d = 10; + +//// [/home/src/workspaces/solution/project4/src/d.js] *new* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +exports.d = 10; + +//// [/home/src/workspaces/solution/project4/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[2],"fileNames":["../../../tslibs/TS/Lib/lib.d.ts","./src/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":"c3e4ecb1ad42999b9e5a8cbb3d993726-export const d = 10;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./src/d.d.ts"} +//// [/home/src/workspaces/solution/project4/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/d.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "../../../tslibs/TS/Lib/lib.d.ts", + "./src/d.ts" + ], + "fileInfos": [ + { + "fileName": "../../../tslibs/TS/Lib/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/d.ts", + "version": "c3e4ecb1ad42999b9e5a8cbb3d993726-export const d = 10;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "c3e4ecb1ad42999b9e5a8cbb3d993726-export const d = 10;", + "signature": "3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./src/d.d.ts", + "size": 1118 +} + +/home/src/workspaces/solution/project2/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project2/src/b.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project2/src/b.ts + +/home/src/workspaces/solution/project3/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project3/src/c.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project3/src/c.ts + +/home/src/workspaces/solution/project4/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.d.ts +*refresh* /home/src/workspaces/solution/project4/src/d.ts +Signatures:: +(stored at emit) /home/src/workspaces/solution/project4/src/d.ts + + +Edit [0]:: modify project3 file +//// [/home/src/workspaces/solution/project3/src/c.ts] *modified* +export const cc = 10; + +tsgo --b project4 --verbose --explainFiles +ExitStatus:: Success +Output:: +[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 'project2/tsconfig.json' is up to date because newest input 'project2/src/b.ts' is older than output 'project2/tsconfig.tsbuildinfo' + +[HH:MM:SS AM] Project 'project3/tsconfig.json' is out of date because output 'project3/tsconfig.tsbuildinfo' is older than input 'project3/src/c.ts' + +[HH:MM:SS AM] Building project 'project3/tsconfig.json'... + +[HH:MM:SS AM] Project 'project4/tsconfig.json' is out of date because output 'project4/tsconfig.tsbuildinfo' is older than input 'project3' + +[HH:MM:SS AM] Building project 'project4/tsconfig.json'... + +[HH:MM:SS AM] Updating unchanged output timestamps of project 'project4/tsconfig.json'... + +//// [/home/src/workspaces/solution/project3/src/c.d.ts] *modified* +export declare const cc = 10; + +//// [/home/src/workspaces/solution/project3/src/c.js] *modified* +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.cc = void 0; +exports.cc = 10; + +//// [/home/src/workspaces/solution/project3/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[2],"fileNames":["../../../tslibs/TS/Lib/lib.d.ts","./src/c.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":"0c1eb6b93bf327534ca72bc76ad6f9dc-export const cc = 10;","signature":"5a5b90c913f1887b69f44d96c9a641ad-export declare const cc = 10;\n","impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./src/c.d.ts"} +//// [/home/src/workspaces/solution/project3/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/c.ts" + ], + "original": 2 + } + ], + "fileNames": [ + "../../../tslibs/TS/Lib/lib.d.ts", + "./src/c.ts" + ], + "fileInfos": [ + { + "fileName": "../../../tslibs/TS/Lib/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/c.ts", + "version": "0c1eb6b93bf327534ca72bc76ad6f9dc-export const cc = 10;", + "signature": "5a5b90c913f1887b69f44d96c9a641ad-export declare const cc = 10;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "0c1eb6b93bf327534ca72bc76ad6f9dc-export const cc = 10;", + "signature": "5a5b90c913f1887b69f44d96c9a641ad-export declare const cc = 10;\n", + "impliedNodeFormat": 1 + } + } + ], + "options": { + "composite": true + }, + "latestChangedDtsFile": "./src/c.d.ts", + "size": 1120 +} +//// [/home/src/workspaces/solution/project4/tsconfig.tsbuildinfo] *mTime changed* + +/home/src/workspaces/solution/project3/tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/solution/project3/src/c.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/solution/project3/src/c.ts + +/home/src/workspaces/solution/project4/tsconfig.json:: +SemanticDiagnostics:: +Signatures:: diff --git a/testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js b/testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js index 223c37ff17..b874e0df4d 100644 --- a/testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js +++ b/testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js @@ -6,7 +6,6 @@ tsgo ExitStatus:: DiagnosticsPresent_OutputsSkipped Output:: Version FakeTSVersion - tsc: The TypeScript Compiler - Version FakeTSVersion COMMON COMMANDS diff --git a/testdata/baselines/reference/tsc/commandLine/help-all.js b/testdata/baselines/reference/tsc/commandLine/help-all.js index ece14ddbf0..b96905a0a7 100644 --- a/testdata/baselines/reference/tsc/commandLine/help-all.js +++ b/testdata/baselines/reference/tsc/commandLine/help-all.js @@ -5,5 +5,4 @@ Input:: tsgo --help --all ExitStatus:: Success Output:: -No output diff --git a/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js b/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js index 223c37ff17..b874e0df4d 100644 --- a/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js +++ b/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js @@ -6,7 +6,6 @@ tsgo ExitStatus:: DiagnosticsPresent_OutputsSkipped Output:: Version FakeTSVersion - tsc: The TypeScript Compiler - Version FakeTSVersion COMMON COMMANDS diff --git a/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js b/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js index 223c37ff17..b874e0df4d 100644 --- a/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js +++ b/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js @@ -6,7 +6,6 @@ tsgo ExitStatus:: DiagnosticsPresent_OutputsSkipped Output:: Version FakeTSVersion - tsc: The TypeScript Compiler - Version FakeTSVersion COMMON COMMANDS diff --git a/testdata/baselines/reference/tsc/extends/configDir-template-showConfig.js b/testdata/baselines/reference/tsc/extends/configDir-template-showConfig.js index b32d38fcc4..6e13d50e15 100644 --- a/testdata/baselines/reference/tsc/extends/configDir-template-showConfig.js +++ b/testdata/baselines/reference/tsc/extends/configDir-template-showConfig.js @@ -51,5 +51,27 @@ export const x = 10; tsgo --showConfig ExitStatus:: Success Output:: -No output - +{ + "declaration": true, + "declarationDir": "/home/src/projects/myproject/decls", + "outDir": "/home/src/projects/myproject/outDir", + "paths": { + "@myscope/*": [ + "/home/src/projects/myproject/types/*" + ], + "other/*": [ + "other/*" + ] + }, + "traceResolution": true, + "typeRoots": [ + "/home/src/projects/configs/first/root1", + "/home/src/projects/myproject/root2", + "/home/src/projects/configs/first/root3" + ], + "types": [], + "baseUrl": "/home/src/projects/myproject", + "configFilePath": "/home/src/projects/myproject/tsconfig.json", + "pathsBasePath": "/home/src/projects/configs/second", + "showConfig": true +} 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 5a7109f1eb..909f59e3d6 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 @@ -79,10 +79,22 @@ function logMessage(person) { export {}; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"778b786cd1eca831889c50ded7c79c1d-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };\ntype ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"500cfddf7f97c595e46579b9b5afc9bd-const Messageable = () => {\n return class MessageableClass {\n public message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"3847cb0c7d8f5a6eaa57e0b19ab33ea8-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n","impliedNodeFormat":1},{"version":"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true,"module":99},"referencedMap":[[3,1]]} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"778b786cd1eca831889c50ded7c79c1d-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };\ntype ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"500cfddf7f97c595e46579b9b5afc9bd-const Messageable = () => {\n return class MessageableClass {\n public message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"3847cb0c7d8f5a6eaa57e0b19ab33ea8-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n","impliedNodeFormat":1},{"version":"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true,"module":99},"referencedMap":[[3,1]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./MessageablePerson.ts", + "./main.ts" + ], + "original": [ + 2, + 3 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./MessageablePerson.ts", @@ -138,9 +150,10 @@ export {}; "./MessageablePerson.ts" ] }, - "size": 2039 + "size": 2054 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/MessageablePerson.ts @@ -156,6 +169,7 @@ tsgo --incremental ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -200,10 +214,22 @@ Errors Files //// [/home/src/workspaces/project/main.d.ts] *rewrite with same content* //// [/home/src/workspaces/project/main.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"778b786cd1eca831889c50ded7c79c1d-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };\ntype ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"fc3bcee26e986c769691717bfbe49525-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"eb669b96f45855935c22925689eec67c-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n\n(116,7): error4094: Property 'message' of exported anonymous class type may not be private or protected.\n(116,7): error9027: Add a type annotation to the variable wrapper.","impliedNodeFormat":1},{"version":"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true,"module":99},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"pos":131,"end":138,"code":2445,"category":1,"message":"Property 'message' is protected and only accessible within class 'MessageableClass' and its subclasses."}]]],"emitDiagnosticsPerFile":[[2,[{"pos":116,"end":123,"code":4094,"category":1,"message":"Property 'message' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":116,"end":123,"code":9027,"category":1,"message":"Add a type annotation to the variable wrapper."}]}]]]} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"778b786cd1eca831889c50ded7c79c1d-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };\ntype ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"fc3bcee26e986c769691717bfbe49525-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"eb669b96f45855935c22925689eec67c-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n\n(116,7): error4094: Property 'message' of exported anonymous class type may not be private or protected.\n(116,7): error9027: Add a type annotation to the variable wrapper.","impliedNodeFormat":1},{"version":"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true,"module":99},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"pos":131,"end":138,"code":2445,"category":1,"message":"Property 'message' is protected and only accessible within class 'MessageableClass' and its subclasses."}]]],"emitDiagnosticsPerFile":[[2,[{"pos":116,"end":123,"code":4094,"category":1,"message":"Property 'message' of exported anonymous class type may not be private or protected.","relatedInformation":[{"pos":116,"end":123,"code":9027,"category":1,"message":"Add a type annotation to the variable wrapper."}]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./MessageablePerson.ts", + "./main.ts" + ], + "original": [ + 2, + 3 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./MessageablePerson.ts", @@ -296,9 +322,10 @@ Errors Files ] ] ], - "size": 2722 + "size": 2737 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/workspaces/project/MessageablePerson.ts *refresh* /home/src/workspaces/project/main.ts @@ -336,6 +363,7 @@ Errors Files //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -359,10 +387,22 @@ Output:: //// [/home/src/workspaces/project/main.d.ts] *rewrite with same content* //// [/home/src/workspaces/project/main.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"778b786cd1eca831889c50ded7c79c1d-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };\ntype ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"500cfddf7f97c595e46579b9b5afc9bd-const Messageable = () => {\n return class MessageableClass {\n public message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"3847cb0c7d8f5a6eaa57e0b19ab33ea8-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n","impliedNodeFormat":1},{"version":"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true,"module":99},"referencedMap":[[3,1]]} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"778b786cd1eca831889c50ded7c79c1d-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };\ntype ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"500cfddf7f97c595e46579b9b5afc9bd-const Messageable = () => {\n return class MessageableClass {\n public message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"3847cb0c7d8f5a6eaa57e0b19ab33ea8-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n","impliedNodeFormat":1},{"version":"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true,"module":99},"referencedMap":[[3,1]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./MessageablePerson.ts", + "./main.ts" + ], + "original": [ + 2, + 3 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./MessageablePerson.ts", @@ -418,9 +458,10 @@ Output:: "./MessageablePerson.ts" ] }, - "size": 2039 + "size": 2054 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/workspaces/project/MessageablePerson.ts *refresh* /home/src/workspaces/project/main.ts @@ -435,5 +476,6 @@ tsgo --incremental ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: diff --git a/testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js b/testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js index ce106d123a..fa8331835c 100644 --- a/testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js +++ b/testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js @@ -66,10 +66,22 @@ function logMessage(person) { export {}; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"778b786cd1eca831889c50ded7c79c1d-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };\ntype ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true,"impliedNodeFormat":1},"500cfddf7f97c595e46579b9b5afc9bd-const Messageable = () => {\n return class MessageableClass {\n public message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}"],"fileIdsList":[[2]],"options":{"module":99},"referencedMap":[[3,1]]} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"778b786cd1eca831889c50ded7c79c1d-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };\ntype ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true,"impliedNodeFormat":1},"500cfddf7f97c595e46579b9b5afc9bd-const Messageable = () => {\n return class MessageableClass {\n public message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}"],"fileIdsList":[[2]],"options":{"module":99},"referencedMap":[[3,1]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./MessageablePerson.ts", + "./main.ts" + ], + "original": [ + 2, + 3 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./MessageablePerson.ts", @@ -114,9 +126,10 @@ export {}; "./MessageablePerson.ts" ] }, - "size": 1656 + "size": 1671 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/MessageablePerson.ts @@ -130,6 +143,7 @@ tsgo --incremental ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -159,10 +173,22 @@ Found 1 error in main.ts:3 //// [/home/src/workspaces/project/MessageablePerson.js] *rewrite with same content* //// [/home/src/workspaces/project/main.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"778b786cd1eca831889c50ded7c79c1d-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };\ntype ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"fc3bcee26e986c769691717bfbe49525-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"eb669b96f45855935c22925689eec67c-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n\n(116,7): error4094: Property 'message' of exported anonymous class type may not be private or protected.\n(116,7): error9027: Add a type annotation to the variable wrapper.","impliedNodeFormat":1},{"version":"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"module":99},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"pos":131,"end":138,"code":2445,"category":1,"message":"Property 'message' is protected and only accessible within class 'MessageableClass' and its subclasses."}]]]} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"778b786cd1eca831889c50ded7c79c1d-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };\ntype ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"fc3bcee26e986c769691717bfbe49525-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"eb669b96f45855935c22925689eec67c-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n\n(116,7): error4094: Property 'message' of exported anonymous class type may not be private or protected.\n(116,7): error9027: Add a type annotation to the variable wrapper.","impliedNodeFormat":1},{"version":"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"module":99},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"pos":131,"end":138,"code":2445,"category":1,"message":"Property 'message' is protected and only accessible within class 'MessageableClass' and its subclasses."}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./MessageablePerson.ts", + "./main.ts" + ], + "original": [ + 2, + 3 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./MessageablePerson.ts", @@ -231,9 +257,10 @@ Found 1 error in main.ts:3 ] ] ], - "size": 2397 + "size": 2412 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/workspaces/project/MessageablePerson.ts *refresh* /home/src/workspaces/project/main.ts @@ -256,6 +283,7 @@ Output:: Found 1 error in main.ts:3 +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -277,10 +305,22 @@ Output:: //// [/home/src/workspaces/project/MessageablePerson.js] *rewrite with same content* //// [/home/src/workspaces/project/main.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"778b786cd1eca831889c50ded7c79c1d-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };\ntype ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"500cfddf7f97c595e46579b9b5afc9bd-const Messageable = () => {\n return class MessageableClass {\n public message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"3847cb0c7d8f5a6eaa57e0b19ab33ea8-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n","impliedNodeFormat":1},{"version":"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"module":99},"referencedMap":[[3,1]]} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"778b786cd1eca831889c50ded7c79c1d-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };\ntype ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"500cfddf7f97c595e46579b9b5afc9bd-const Messageable = () => {\n return class MessageableClass {\n public message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"3847cb0c7d8f5a6eaa57e0b19ab33ea8-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n","impliedNodeFormat":1},{"version":"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"module":99},"referencedMap":[[3,1]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./MessageablePerson.ts", + "./main.ts" + ], + "original": [ + 2, + 3 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./MessageablePerson.ts", @@ -335,9 +375,10 @@ Output:: "./MessageablePerson.ts" ] }, - "size": 2020 + "size": 2035 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/workspaces/project/MessageablePerson.ts *refresh* /home/src/workspaces/project/main.ts @@ -352,5 +393,6 @@ tsgo --incremental ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: diff --git a/testdata/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file-through-indirect-import.js b/testdata/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file-through-indirect-import.js index aaa216a574..26f641d754 100644 --- a/testdata/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file-through-indirect-import.js +++ b/testdata/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file-through-indirect-import.js @@ -70,10 +70,24 @@ const constants_1 = require("./constants"); Object.defineProperty(exports, "ConstantNumber", { enumerable: true, get: function () { return constants_1.default; } }); //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./class1.ts","./constants.ts","./reexport.ts","./types.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":"881068d51dfd24d338a5f3706ee1097f-const a: MagicNumber = 1;\nconsole.log(a);","signature":"f59d1a67db5f979e23689dc09b68c628-declare const a = 1;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"c93bc8f54a24dc311538894cf3d7ac17-export default 1;","signature":"18ae69a2c0b372747b9973ad9c14a1e0-declare const _default: number;\nexport default _default;\n","impliedNodeFormat":1},{"version":"75c0647a66f2f74c4448b4b393e889d1-export { default as ConstantNumber } from \"./constants\"","signature":"3c986fce7f0f21b6b269681962fc7feb-export { default as ConstantNumber } from \"./constants\";\n","impliedNodeFormat":1},{"version":"d84f446b9b1fc3f56545f03793b7992c-type MagicNumber = typeof import('./reexport').ConstantNumber","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[4]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./reexport.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./class1.ts","./constants.ts","./reexport.ts","./types.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":"881068d51dfd24d338a5f3706ee1097f-const a: MagicNumber = 1;\nconsole.log(a);","signature":"f59d1a67db5f979e23689dc09b68c628-declare const a = 1;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"c93bc8f54a24dc311538894cf3d7ac17-export default 1;","signature":"18ae69a2c0b372747b9973ad9c14a1e0-declare const _default: number;\nexport default _default;\n","impliedNodeFormat":1},{"version":"75c0647a66f2f74c4448b4b393e889d1-export { default as ConstantNumber } from \"./constants\"","signature":"3c986fce7f0f21b6b269681962fc7feb-export { default as ConstantNumber } from \"./constants\";\n","impliedNodeFormat":1},{"version":"d84f446b9b1fc3f56545f03793b7992c-type MagicNumber = typeof import('./reexport').ConstantNumber","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[4]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./reexport.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./class1.ts", + "./constants.ts", + "./reexport.ts", + "./types.d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./class1.ts", @@ -162,9 +176,10 @@ Object.defineProperty(exports, "ConstantNumber", { enumerable: true, get: functi ] }, "latestChangedDtsFile": "./reexport.d.ts", - "size": 1836 + "size": 1851 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/class1.ts @@ -190,10 +205,24 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = 2; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./class1.ts","./constants.ts","./reexport.ts","./types.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":"881068d51dfd24d338a5f3706ee1097f-const a: MagicNumber = 1;\nconsole.log(a);","signature":"f59d1a67db5f979e23689dc09b68c628-declare const a = 1;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b8fa0b3912c91197fa3ec685cbc93c70-export default 2;","signature":"18ae69a2c0b372747b9973ad9c14a1e0-declare const _default: number;\nexport default _default;\n","impliedNodeFormat":1},{"version":"75c0647a66f2f74c4448b4b393e889d1-export { default as ConstantNumber } from \"./constants\"","signature":"3c986fce7f0f21b6b269681962fc7feb-export { default as ConstantNumber } from \"./constants\";\n","impliedNodeFormat":1},{"version":"d84f446b9b1fc3f56545f03793b7992c-type MagicNumber = typeof import('./reexport').ConstantNumber","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[4]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./reexport.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./class1.ts","./constants.ts","./reexport.ts","./types.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":"881068d51dfd24d338a5f3706ee1097f-const a: MagicNumber = 1;\nconsole.log(a);","signature":"f59d1a67db5f979e23689dc09b68c628-declare const a = 1;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b8fa0b3912c91197fa3ec685cbc93c70-export default 2;","signature":"18ae69a2c0b372747b9973ad9c14a1e0-declare const _default: number;\nexport default _default;\n","impliedNodeFormat":1},{"version":"75c0647a66f2f74c4448b4b393e889d1-export { default as ConstantNumber } from \"./constants\"","signature":"3c986fce7f0f21b6b269681962fc7feb-export { default as ConstantNumber } from \"./constants\";\n","impliedNodeFormat":1},{"version":"d84f446b9b1fc3f56545f03793b7992c-type MagicNumber = typeof import('./reexport').ConstantNumber","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[4]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./reexport.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./class1.ts", + "./constants.ts", + "./reexport.ts", + "./types.d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./class1.ts", @@ -282,9 +311,10 @@ exports.default = 2; ] }, "latestChangedDtsFile": "./reexport.d.ts", - "size": 1836 + "size": 1851 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/workspaces/project/constants.ts Signatures:: @@ -297,13 +327,14 @@ Diff:: Currently there is issue with d.ts emit for export default = 1 to widen i @@ -1,1 +1,1 @@ -declare const a = 2; +declare const a = 1; ---- nonIncremental errors.txt -+++ incremental errors.txt -@@ -1,7 +0,0 @@ +--- nonIncremental.output.txt ++++ incremental.output.txt +@@ -1,8 +0,0 @@ -class1.ts:1:7 - error TS2322: Type '1' is not assignable to type '2'. - -1 const a: MagicNumber = 1; -   ~ - +- -Found 1 error in class1.ts:1 - \ No newline at end of file diff --git a/testdata/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file.js b/testdata/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file.js index e81ca73963..737e2aa82b 100644 --- a/testdata/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file.js +++ b/testdata/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file.js @@ -58,10 +58,23 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = 1; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./class1.ts","./constants.ts","./types.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":"881068d51dfd24d338a5f3706ee1097f-const a: MagicNumber = 1;\nconsole.log(a);","signature":"f59d1a67db5f979e23689dc09b68c628-declare const a = 1;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"c93bc8f54a24dc311538894cf3d7ac17-export default 1;","signature":"18ae69a2c0b372747b9973ad9c14a1e0-declare const _default: number;\nexport default _default;\n","impliedNodeFormat":1},{"version":"45ee7661a81bc095b54ab4944b849fee-type MagicNumber = typeof import('./constants').default","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3]],"options":{"composite":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./constants.d.ts"} +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./class1.ts","./constants.ts","./types.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":"881068d51dfd24d338a5f3706ee1097f-const a: MagicNumber = 1;\nconsole.log(a);","signature":"f59d1a67db5f979e23689dc09b68c628-declare const a = 1;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"c93bc8f54a24dc311538894cf3d7ac17-export default 1;","signature":"18ae69a2c0b372747b9973ad9c14a1e0-declare const _default: number;\nexport default _default;\n","impliedNodeFormat":1},{"version":"45ee7661a81bc095b54ab4944b849fee-type MagicNumber = typeof import('./constants').default","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3]],"options":{"composite":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./constants.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./class1.ts", + "./constants.ts", + "./types.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./class1.ts", @@ -132,9 +145,10 @@ exports.default = 1; ] }, "latestChangedDtsFile": "./constants.d.ts", - "size": 1570 + "size": 1585 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/class1.ts @@ -158,10 +172,23 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = 2; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./class1.ts","./constants.ts","./types.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":"881068d51dfd24d338a5f3706ee1097f-const a: MagicNumber = 1;\nconsole.log(a);","signature":"f59d1a67db5f979e23689dc09b68c628-declare const a = 1;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b8fa0b3912c91197fa3ec685cbc93c70-export default 2;","signature":"18ae69a2c0b372747b9973ad9c14a1e0-declare const _default: number;\nexport default _default;\n","impliedNodeFormat":1},{"version":"45ee7661a81bc095b54ab4944b849fee-type MagicNumber = typeof import('./constants').default","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3]],"options":{"composite":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./constants.d.ts"} +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./class1.ts","./constants.ts","./types.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":"881068d51dfd24d338a5f3706ee1097f-const a: MagicNumber = 1;\nconsole.log(a);","signature":"f59d1a67db5f979e23689dc09b68c628-declare const a = 1;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b8fa0b3912c91197fa3ec685cbc93c70-export default 2;","signature":"18ae69a2c0b372747b9973ad9c14a1e0-declare const _default: number;\nexport default _default;\n","impliedNodeFormat":1},{"version":"45ee7661a81bc095b54ab4944b849fee-type MagicNumber = typeof import('./constants').default","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3]],"options":{"composite":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./constants.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./class1.ts", + "./constants.ts", + "./types.d.ts" + ], + "original": [ + 2, + 4 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./class1.ts", @@ -232,9 +259,10 @@ exports.default = 2; ] }, "latestChangedDtsFile": "./constants.d.ts", - "size": 1570 + "size": 1585 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/workspaces/project/constants.ts Signatures:: @@ -247,13 +275,14 @@ Diff:: Currently there is issue with d.ts emit for export default = 1 to widen i @@ -1,1 +1,1 @@ -declare const a = 2; +declare const a = 1; ---- nonIncremental errors.txt -+++ incremental errors.txt -@@ -1,7 +0,0 @@ +--- nonIncremental.output.txt ++++ incremental.output.txt +@@ -1,8 +0,0 @@ -class1.ts:1:7 - error TS2322: Type '1' is not assignable to type '2'. - -1 const a: MagicNumber = 1; -   ~ - +- -Found 1 error in class1.ts:1 - \ No newline at end of file diff --git a/testdata/baselines/reference/tsc/incremental/const-enums-aliased-in-different-file.js b/testdata/baselines/reference/tsc/incremental/const-enums-aliased-in-different-file.js index c62c716b97..f82afa30db 100644 --- a/testdata/baselines/reference/tsc/incremental/const-enums-aliased-in-different-file.js +++ b/testdata/baselines/reference/tsc/incremental/const-enums-aliased-in-different-file.js @@ -47,10 +47,18 @@ Object.defineProperty(exports, "__esModule", { value: true }); let a = c_1.A.ONE; //// [/home/src/workspaces/project/a.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./worker.d.ts","./b.d.ts","./c.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},"8a851657dbab1650611535d934e0e8a0-export const enum AWorker {\n ONE = 1\n}","e1ab01aa60a97dafcae2e9a0fe6467c6-export { AWorker as A } from \"./worker\";","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} +{"version":"FakeTSVersion","root":[5],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./worker.d.ts","./b.d.ts","./c.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},"8a851657dbab1650611535d934e0e8a0-export const enum AWorker {\n ONE = 1\n}","e1ab01aa60a97dafcae2e9a0fe6467c6-export { AWorker as A } from \"./worker\";","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 5 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./worker.d.ts", @@ -121,7 +129,7 @@ let a = c_1.A.ONE; "./b.d.ts" ] }, - "size": 1330 + "size": 1341 } //// [/home/src/workspaces/project/c.js] *new* "use strict"; @@ -149,10 +157,18 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./worker.d.ts","./b.d.ts","./c.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},"85732ecf91c49f8d8fff8ae96e3c1c8b-export const enum AWorker {\n ONE = 2\n}","e1ab01aa60a97dafcae2e9a0fe6467c6-export { AWorker as A } from \"./worker\";","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} +{"version":"FakeTSVersion","root":[5],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./worker.d.ts","./b.d.ts","./c.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},"85732ecf91c49f8d8fff8ae96e3c1c8b-export const enum AWorker {\n ONE = 2\n}","e1ab01aa60a97dafcae2e9a0fe6467c6-export { AWorker as A } from \"./worker\";","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 5 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./worker.d.ts", @@ -223,7 +239,7 @@ Output:: "./b.d.ts" ] }, - "size": 1330 + "size": 1341 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -250,10 +266,18 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./worker.d.ts","./b.d.ts","./c.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},"c1b69d4c011b97277dab4f0539048ca5-export const enum AWorker {\n ONE = 3\n}","e1ab01aa60a97dafcae2e9a0fe6467c6-export { AWorker as A } from \"./worker\";","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} +{"version":"FakeTSVersion","root":[5],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./worker.d.ts","./b.d.ts","./c.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},"c1b69d4c011b97277dab4f0539048ca5-export const enum AWorker {\n ONE = 3\n}","e1ab01aa60a97dafcae2e9a0fe6467c6-export { AWorker as A } from \"./worker\";","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 5 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./worker.d.ts", @@ -324,7 +348,7 @@ Output:: "./b.d.ts" ] }, - "size": 1330 + "size": 1341 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -349,10 +373,18 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./worker.d.ts","./b.d.ts","./c.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},"c1b69d4c011b97277dab4f0539048ca5-export const enum AWorker {\n ONE = 3\n}","7e628d40719306e63d220f210cef8697-export { AWorker as A } from \"./worker\";export const randomThing = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},{"version":"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} +{"version":"FakeTSVersion","root":[5],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./worker.d.ts","./b.d.ts","./c.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},"c1b69d4c011b97277dab4f0539048ca5-export const enum AWorker {\n ONE = 3\n}","7e628d40719306e63d220f210cef8697-export { AWorker as A } from \"./worker\";export const randomThing = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},{"version":"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 5 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./worker.d.ts", @@ -433,7 +465,7 @@ Output:: "./b.d.ts" ] }, - "size": 1579 + "size": 1590 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -455,10 +487,18 @@ tsgo -i a.ts --tsbuildinfofile a.tsbuildinfo ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./worker.d.ts","./b.d.ts","./c.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},"c1b69d4c011b97277dab4f0539048ca5-export const enum AWorker {\n ONE = 3\n}","85de628566e341d0050fe40f7319973e-export { AWorker as A } from \"./worker\";export const randomThing = 10;export const randomThing2 = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} +{"version":"FakeTSVersion","root":[5],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./worker.d.ts","./b.d.ts","./c.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},"c1b69d4c011b97277dab4f0539048ca5-export const enum AWorker {\n ONE = 3\n}","85de628566e341d0050fe40f7319973e-export { AWorker as A } from \"./worker\";export const randomThing = 10;export const randomThing2 = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 5 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./worker.d.ts", @@ -534,7 +574,7 @@ Output:: "./b.d.ts" ] }, - "size": 1516 + "size": 1527 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* diff --git a/testdata/baselines/reference/tsc/incremental/const-enums-aliased.js b/testdata/baselines/reference/tsc/incremental/const-enums-aliased.js index 7662b91b6d..2ffc4ff712 100644 --- a/testdata/baselines/reference/tsc/incremental/const-enums-aliased.js +++ b/testdata/baselines/reference/tsc/incremental/const-enums-aliased.js @@ -50,10 +50,18 @@ Object.defineProperty(exports, "__esModule", { value: true }); let a = c_1.A.ONE; //// [/home/src/workspaces/project/a.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"ea072a4c56b3b914bbdded014050bb9b-export const enum AWorker {\n ONE = 1\n}\nexport { AWorker as A };","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"ea072a4c56b3b914bbdded014050bb9b-export const enum AWorker {\n ONE = 1\n}\nexport { AWorker as A };","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 4 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./b.d.ts", @@ -111,7 +119,7 @@ let a = c_1.A.ONE; "./b.d.ts" ] }, - "size": 1252 + "size": 1263 } //// [/home/src/workspaces/project/c.js] *new* "use strict"; @@ -139,10 +147,18 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"ec710e331e7d6432e994b69e21aae83c-export const enum AWorker {\n ONE = 2\n}\nexport { AWorker as A };",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},{"version":"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"ec710e331e7d6432e994b69e21aae83c-export const enum AWorker {\n ONE = 2\n}\nexport { AWorker as A };",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},{"version":"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 4 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./b.d.ts", @@ -210,7 +226,7 @@ Output:: "./b.d.ts" ] }, - "size": 1471 + "size": 1482 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -236,10 +252,18 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"a65f34f1792fbedf7b83c3bf4a12fc1d-export const enum AWorker {\n ONE = 3\n}\nexport { AWorker as A };",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"a65f34f1792fbedf7b83c3bf4a12fc1d-export const enum AWorker {\n ONE = 3\n}\nexport { AWorker as A };",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 4 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./b.d.ts", @@ -302,7 +326,7 @@ Output:: "./b.d.ts" ] }, - "size": 1377 + "size": 1388 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -328,10 +352,18 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"842b68cd3ee2dcec7d1df8517668c731-export const enum AWorker {\n ONE = 3\n}\nexport { AWorker as A };export const randomThing = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"842b68cd3ee2dcec7d1df8517668c731-export const enum AWorker {\n ONE = 3\n}\nexport { AWorker as A };export const randomThing = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 4 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./b.d.ts", @@ -394,7 +426,7 @@ Output:: "./b.d.ts" ] }, - "size": 1407 + "size": 1418 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -420,10 +452,18 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"2e80eb5c14425cedaabae48745225bc6-export const enum AWorker {\n ONE = 3\n}\nexport { AWorker as A };export const randomThing = 10;export const randomThing2 = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"2e80eb5c14425cedaabae48745225bc6-export const enum AWorker {\n ONE = 3\n}\nexport { AWorker as A };export const randomThing = 10;export const randomThing2 = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 4 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./b.d.ts", @@ -486,7 +526,7 @@ Output:: "./b.d.ts" ] }, - "size": 1438 + "size": 1449 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* diff --git a/testdata/baselines/reference/tsc/incremental/const-enums.js b/testdata/baselines/reference/tsc/incremental/const-enums.js index 9f061638fb..5cd7b8227f 100644 --- a/testdata/baselines/reference/tsc/incremental/const-enums.js +++ b/testdata/baselines/reference/tsc/incremental/const-enums.js @@ -49,10 +49,18 @@ Object.defineProperty(exports, "__esModule", { value: true }); let a = c_1.A.ONE; //// [/home/src/workspaces/project/a.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"53c5c35ee54571b647e3f723569d09cf-export const enum A {\n ONE = 1\n}","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"53c5c35ee54571b647e3f723569d09cf-export const enum A {\n ONE = 1\n}","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 4 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./b.d.ts", @@ -110,7 +118,7 @@ let a = c_1.A.ONE; "./b.d.ts" ] }, - "size": 1220 + "size": 1231 } //// [/home/src/workspaces/project/c.js] *new* "use strict"; @@ -137,10 +145,18 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"d04ca273da9def3b63557363c6eae3ca-export const enum A {\n ONE = 2\n}",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},{"version":"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"d04ca273da9def3b63557363c6eae3ca-export const enum A {\n ONE = 2\n}",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},{"version":"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 4 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./b.d.ts", @@ -208,7 +224,7 @@ Output:: "./b.d.ts" ] }, - "size": 1439 + "size": 1450 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -233,10 +249,18 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"097e7efa854e788c6281c17b46d9460a-export const enum A {\n ONE = 3\n}",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"097e7efa854e788c6281c17b46d9460a-export const enum A {\n ONE = 3\n}",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 4 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./b.d.ts", @@ -299,7 +323,7 @@ Output:: "./b.d.ts" ] }, - "size": 1345 + "size": 1356 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -324,10 +348,18 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"40d09f9f7c0089340619c57a80ff0ab1-export const enum A {\n ONE = 3\n}export const randomThing = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"40d09f9f7c0089340619c57a80ff0ab1-export const enum A {\n ONE = 3\n}export const randomThing = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 4 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./b.d.ts", @@ -390,7 +422,7 @@ Output:: "./b.d.ts" ] }, - "size": 1375 + "size": 1386 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -415,10 +447,18 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"ee6472d5ac80e48bb4cea44493dd5fe8-export const enum A {\n ONE = 3\n}export const randomThing = 10;export const randomThing2 = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./b.d.ts","./c.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},"ee6472d5ac80e48bb4cea44493dd5fe8-export const enum A {\n ONE = 3\n}export const randomThing = 10;export const randomThing2 = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts" + ], + "original": 4 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./b.d.ts", @@ -481,7 +521,7 @@ Output:: "./b.d.ts" ] }, - "size": 1406 + "size": 1417 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* diff --git a/testdata/baselines/reference/tsc/incremental/generates-typerefs-correctly.js b/testdata/baselines/reference/tsc/incremental/generates-typerefs-correctly.js index 14455aa710..c35885a73e 100644 --- a/testdata/baselines/reference/tsc/incremental/generates-typerefs-correctly.js +++ b/testdata/baselines/reference/tsc/incremental/generates-typerefs-correctly.js @@ -112,10 +112,23 @@ export type Wrap = { Object.defineProperty(exports, "__esModule", { value: true }); //// [/home/src/workspaces/project/outDir/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../../tslibs/TS/Lib/lib.d.ts","../src/box.ts","../src/wrap.ts","../src/bug.js"],"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":"1cd060b4cfa55ea2a47d197d9f36eb29-export interface Box {\n unbox(): T\n}","signature":"ccd603d89ad1b8ff239d77bc32963c82-export interface Box {\n unbox(): T;\n}\n","impliedNodeFormat":1},{"version":"1bc7a2cd8efebbc7d3a335f2e15093fd-export type Wrap = {\n [K in keyof C]: { wrapped: C[K] }\n}","signature":"78de3c807d49489120ea1f77c5bb07aa-export type Wrap = {\n [K in keyof C]: {\n wrapped: C[K];\n };\n};\n","impliedNodeFormat":1},{"version":"b4e9b31d9609a8709f2fc33522d84448-import * as B from \"./box.js\"\nimport * as W from \"./wrap.js\"\n\n/**\n * @template {object} C\n * @param {C} source\n * @returns {W.Wrap}\n */\nconst wrap = source => {\nthrow source\n}\n\n/**\n * @returns {B.Box}\n */\nconst box = (n = 0) => ({ unbox: () => n })\n\nexport const bug = wrap({ n: box(1) });","signature":"7c385e40e65a179131e0621fad086d2a-import * as B from \"./box.js\";\nimport * as W from \"./wrap.js\";\nexport declare const bug: W.Wrap<{\n n: B.Box;\n}>;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"checkJs":true,"composite":true,"outDir":"./"},"referencedMap":[[4,1]],"latestChangedDtsFile":"./src/wrap.d.ts"} +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["../../../tslibs/TS/Lib/lib.d.ts","../src/box.ts","../src/wrap.ts","../src/bug.js"],"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":"1cd060b4cfa55ea2a47d197d9f36eb29-export interface Box {\n unbox(): T\n}","signature":"ccd603d89ad1b8ff239d77bc32963c82-export interface Box {\n unbox(): T;\n}\n","impliedNodeFormat":1},{"version":"1bc7a2cd8efebbc7d3a335f2e15093fd-export type Wrap = {\n [K in keyof C]: { wrapped: C[K] }\n}","signature":"78de3c807d49489120ea1f77c5bb07aa-export type Wrap = {\n [K in keyof C]: {\n wrapped: C[K];\n };\n};\n","impliedNodeFormat":1},{"version":"b4e9b31d9609a8709f2fc33522d84448-import * as B from \"./box.js\"\nimport * as W from \"./wrap.js\"\n\n/**\n * @template {object} C\n * @param {C} source\n * @returns {W.Wrap}\n */\nconst wrap = source => {\nthrow source\n}\n\n/**\n * @returns {B.Box}\n */\nconst box = (n = 0) => ({ unbox: () => n })\n\nexport const bug = wrap({ n: box(1) });","signature":"7c385e40e65a179131e0621fad086d2a-import * as B from \"./box.js\";\nimport * as W from \"./wrap.js\";\nexport declare const bug: W.Wrap<{\n n: B.Box;\n}>;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"checkJs":true,"composite":true,"outDir":"./"},"referencedMap":[[4,1]],"latestChangedDtsFile":"./src/bug.d.ts"} //// [/home/src/workspaces/project/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../src/box.ts", + "../src/wrap.ts", + "../src/bug.js" + ], + "original": [ + 2, + 4 + ] + } + ], "fileNames": [ "../../../tslibs/TS/Lib/lib.d.ts", "../src/box.ts", @@ -186,10 +199,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); "../src/wrap.ts" ] }, - "latestChangedDtsFile": "./src/wrap.d.ts", - "size": 2101 + "latestChangedDtsFile": "./src/bug.d.ts", + "size": 2115 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/src/box.ts @@ -255,10 +269,23 @@ exports.bug = wrap({ n: box(1) }); exports.something = 1; //// [/home/src/workspaces/project/outDir/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../../tslibs/TS/Lib/lib.d.ts","../src/box.ts","../src/wrap.ts","../src/bug.js"],"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":"1cd060b4cfa55ea2a47d197d9f36eb29-export interface Box {\n unbox(): T\n}","signature":"ccd603d89ad1b8ff239d77bc32963c82-export interface Box {\n unbox(): T;\n}\n","impliedNodeFormat":1},{"version":"1bc7a2cd8efebbc7d3a335f2e15093fd-export type Wrap = {\n [K in keyof C]: { wrapped: C[K] }\n}","signature":"78de3c807d49489120ea1f77c5bb07aa-export type Wrap = {\n [K in keyof C]: {\n wrapped: C[K];\n };\n};\n","impliedNodeFormat":1},{"version":"6eacf2e4d90c851011e8978446ec65d2-import * as B from \"./box.js\"\nimport * as W from \"./wrap.js\"\n\n/**\n * @template {object} C\n * @param {C} source\n * @returns {W.Wrap}\n */\nconst wrap = source => {\nthrow source\n}\n\n/**\n * @returns {B.Box}\n */\nconst box = (n = 0) => ({ unbox: () => n })\n\nexport const bug = wrap({ n: box(1) });export const something = 1;","signature":"d57e9c5bf62a61457d245408176c990e-import * as B from \"./box.js\";\nimport * as W from \"./wrap.js\";\nexport declare const bug: W.Wrap<{\n n: B.Box;\n}>;\nexport declare const something = 1;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"checkJs":true,"composite":true,"outDir":"./"},"referencedMap":[[4,1]],"latestChangedDtsFile":"./src/bug.d.ts"} +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["../../../tslibs/TS/Lib/lib.d.ts","../src/box.ts","../src/wrap.ts","../src/bug.js"],"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":"1cd060b4cfa55ea2a47d197d9f36eb29-export interface Box {\n unbox(): T\n}","signature":"ccd603d89ad1b8ff239d77bc32963c82-export interface Box {\n unbox(): T;\n}\n","impliedNodeFormat":1},{"version":"1bc7a2cd8efebbc7d3a335f2e15093fd-export type Wrap = {\n [K in keyof C]: { wrapped: C[K] }\n}","signature":"78de3c807d49489120ea1f77c5bb07aa-export type Wrap = {\n [K in keyof C]: {\n wrapped: C[K];\n };\n};\n","impliedNodeFormat":1},{"version":"6eacf2e4d90c851011e8978446ec65d2-import * as B from \"./box.js\"\nimport * as W from \"./wrap.js\"\n\n/**\n * @template {object} C\n * @param {C} source\n * @returns {W.Wrap}\n */\nconst wrap = source => {\nthrow source\n}\n\n/**\n * @returns {B.Box}\n */\nconst box = (n = 0) => ({ unbox: () => n })\n\nexport const bug = wrap({ n: box(1) });export const something = 1;","signature":"d57e9c5bf62a61457d245408176c990e-import * as B from \"./box.js\";\nimport * as W from \"./wrap.js\";\nexport declare const bug: W.Wrap<{\n n: B.Box;\n}>;\nexport declare const something = 1;\n","impliedNodeFormat":1}],"fileIdsList":[[2,3]],"options":{"checkJs":true,"composite":true,"outDir":"./"},"referencedMap":[[4,1]],"latestChangedDtsFile":"./src/bug.d.ts"} //// [/home/src/workspaces/project/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../src/box.ts", + "../src/wrap.ts", + "../src/bug.js" + ], + "original": [ + 2, + 4 + ] + } + ], "fileNames": [ "../../../tslibs/TS/Lib/lib.d.ts", "../src/box.ts", @@ -330,9 +357,10 @@ exports.something = 1; ] }, "latestChangedDtsFile": "./src/bug.d.ts", - "size": 2164 + "size": 2179 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/bug.js Signatures:: diff --git a/testdata/baselines/reference/tsc/incremental/option-changes-with-composite.js b/testdata/baselines/reference/tsc/incremental/option-changes-with-composite.js index 3a26a95b5e..65b8959aa7 100644 --- a/testdata/baselines/reference/tsc/incremental/option-changes-with-composite.js +++ b/testdata/baselines/reference/tsc/incremental/option-changes-with-composite.js @@ -83,10 +83,24 @@ const b_1 = require("./b"); exports.d = b_1.b; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -172,9 +186,10 @@ exports.d = b_1.b; ] }, "latestChangedDtsFile": "./d.d.ts", - "size": 1767 + "size": 1782 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/a.ts @@ -230,10 +245,24 @@ exports.d = b_1.b; //// [/home/src/workspaces/project/d.js.map] *new* {"version":3,"file":"d.js","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":";;;AAAA,2BAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"sourceMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"sourceMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -320,9 +349,10 @@ exports.d = b_1.b; ] }, "latestChangedDtsFile": "./d.d.ts", - "size": 1784 + "size": 1799 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -361,10 +391,24 @@ const b_1 = require("./b"); exports.d = b_1.b; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -450,9 +494,10 @@ exports.d = b_1.b; ] }, "latestChangedDtsFile": "./d.d.ts", - "size": 1767 + "size": 1782 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -463,6 +508,7 @@ tsgo --declaration ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -473,6 +519,7 @@ tsgo ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -503,10 +550,24 @@ export declare const d = 10; //// [/home/src/workspaces/project/d.d.ts.map] *new* {"version":3,"file":"d.d.ts","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"declaration":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"declaration":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -594,9 +655,10 @@ export declare const d = 10; ] }, "latestChangedDtsFile": "./d.d.ts", - "size": 1808 + "size": 1823 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -619,10 +681,24 @@ export declare const c = 10; export declare const d = 10; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -708,9 +784,10 @@ export declare const d = 10; ] }, "latestChangedDtsFile": "./d.d.ts", - "size": 1767 + "size": 1782 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -721,6 +798,7 @@ tsgo --emitDeclarationOnly ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -731,6 +809,7 @@ tsgo ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -750,10 +829,24 @@ exports.a = 10; const aLocal = 100; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -839,9 +932,10 @@ const aLocal = 100; ] }, "latestChangedDtsFile": "./d.d.ts", - "size": 1768 + "size": 1783 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/workspaces/project/a.ts Signatures:: @@ -854,6 +948,7 @@ tsgo --declaration ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -892,10 +987,24 @@ const b_1 = require("./b"); exports.d = b_1.b; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"inlineSourceMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"inlineSourceMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -982,9 +1091,10 @@ exports.d = b_1.b; ] }, "latestChangedDtsFile": "./d.d.ts", - "size": 1791 + "size": 1806 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -1028,10 +1138,24 @@ exports.d = b_1.b; //# sourceMappingURL=d.js.map //// [/home/src/workspaces/project/d.js.map] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"sourceMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"sourceMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -1118,9 +1242,10 @@ exports.d = b_1.b; ] }, "latestChangedDtsFile": "./d.d.ts", - "size": 1785 + "size": 1800 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -1181,10 +1306,24 @@ const b_1 = require("./b"); exports.d = b_1.b; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -1271,9 +1410,10 @@ exports.d = b_1.b; ] }, "latestChangedDtsFile": "./d.d.ts", - "size": 1790 + "size": 1805 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -1316,10 +1456,24 @@ exports.d = b_1.b; //# sourceMappingURL=d.js.map //// [/home/src/workspaces/project/d.js.map] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"declarationMap":true,"sourceMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"composite":true,"declarationMap":true,"sourceMap":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./d.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -1407,8 +1561,9 @@ exports.d = b_1.b; ] }, "latestChangedDtsFile": "./d.d.ts", - "size": 1807 + "size": 1822 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: diff --git a/testdata/baselines/reference/tsc/incremental/option-changes-with-incremental.js b/testdata/baselines/reference/tsc/incremental/option-changes-with-incremental.js index 41459d5bb8..a24985f5cd 100644 --- a/testdata/baselines/reference/tsc/incremental/option-changes-with-incremental.js +++ b/testdata/baselines/reference/tsc/incremental/option-changes-with-incremental.js @@ -71,10 +71,24 @@ const b_1 = require("./b"); exports.d = b_1.b; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;"],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]]} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;"],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -136,9 +150,10 @@ exports.d = b_1.b; "./b.ts" ] }, - "size": 1256 + "size": 1271 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/a.ts @@ -190,10 +205,24 @@ exports.d = b_1.b; //// [/home/src/workspaces/project/d.js.map] *new* {"version":3,"file":"d.js","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":";;;AAAA,2BAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;"],"fileIdsList":[[2],[3]],"options":{"sourceMap":true},"referencedMap":[[4,1],[5,2]]} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;"],"fileIdsList":[[2],[3]],"options":{"sourceMap":true},"referencedMap":[[4,1],[5,2]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -258,9 +287,10 @@ exports.d = b_1.b; "./b.ts" ] }, - "size": 1285 + "size": 1300 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -299,10 +329,24 @@ const b_1 = require("./b"); exports.d = b_1.b; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;"],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]]} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;"],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -364,9 +408,10 @@ exports.d = b_1.b; "./b.ts" ] }, - "size": 1256 + "size": 1271 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -389,10 +434,24 @@ export declare const c = 10; export declare const d = 10; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true},"referencedMap":[[4,1],[5,2]]} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true},"referencedMap":[[4,1],[5,2]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -477,9 +536,10 @@ export declare const d = 10; "./b.ts" ] }, - "size": 1735 + "size": 1750 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: (stored at emit) /home/src/workspaces/project/a.ts @@ -514,10 +574,24 @@ export declare const d = 10; //// [/home/src/workspaces/project/d.d.ts.map] *new* {"version":3,"file":"d.d.ts","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]]} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"6f850043fadb2d6b35e16ae1adaad5a5-export const a = 10;const aLocal = 10;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -603,9 +677,10 @@ export declare const d = 10; "./b.ts" ] }, - "size": 1757 + "size": 1772 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -616,6 +691,7 @@ tsgo ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -635,10 +711,24 @@ exports.a = 10; const aLocal = 100; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]]} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -720,9 +810,10 @@ const aLocal = 100; "./b.ts" ] }, - "size": 1705 + "size": 1720 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/workspaces/project/a.ts Signatures:: @@ -743,10 +834,24 @@ Output:: //// [/home/src/workspaces/project/d.d.ts] *rewrite with same content* //// [/home/src/workspaces/project/d.d.ts.map] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]]} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -832,9 +937,10 @@ Output:: "./b.ts" ] }, - "size": 1758 + "size": 1773 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -845,6 +951,7 @@ tsgo ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -883,10 +990,24 @@ const b_1 = require("./b"); exports.d = b_1.b; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"inlineSourceMap":true},"referencedMap":[[4,1],[5,2]]} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"inlineSourceMap":true},"referencedMap":[[4,1],[5,2]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -971,9 +1092,10 @@ exports.d = b_1.b; "./b.ts" ] }, - "size": 1740 + "size": 1755 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -1017,10 +1139,24 @@ exports.d = b_1.b; //# sourceMappingURL=d.js.map //// [/home/src/workspaces/project/d.js.map] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"sourceMap":true},"referencedMap":[[4,1],[5,2]]} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"sourceMap":true},"referencedMap":[[4,1],[5,2]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -1105,9 +1241,10 @@ exports.d = b_1.b; "./b.ts" ] }, - "size": 1734 + "size": 1749 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -1146,10 +1283,24 @@ const b_1 = require("./b"); exports.d = b_1.b; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]]} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -1231,9 +1382,10 @@ exports.d = b_1.b; "./b.ts" ] }, - "size": 1705 + "size": 1720 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -1252,10 +1404,24 @@ Output:: //// [/home/src/workspaces/project/d.d.ts] *rewrite with same content* //// [/home/src/workspaces/project/d.d.ts.map] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]]} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"c74d6b68e2cb0ed4cb8c18e3879119d9-export const a = 10;const aLocal = 100;","signature":"5d46ba05302682a2bc47daa29368141f-export declare const a = 10;\n","impliedNodeFormat":1},{"version":"bf1b9c3562b043596607d537fbaf9814-export const b = 10;const bLocal = 10;","signature":"eaed5dafb4668e1b7c86b65b584b776a-export declare const b = 10;\n","impliedNodeFormat":1},{"version":"28822e22fad7308e03af07d91b210c8f-import { a } from \"./a\";export const c = a;","signature":"6bc89426f721fe78f6ac43d3e4d9058f-export declare const c = 10;\n","impliedNodeFormat":1},{"version":"b392c90ba2c0413defc12f6bbf323140-import { b } from \"./b\";export const d = b;","signature":"3624f737ffc30774e872b3f5a7340537-export declare const d = 10;\n","impliedNodeFormat":1}],"fileIdsList":[[2],[3]],"options":{"declaration":true,"declarationMap":true},"referencedMap":[[4,1],[5,2]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./a.ts", @@ -1341,9 +1507,10 @@ Output:: "./b.ts" ] }, - "size": 1758 + "size": 1773 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -1354,5 +1521,6 @@ tsgo --declaration --declarationMap ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: diff --git a/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash-under---strict.js b/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash-under---strict.js index 3275bf22b9..bd8ef76014 100644 --- a/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash-under---strict.js +++ b/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash-under---strict.js @@ -70,10 +70,18 @@ const App = () => jsx_runtime_1.jsx("div", { propA: true }); exports.App = App; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/index.tsx","./node_modules/@types/react/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},"0c3575e38f9aabc971cea9c73a211979-export const App = () =>
;",{"version":"a6afc3c631ce6ad7bc83db84287b52ea-export {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"jsx":4,"jsxImportSource":"react","module":1,"strict":true},"semanticDiagnosticsPerFile":[[2,[{"pos":25,"end":49,"code":7016,"category":1,"message":"Could not find a declaration file for module 'react/jsx-runtime'. '/home/src/workspaces/project/node_modules/react/jsx-runtime.js' implicitly has an 'any' type."}]]]} +{"version":"FakeTSVersion","root":[2],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/index.tsx","./node_modules/@types/react/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},"0c3575e38f9aabc971cea9c73a211979-export const App = () =>
;",{"version":"a6afc3c631ce6ad7bc83db84287b52ea-export {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"jsx":4,"jsxImportSource":"react","module":1,"strict":true},"semanticDiagnosticsPerFile":[[2,[{"pos":25,"end":49,"code":7016,"category":1,"message":"Could not find a declaration file for module 'react/jsx-runtime'. '/home/src/workspaces/project/node_modules/react/jsx-runtime.js' implicitly has an 'any' type."}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/index.tsx" + ], + "original": 2 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./src/index.tsx", @@ -131,9 +139,10 @@ exports.App = App; ] ] ], - "size": 1632 + "size": 1643 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/src/index.tsx diff --git a/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash.js b/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash.js index b112652289..6ed0e0bb57 100644 --- a/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash.js +++ b/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash.js @@ -62,10 +62,18 @@ const App = () => jsx_runtime_1.jsx("div", { propA: true }); exports.App = App; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/index.tsx","./node_modules/@types/react/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},"0c3575e38f9aabc971cea9c73a211979-export const App = () =>
;",{"version":"a6afc3c631ce6ad7bc83db84287b52ea-export {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"jsx":4,"jsxImportSource":"react","module":1}} +{"version":"FakeTSVersion","root":[2],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/index.tsx","./node_modules/@types/react/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},"0c3575e38f9aabc971cea9c73a211979-export const App = () =>
;",{"version":"a6afc3c631ce6ad7bc83db84287b52ea-export {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"jsx":4,"jsxImportSource":"react","module":1}} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/index.tsx" + ], + "original": 2 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./src/index.tsx", @@ -108,9 +116,10 @@ exports.App = App; "jsxImportSource": "react", "module": 1 }, - "size": 1363 + "size": 1374 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/src/index.tsx diff --git a/testdata/baselines/reference/tsc/incremental/serializing-composite-project.js b/testdata/baselines/reference/tsc/incremental/serializing-composite-project.js index efc147feb9..f885cf56cb 100644 --- a/testdata/baselines/reference/tsc/incremental/serializing-composite-project.js +++ b/testdata/baselines/reference/tsc/incremental/serializing-composite-project.js @@ -53,10 +53,22 @@ export declare const b = 2; export const b = 2; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./index.tsx","./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":"f5c8fff6e1fca35f4a292d48868d4086-export const a = 1;","signature":"67cd7ccc14045107336f34154f76a8ca-export declare const a = 1;\n","impliedNodeFormat":1},{"version":"a8da94c0a8fada72e123de05c6818d3a-export const b = 2;","signature":"e1d275f86bf4a4a1f6fd0e8d8709f902-export declare const b = 2;\n","impliedNodeFormat":1}],"options":{"composite":true,"module":99,"strict":true},"latestChangedDtsFile":"./other.d.ts"} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./index.tsx","./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":"f5c8fff6e1fca35f4a292d48868d4086-export const a = 1;","signature":"67cd7ccc14045107336f34154f76a8ca-export declare const a = 1;\n","impliedNodeFormat":1},{"version":"a8da94c0a8fada72e123de05c6818d3a-export const b = 2;","signature":"e1d275f86bf4a4a1f6fd0e8d8709f902-export declare const b = 2;\n","impliedNodeFormat":1}],"options":{"composite":true,"module":99,"strict":true},"latestChangedDtsFile":"./other.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.tsx", + "./other.ts" + ], + "original": [ + 2, + 3 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./index.tsx", @@ -104,9 +116,10 @@ export const b = 2; "strict": true }, "latestChangedDtsFile": "./other.d.ts", - "size": 1308 + "size": 1323 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/index.tsx diff --git a/testdata/baselines/reference/tsc/incremental/serializing-error-chain.js b/testdata/baselines/reference/tsc/incremental/serializing-error-chain.js index 8af8151dfb..9073ab6888 100644 --- a/testdata/baselines/reference/tsc/incremental/serializing-error-chain.js +++ b/testdata/baselines/reference/tsc/incremental/serializing-error-chain.js @@ -71,10 +71,18 @@ declare const console: { log(msg: any): void; }; (React.createElement(Component, null, React.createElement("div", null), React.createElement("div", null))); //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./index.tsx"],"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":"8ca521424834f2ae3377cc3ccc9dd3ef-declare namespace JSX {\n interface ElementChildrenAttribute { children: {}; }\n interface IntrinsicElements { div: {} }\n}\n\ndeclare var React: any;\n\ndeclare function Component(props: never): any;\ndeclare function Component(props: { children?: number }): any;\n(\n
\n
\n)","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"jsx":3,"module":99,"strict":true},"semanticDiagnosticsPerFile":[[2,[{"pos":265,"end":274,"code":2769,"category":1,"message":"No overload matches this call.","messageChain":[{"pos":265,"end":274,"code":2770,"category":1,"message":"The last overload gave the following error.","messageChain":[{"pos":265,"end":274,"code":2322,"category":1,"message":"Type '{ children: any[]; }' is not assignable to type '{ children?: number | undefined; }'.","messageChain":[{"pos":265,"end":274,"code":2326,"category":1,"message":"Types of property 'children' are incompatible.","messageChain":[{"pos":265,"end":274,"code":2322,"category":1,"message":"Type 'any[]' is not assignable to type 'number'."}]}]}]}],"relatedInformation":[{"pos":217,"end":226,"code":2771,"category":1,"message":"The last overload is declared here."}]}]]]} +{"version":"FakeTSVersion","root":[2],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./index.tsx"],"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":"8ca521424834f2ae3377cc3ccc9dd3ef-declare namespace JSX {\n interface ElementChildrenAttribute { children: {}; }\n interface IntrinsicElements { div: {} }\n}\n\ndeclare var React: any;\n\ndeclare function Component(props: never): any;\ndeclare function Component(props: { children?: number }): any;\n(\n
\n
\n)","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"jsx":3,"module":99,"strict":true},"semanticDiagnosticsPerFile":[[2,[{"pos":265,"end":274,"code":2769,"category":1,"message":"No overload matches this call.","messageChain":[{"pos":265,"end":274,"code":2770,"category":1,"message":"The last overload gave the following error.","messageChain":[{"pos":265,"end":274,"code":2322,"category":1,"message":"Type '{ children: any[]; }' is not assignable to type '{ children?: number | undefined; }'.","messageChain":[{"pos":265,"end":274,"code":2326,"category":1,"message":"Types of property 'children' are incompatible.","messageChain":[{"pos":265,"end":274,"code":2322,"category":1,"message":"Type 'any[]' is not assignable to type 'number'."}]}]}]}],"relatedInformation":[{"pos":217,"end":226,"code":2771,"category":1,"message":"The last overload is declared here."}]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./index.tsx" + ], + "original": 2 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./index.tsx" @@ -169,9 +177,10 @@ declare const console: { log(msg: any): void; }; ] ] ], - "size": 2118 + "size": 2129 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/index.tsx @@ -200,5 +209,6 @@ Output:: Found 1 error in index.tsx:10 +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: diff --git a/testdata/baselines/reference/tsc/incremental/tsbuildinfo-has-error.js b/testdata/baselines/reference/tsc/incremental/tsbuildinfo-has-error.js index 8541bb19ac..958b9f7f2a 100644 --- a/testdata/baselines/reference/tsc/incremental/tsbuildinfo-has-error.js +++ b/testdata/baselines/reference/tsc/incremental/tsbuildinfo-has-error.js @@ -41,10 +41,18 @@ exports.x = void 0; exports.x = 10; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/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;"]} +{"version":"FakeTSVersion","root":[2],"fileNames":["../../tslibs/TS/Lib/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;"]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./main.ts" + ], + "original": 2 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./main.ts" @@ -69,9 +77,10 @@ exports.x = 10; "impliedNodeFormat": "CommonJS" } ], - "size": 924 + "size": 935 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/main.ts @@ -80,16 +89,17 @@ Signatures:: Edit [0]:: tsbuildinfo written has error //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -Some random string{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/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;"]} +Some random string{"version":"FakeTSVersion","root":[2],"fileNames":["../../tslibs/TS/Lib/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;"]} tsgo -i ExitStatus:: Success Output:: //// [/home/src/workspaces/project/main.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/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;"]} +{"version":"FakeTSVersion","root":[2],"fileNames":["../../tslibs/TS/Lib/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;"]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content* +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/main.ts diff --git a/testdata/baselines/reference/tsc/incremental/when-file-is-deleted.js b/testdata/baselines/reference/tsc/incremental/when-file-is-deleted.js index d28af06b3c..d6a2a9802c 100644 --- a/testdata/baselines/reference/tsc/incremental/when-file-is-deleted.js +++ b/testdata/baselines/reference/tsc/incremental/when-file-is-deleted.js @@ -64,10 +64,22 @@ class D { exports.D = D; //// [/home/src/workspaces/project/outDir/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../../tslibs/TS/Lib/lib.d.ts","../file1.ts","../file2.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":"7f6c75bbefe8ea83642a1cbd9b5f4880-export class C { }","signature":"ee4318f4b13094e43c50242580268f60-export declare class C {\n}\n","impliedNodeFormat":1},{"version":"f7d221ab360f516a6280e3b725f4cd31-export class D { }","signature":"d80eb8b520c91b72da4146d2d8059990-export declare class D {\n}\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./file2.d.ts"} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../../tslibs/TS/Lib/lib.d.ts","../file1.ts","../file2.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":"7f6c75bbefe8ea83642a1cbd9b5f4880-export class C { }","signature":"ee4318f4b13094e43c50242580268f60-export declare class C {\n}\n","impliedNodeFormat":1},{"version":"f7d221ab360f516a6280e3b725f4cd31-export class D { }","signature":"d80eb8b520c91b72da4146d2d8059990-export declare class D {\n}\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./file2.d.ts"} //// [/home/src/workspaces/project/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../file1.ts", + "../file2.ts" + ], + "original": [ + 2, + 3 + ] + } + ], "fileNames": [ "../../../tslibs/TS/Lib/lib.d.ts", "../file1.ts", @@ -114,9 +126,10 @@ exports.D = D; "outDir": "./" }, "latestChangedDtsFile": "./file2.d.ts", - "size": 1299 + "size": 1314 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/file1.ts @@ -133,10 +146,18 @@ tsgo ExitStatus:: Success Output:: //// [/home/src/workspaces/project/outDir/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../../tslibs/TS/Lib/lib.d.ts","../file1.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":"7f6c75bbefe8ea83642a1cbd9b5f4880-export class C { }","signature":"ee4318f4b13094e43c50242580268f60-export declare class C {\n}\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./file2.d.ts"} +{"version":"FakeTSVersion","root":[2],"fileNames":["../../../tslibs/TS/Lib/lib.d.ts","../file1.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":"7f6c75bbefe8ea83642a1cbd9b5f4880-export class C { }","signature":"ee4318f4b13094e43c50242580268f60-export declare class C {\n}\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./file2.d.ts"} //// [/home/src/workspaces/project/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../file1.ts" + ], + "original": 2 + } + ], "fileNames": [ "../../../tslibs/TS/Lib/lib.d.ts", "../file1.ts" @@ -171,8 +192,9 @@ Output:: "outDir": "./" }, "latestChangedDtsFile": "./file2.d.ts", - "size": 1120 + "size": 1131 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: diff --git a/testdata/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js b/testdata/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js index 1f633b2957..d2216367aa 100644 --- a/testdata/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js +++ b/testdata/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js @@ -66,10 +66,23 @@ declare function main(): void; function main() { } //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/main.ts","./src/fileNotFound.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":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4e3124823e3ef0a7f1ce70b317b1e4c8-/// \n/// \nfunction main() { }","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts"} +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/main.ts","./src/fileNotFound.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":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4e3124823e3ef0a7f1ce70b317b1e4c8-/// \n/// \nfunction main() { }","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/filePresent.ts", + "./src/anotherFileWithSameReferenes.ts", + "./src/main.ts" + ], + "original": [ + 2, + 4 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./src/filePresent.ts", @@ -150,9 +163,10 @@ function main() { } ] }, "latestChangedDtsFile": "./src/main.d.ts", - "size": 1915 + "size": 1930 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/src/filePresent.ts @@ -170,6 +184,7 @@ tsgo ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -190,10 +205,23 @@ function main() { } something(); //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/main.ts","./src/fileNotFound.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":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9ece2abeadfdd790ae17f754892e8402-/// \n/// \nfunction main() { }something();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts"} +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/main.ts","./src/fileNotFound.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":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9ece2abeadfdd790ae17f754892e8402-/// \n/// \nfunction main() { }something();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/filePresent.ts", + "./src/anotherFileWithSameReferenes.ts", + "./src/main.ts" + ], + "original": [ + 2, + 4 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./src/filePresent.ts", @@ -274,9 +302,10 @@ something(); ] }, "latestChangedDtsFile": "./src/main.d.ts", - "size": 1927 + "size": 1942 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/main.ts Signatures:: @@ -300,10 +329,23 @@ something(); something(); //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/main.ts","./src/fileNotFound.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":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1077a6c3f5daec777c602b0aac3793b9-/// \n/// \nfunction main() { }something();something();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts"} +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/main.ts","./src/fileNotFound.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":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1077a6c3f5daec777c602b0aac3793b9-/// \n/// \nfunction main() { }something();something();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/filePresent.ts", + "./src/anotherFileWithSameReferenes.ts", + "./src/main.ts" + ], + "original": [ + 2, + 4 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./src/filePresent.ts", @@ -384,9 +426,10 @@ something(); ] }, "latestChangedDtsFile": "./src/main.d.ts", - "size": 1939 + "size": 1954 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/main.ts Signatures:: @@ -421,10 +464,24 @@ declare function foo(): number; function foo() { return 20; } //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/newFile.ts","./src/main.ts","./src/fileNotFound.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":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"cf329dc888a898a1403ba3e35c2ec68e-function foo() { return 20; }","signature":"67af86f8c5b618332b620488f3be2c41-declare function foo(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bc6af6fddab57e87e44b7bf54d933e49-/// \n/// \n/// \nfunction main() { }something();something();foo();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,6],[2,4,6]],"options":{"composite":true},"referencedMap":[[3,1],[5,2]],"latestChangedDtsFile":"./src/newFile.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/newFile.ts","./src/main.ts","./src/fileNotFound.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":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"cf329dc888a898a1403ba3e35c2ec68e-function foo() { return 20; }","signature":"67af86f8c5b618332b620488f3be2c41-declare function foo(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bc6af6fddab57e87e44b7bf54d933e49-/// \n/// \n/// \nfunction main() { }something();something();foo();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,6],[2,4,6]],"options":{"composite":true},"referencedMap":[[3,1],[5,2]],"latestChangedDtsFile":"./src/newFile.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/filePresent.ts", + "./src/anotherFileWithSameReferenes.ts", + "./src/newFile.ts", + "./src/main.ts" + ], + "original": [ + 2, + 5 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./src/filePresent.ts", @@ -525,9 +582,10 @@ function foo() { return 20; } ] }, "latestChangedDtsFile": "./src/newFile.d.ts", - "size": 2221 + "size": 2236 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/src/newFile.ts @@ -553,10 +611,25 @@ function something2() { return 20; } //// [/home/src/workspaces/project/src/main.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/filePresent.ts","./src/fileNotFound.ts","./src/anotherFileWithSameReferenes.ts","./src/newFile.ts","./src/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},{"version":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d97745dab1d2c6dc05ce702bd0c7145d-function something2() { return 20; }","signature":"6bc942031a42ec462dd78d556924caf0-declare function something2(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"cf329dc888a898a1403ba3e35c2ec68e-function foo() { return 20; }","signature":"67af86f8c5b618332b620488f3be2c41-declare function foo(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bc6af6fddab57e87e44b7bf54d933e49-/// \n/// \n/// \nfunction main() { }something();something();foo();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,3],[2,3,5]],"options":{"composite":true},"referencedMap":[[4,1],[6,2]],"latestChangedDtsFile":"./src/fileNotFound.d.ts"} +{"version":"FakeTSVersion","root":[[2,6]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/filePresent.ts","./src/fileNotFound.ts","./src/anotherFileWithSameReferenes.ts","./src/newFile.ts","./src/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},{"version":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d97745dab1d2c6dc05ce702bd0c7145d-function something2() { return 20; }","signature":"6bc942031a42ec462dd78d556924caf0-declare function something2(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"cf329dc888a898a1403ba3e35c2ec68e-function foo() { return 20; }","signature":"67af86f8c5b618332b620488f3be2c41-declare function foo(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bc6af6fddab57e87e44b7bf54d933e49-/// \n/// \n/// \nfunction main() { }something();something();foo();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,3],[2,3,5]],"options":{"composite":true},"referencedMap":[[4,1],[6,2]],"latestChangedDtsFile":"./src/fileNotFound.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/filePresent.ts", + "./src/fileNotFound.ts", + "./src/anotherFileWithSameReferenes.ts", + "./src/newFile.ts", + "./src/main.ts" + ], + "original": [ + 2, + 6 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./src/filePresent.ts", @@ -670,9 +743,10 @@ function something2() { return 20; } ] }, "latestChangedDtsFile": "./src/fileNotFound.d.ts", - "size": 2446 + "size": 2461 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/src/fileNotFound.ts @@ -705,10 +779,25 @@ foo(); something(); //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/filePresent.ts","./src/fileNotFound.ts","./src/anotherFileWithSameReferenes.ts","./src/newFile.ts","./src/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},{"version":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d97745dab1d2c6dc05ce702bd0c7145d-function something2() { return 20; }","signature":"6bc942031a42ec462dd78d556924caf0-declare function something2(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"cf329dc888a898a1403ba3e35c2ec68e-function foo() { return 20; }","signature":"67af86f8c5b618332b620488f3be2c41-declare function foo(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"789a4176bd8e2c5d9b0deb6839d8f298-/// \n/// \n/// \nfunction main() { }something();something();foo();something();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,3],[2,3,5]],"options":{"composite":true},"referencedMap":[[4,1],[6,2]],"latestChangedDtsFile":"./src/fileNotFound.d.ts"} +{"version":"FakeTSVersion","root":[[2,6]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/filePresent.ts","./src/fileNotFound.ts","./src/anotherFileWithSameReferenes.ts","./src/newFile.ts","./src/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},{"version":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d97745dab1d2c6dc05ce702bd0c7145d-function something2() { return 20; }","signature":"6bc942031a42ec462dd78d556924caf0-declare function something2(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"cf329dc888a898a1403ba3e35c2ec68e-function foo() { return 20; }","signature":"67af86f8c5b618332b620488f3be2c41-declare function foo(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"789a4176bd8e2c5d9b0deb6839d8f298-/// \n/// \n/// \nfunction main() { }something();something();foo();something();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,3],[2,3,5]],"options":{"composite":true},"referencedMap":[[4,1],[6,2]],"latestChangedDtsFile":"./src/fileNotFound.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/filePresent.ts", + "./src/fileNotFound.ts", + "./src/anotherFileWithSameReferenes.ts", + "./src/newFile.ts", + "./src/main.ts" + ], + "original": [ + 2, + 6 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./src/filePresent.ts", @@ -822,9 +911,10 @@ something(); ] }, "latestChangedDtsFile": "./src/fileNotFound.d.ts", - "size": 2458 + "size": 2473 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/main.ts Signatures:: diff --git a/testdata/baselines/reference/tsc/incremental/when-passing-filename-for-buildinfo-on-commandline.js b/testdata/baselines/reference/tsc/incremental/when-passing-filename-for-buildinfo-on-commandline.js index 11472a7f12..ee18671804 100644 --- a/testdata/baselines/reference/tsc/incremental/when-passing-filename-for-buildinfo-on-commandline.js +++ b/testdata/baselines/reference/tsc/incremental/when-passing-filename-for-buildinfo-on-commandline.js @@ -41,10 +41,18 @@ interface Symbol { } declare const console: { log(msg: any): void; }; //// [/home/src/workspaces/project/.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/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;"],"options":{"module":1,"target":1,"tsBuildInfoFile":"./.tsbuildinfo"}} +{"version":"FakeTSVersion","root":[2],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/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;"],"options":{"module":1,"target":1,"tsBuildInfoFile":"./.tsbuildinfo"}} //// [/home/src/workspaces/project/.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/main.ts" + ], + "original": 2 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./src/main.ts" @@ -74,7 +82,7 @@ declare const console: { log(msg: any): void; }; "target": 1, "tsBuildInfoFile": "./.tsbuildinfo" }, - "size": 997 + "size": 1008 } //// [/home/src/workspaces/project/src/main.js] *new* "use strict"; @@ -83,6 +91,7 @@ exports.x = void 0; exports.x = 10; +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/src/main.ts @@ -95,5 +104,6 @@ tsgo --incremental --tsBuildInfoFile .tsbuildinfo --explainFiles ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: diff --git a/testdata/baselines/reference/tsc/incremental/when-passing-rootDir-from-commandline.js b/testdata/baselines/reference/tsc/incremental/when-passing-rootDir-from-commandline.js index cbedfedbeb..db6c382df8 100644 --- a/testdata/baselines/reference/tsc/incremental/when-passing-rootDir-from-commandline.js +++ b/testdata/baselines/reference/tsc/incremental/when-passing-rootDir-from-commandline.js @@ -44,10 +44,18 @@ exports.x = void 0; exports.x = 10; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/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;"],"options":{"outDir":"./dist","rootDir":"./src"}} +{"version":"FakeTSVersion","root":[2],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/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;"],"options":{"outDir":"./dist","rootDir":"./src"}} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/main.ts" + ], + "original": 2 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./src/main.ts" @@ -76,9 +84,10 @@ exports.x = 10; "outDir": "./dist", "rootDir": "./src" }, - "size": 976 + "size": 987 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/src/main.ts @@ -91,5 +100,6 @@ tsgo --rootDir src ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: diff --git a/testdata/baselines/reference/tsc/incremental/when-passing-rootDir-is-in-the-tsconfig.js b/testdata/baselines/reference/tsc/incremental/when-passing-rootDir-is-in-the-tsconfig.js index 76bc7fe48a..1dff5f163b 100644 --- a/testdata/baselines/reference/tsc/incremental/when-passing-rootDir-is-in-the-tsconfig.js +++ b/testdata/baselines/reference/tsc/incremental/when-passing-rootDir-is-in-the-tsconfig.js @@ -45,10 +45,18 @@ exports.x = void 0; exports.x = 10; //// [/home/src/workspaces/project/dist/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../../tslibs/TS/Lib/lib.d.ts","../src/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;"],"options":{"outDir":"./","rootDir":".."}} +{"version":"FakeTSVersion","root":[2],"fileNames":["../../../tslibs/TS/Lib/lib.d.ts","../src/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;"],"options":{"outDir":"./","rootDir":".."}} //// [/home/src/workspaces/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../src/main.ts" + ], + "original": 2 + } + ], "fileNames": [ "../../../tslibs/TS/Lib/lib.d.ts", "../src/main.ts" @@ -77,9 +85,10 @@ exports.x = 10; "outDir": "./", "rootDir": ".." }, - "size": 973 + "size": 984 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/src/main.ts @@ -92,5 +101,6 @@ tsgo ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: diff --git a/testdata/baselines/reference/tsc/incremental/with-only-dts-files.js b/testdata/baselines/reference/tsc/incremental/with-only-dts-files.js index c92ff74d0c..2e323d7d2c 100644 --- a/testdata/baselines/reference/tsc/incremental/with-only-dts-files.js +++ b/testdata/baselines/reference/tsc/incremental/with-only-dts-files.js @@ -35,10 +35,22 @@ interface Symbol { } declare const console: { log(msg: any): void; }; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/another.d.ts","./src/main.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},"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;","28e8748a7acd58f4f59388926e914f86-export const x = 10;"]} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/another.d.ts","./src/main.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},"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;","28e8748a7acd58f4f59388926e914f86-export const x = 10;"]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/another.d.ts", + "./src/main.d.ts" + ], + "original": [ + 2, + 3 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./src/another.d.ts", @@ -70,9 +82,10 @@ declare const console: { log(msg: any): void; }; "impliedNodeFormat": "CommonJS" } ], - "size": 1007 + "size": 1022 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/src/another.d.ts @@ -86,6 +99,7 @@ tsgo --incremental ExitStatus:: Success Output:: +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -98,10 +112,22 @@ tsgo --incremental ExitStatus:: Success Output:: //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/another.d.ts","./src/main.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},"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;","111e3074fef4387af38d77ffef382bad-export const x = 10;export const xy = 100;"]} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./src/another.d.ts","./src/main.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},"4e905e76b648aae5f92e8bd5418e19b3-export const y = 10;","111e3074fef4387af38d77ffef382bad-export const x = 10;export const xy = 100;"]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./src/another.d.ts", + "./src/main.d.ts" + ], + "original": [ + 2, + 3 + ] + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./src/another.d.ts", @@ -133,9 +159,10 @@ Output:: "impliedNodeFormat": "CommonJS" } ], - "size": 1029 + "size": 1044 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/main.d.ts Signatures:: diff --git a/testdata/baselines/reference/tsc/noEmit/when-project-has-strict-true.js b/testdata/baselines/reference/tsc/noEmit/when-project-has-strict-true.js index b4bf6e12b6..d3d3fafa54 100644 --- a/testdata/baselines/reference/tsc/noEmit/when-project-has-strict-true.js +++ b/testdata/baselines/reference/tsc/noEmit/when-project-has-strict-true.js @@ -38,10 +38,18 @@ interface Symbol { } declare const console: { log(msg: any): void; }; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../tslibs/TS/Lib/lib.d.ts","./class1.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},"ee12676c27db5c4cb0594b79ca02cbb0-export class class1 {}"],"options":{"strict":true},"affectedFilesPendingEmit":[2]} +{"version":"FakeTSVersion","root":[2],"fileNames":["../../tslibs/TS/Lib/lib.d.ts","./class1.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},"ee12676c27db5c4cb0594b79ca02cbb0-export class class1 {}"],"options":{"strict":true},"affectedFilesPendingEmit":[2]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./class1.ts" + ], + "original": 2 + } + ], "fileNames": [ "../../tslibs/TS/Lib/lib.d.ts", "./class1.ts" @@ -76,9 +84,10 @@ declare const console: { log(msg: any): void; }; 2 ] ], - "size": 985 + "size": 996 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/class1.ts diff --git a/testdata/baselines/reference/tsc/projectReferences/default-import-interop-uses-referenced-project-settings.js b/testdata/baselines/reference/tsc/projectReferences/default-import-interop-uses-referenced-project-settings.js index abc2590be1..6c55de0c02 100644 --- a/testdata/baselines/reference/tsc/projectReferences/default-import-interop-uses-referenced-project-settings.js +++ b/testdata/baselines/reference/tsc/projectReferences/default-import-interop-uses-referenced-project-settings.js @@ -58,6 +58,7 @@ Output:: app/src/index.ts(1,8): error TS2613: Module '"/home/src/workspaces/project/app/src/local"' has no default export. Did you mean to use 'import { local } from "/home/src/workspaces/project/app/src/local"' instead? app/src/index.ts(2,8): error TS2613: Module '"/home/src/workspaces/project/node_modules/esm-package/index"' has no default export. Did you mean to use 'import { esm } from "/home/src/workspaces/project/node_modules/esm-package/index"' instead? + //// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* /// interface Boolean {} diff --git a/testdata/baselines/reference/tsc/projectReferences/importing-const-enum-from-referenced-project-with-preserveConstEnums-and-verbatimModuleSyntax.js b/testdata/baselines/reference/tsc/projectReferences/importing-const-enum-from-referenced-project-with-preserveConstEnums-and-verbatimModuleSyntax.js index 1bb030b983..9d78b51615 100644 --- a/testdata/baselines/reference/tsc/projectReferences/importing-const-enum-from-referenced-project-with-preserveConstEnums-and-verbatimModuleSyntax.js +++ b/testdata/baselines/reference/tsc/projectReferences/importing-const-enum-from-referenced-project-with-preserveConstEnums-and-verbatimModuleSyntax.js @@ -46,6 +46,7 @@ tsgo --p project --pretty false ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: project/index.ts(2,10): error TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled. + //// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* /// interface Boolean {} diff --git a/testdata/baselines/reference/tsc/projectReferences/rewriteRelativeImportExtensionsProjectReferences1.js b/testdata/baselines/reference/tsc/projectReferences/rewriteRelativeImportExtensionsProjectReferences1.js index b0b402f89e..b30f0e41f5 100644 --- a/testdata/baselines/reference/tsc/projectReferences/rewriteRelativeImportExtensionsProjectReferences1.js +++ b/testdata/baselines/reference/tsc/projectReferences/rewriteRelativeImportExtensionsProjectReferences1.js @@ -49,6 +49,7 @@ tsgo -p packages/main --pretty false ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: packages/main/src/index.ts(1,16): error TS2878: This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files. + //// [/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts] *Lib* /// interface Boolean {} diff --git a/testdata/baselines/reference/tsc/projectReferences/rewriteRelativeImportExtensionsProjectReferences2.js b/testdata/baselines/reference/tsc/projectReferences/rewriteRelativeImportExtensionsProjectReferences2.js index 1a007818af..1b78447cd4 100644 --- a/testdata/baselines/reference/tsc/projectReferences/rewriteRelativeImportExtensionsProjectReferences2.js +++ b/testdata/baselines/reference/tsc/projectReferences/rewriteRelativeImportExtensionsProjectReferences2.js @@ -34,7 +34,6 @@ import {} from "../compiler/parser.ts"; tsgo --p src/services --pretty false ExitStatus:: Success Output:: -No output //// [/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts] *Lib* /// interface Boolean {} @@ -66,10 +65,18 @@ export {}; Object.defineProperty(exports, "__esModule", { value: true }); //// [/home/src/workspaces/solution/dist/services/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../../../tslibs/TS/Lib/lib.esnext.full.d.ts","../compiler/parser.d.ts","../../src/services/services.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},"e7d000b03d217d92080c065ffa5ccd5e-export {};",{"version":"a59ae1ffa1209f5747a43f6a4028f563-import {} from \"../compiler/parser.ts\";","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"module":199,"outDir":"..","rewriteRelativeImportExtensions":true,"rootDir":"../../src"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./services.d.ts"} +{"version":"FakeTSVersion","root":[3],"fileNames":["../../../../tslibs/TS/Lib/lib.esnext.full.d.ts","../compiler/parser.d.ts","../../src/services/services.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},"e7d000b03d217d92080c065ffa5ccd5e-export {};",{"version":"a59ae1ffa1209f5747a43f6a4028f563-import {} from \"../compiler/parser.ts\";","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"module":199,"outDir":"..","rewriteRelativeImportExtensions":true,"rootDir":"../../src"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./services.d.ts"} //// [/home/src/workspaces/solution/dist/services/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../src/services/services.ts" + ], + "original": 3 + } + ], "fileNames": [ "../../../../tslibs/TS/Lib/lib.esnext.full.d.ts", "../compiler/parser.d.ts", @@ -124,9 +131,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); ] }, "latestChangedDtsFile": "./services.d.ts", - "size": 1352 + "size": 1363 } +/home/src/workspaces/solution/src/services/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts *refresh* /home/src/workspaces/solution/dist/compiler/parser.d.ts diff --git a/testdata/baselines/reference/tsc/projectReferences/rewriteRelativeImportExtensionsProjectReferences3.js b/testdata/baselines/reference/tsc/projectReferences/rewriteRelativeImportExtensionsProjectReferences3.js index 17d9348e13..6d4b421f32 100644 --- a/testdata/baselines/reference/tsc/projectReferences/rewriteRelativeImportExtensionsProjectReferences3.js +++ b/testdata/baselines/reference/tsc/projectReferences/rewriteRelativeImportExtensionsProjectReferences3.js @@ -38,7 +38,6 @@ import {} from "../compiler/parser.ts"; tsgo --p src/services --pretty false ExitStatus:: Success Output:: -No output //// [/home/src/tslibs/TS/Lib/lib.esnext.full.d.ts] *Lib* /// interface Boolean {} @@ -70,10 +69,18 @@ export {}; Object.defineProperty(exports, "__esModule", { value: true }); //// [/home/src/workspaces/solution/dist/services/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","fileNames":["../../../../tslibs/TS/Lib/lib.esnext.full.d.ts","../compiler/parser.d.ts","../../src/services/services.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},"e7d000b03d217d92080c065ffa5ccd5e-export {};",{"version":"a59ae1ffa1209f5747a43f6a4028f563-import {} from \"../compiler/parser.ts\";","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"module":199,"outDir":"./","rewriteRelativeImportExtensions":true,"rootDir":"../../src/services"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./services.d.ts"} +{"version":"FakeTSVersion","root":[3],"fileNames":["../../../../tslibs/TS/Lib/lib.esnext.full.d.ts","../compiler/parser.d.ts","../../src/services/services.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},"e7d000b03d217d92080c065ffa5ccd5e-export {};",{"version":"a59ae1ffa1209f5747a43f6a4028f563-import {} from \"../compiler/parser.ts\";","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"module":199,"outDir":"./","rewriteRelativeImportExtensions":true,"rootDir":"../../src/services"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./services.d.ts"} //// [/home/src/workspaces/solution/dist/services/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "root": [ + { + "files": [ + "../../src/services/services.ts" + ], + "original": 3 + } + ], "fileNames": [ "../../../../tslibs/TS/Lib/lib.esnext.full.d.ts", "../compiler/parser.d.ts", @@ -128,9 +135,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); ] }, "latestChangedDtsFile": "./services.d.ts", - "size": 1361 + "size": 1372 } +/home/src/workspaces/solution/src/services/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.esnext.full.d.ts *refresh* /home/src/workspaces/solution/dist/compiler/parser.d.ts diff --git a/testdata/baselines/reference/tsc/typeAcquisition/parse-tsconfig-with-typeAcquisition.js b/testdata/baselines/reference/tsc/typeAcquisition/parse-tsconfig-with-typeAcquisition.js index 33a17e206c..8ad5a1e72f 100644 --- a/testdata/baselines/reference/tsc/typeAcquisition/parse-tsconfig-with-typeAcquisition.js +++ b/testdata/baselines/reference/tsc/typeAcquisition/parse-tsconfig-with-typeAcquisition.js @@ -35,5 +35,6 @@ Found 1 error. "size": 85 } +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: diff --git a/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js b/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js index ce4e478f97..0c861b402a 100644 --- a/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js +++ b/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js @@ -6,7 +6,6 @@ tsgo -w --watchInterval 1000 ExitStatus:: DiagnosticsPresent_OutputsSkipped Output:: Version FakeTSVersion - tsc: The TypeScript Compiler - Version FakeTSVersion COMMON COMMANDS diff --git a/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option.js b/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option.js index fbff1dd2bb..267e262467 100644 --- a/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option.js +++ b/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option.js @@ -14,6 +14,8 @@ export const a = 1 tsgo -w --watchInterval 1000 ExitStatus:: Success Output:: +build starting at HH:MM:SS AM +build finished in d.ddds //// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* /// interface Boolean {} @@ -38,6 +40,7 @@ interface Symbol { } declare const console: { log(msg: any): void; }; +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/first.ts diff --git a/testdata/baselines/reference/tscWatch/commandLineWatch/watch-with-no-tsconfig.js b/testdata/baselines/reference/tscWatch/commandLineWatch/watch-with-no-tsconfig.js index fcf71f7645..522610da63 100644 --- a/testdata/baselines/reference/tscWatch/commandLineWatch/watch-with-no-tsconfig.js +++ b/testdata/baselines/reference/tscWatch/commandLineWatch/watch-with-no-tsconfig.js @@ -7,6 +7,8 @@ Input:: tsgo index.ts --watch ExitStatus:: Success Output:: +build starting at HH:MM:SS AM +build finished in d.ddds //// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* /// interface Boolean {} diff --git a/testdata/baselines/reference/tscWatch/commandLineWatch/watch-with-tsconfig-and-incremental.js b/testdata/baselines/reference/tscWatch/commandLineWatch/watch-with-tsconfig-and-incremental.js index 408993b951..43300d9544 100644 --- a/testdata/baselines/reference/tscWatch/commandLineWatch/watch-with-tsconfig-and-incremental.js +++ b/testdata/baselines/reference/tscWatch/commandLineWatch/watch-with-tsconfig-and-incremental.js @@ -9,6 +9,8 @@ Input:: tsgo --watch --incremental ExitStatus:: Success Output:: +build starting at HH:MM:SS AM +build finished in d.ddds //// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* /// interface Boolean {} @@ -35,6 +37,7 @@ declare const console: { log(msg: any): void; }; //// [/home/src/workspaces/project/index.js] *new* +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/index.ts diff --git a/testdata/baselines/reference/tscWatch/noEmit/dts-errors-without-dts-enabled.js b/testdata/baselines/reference/tscWatch/noEmit/dts-errors-without-dts-enabled.js index a426806d75..6ca284d992 100644 --- a/testdata/baselines/reference/tscWatch/noEmit/dts-errors-without-dts-enabled.js +++ b/testdata/baselines/reference/tscWatch/noEmit/dts-errors-without-dts-enabled.js @@ -13,6 +13,8 @@ const a = class { private p = 10; }; tsgo -w ExitStatus:: Success Output:: +build starting at HH:MM:SS AM +build finished in d.ddds //// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* /// interface Boolean {} @@ -37,6 +39,7 @@ interface Symbol { } declare const console: { log(msg: any): void; }; +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/a.ts @@ -49,7 +52,10 @@ const a = "hello"; Output:: +build starting at HH:MM:SS AM +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/a.ts @@ -67,10 +73,13 @@ Edit [1]:: emit after fixing error Output:: +build starting at HH:MM:SS AM +build finished in d.ddds //// [/home/src/workspaces/project/a.js] *new* const a = "hello"; +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -86,7 +95,10 @@ Edit [2]:: no emit run after fixing error Output:: +build starting at HH:MM:SS AM +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -97,7 +109,10 @@ const a = class { private p = 10; }; Output:: +build starting at HH:MM:SS AM +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/a.ts @@ -115,12 +130,15 @@ Edit [4]:: emit when error Output:: +build starting at HH:MM:SS AM +build finished in d.ddds //// [/home/src/workspaces/project/a.js] *modified* const a = class { p = 10; }; +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -136,6 +154,9 @@ Edit [5]:: no emit run when error Output:: +build starting at HH:MM:SS AM +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: diff --git a/testdata/baselines/reference/tscWatch/noEmit/dts-errors.js b/testdata/baselines/reference/tscWatch/noEmit/dts-errors.js index 633939b3e4..7388b60bfa 100644 --- a/testdata/baselines/reference/tscWatch/noEmit/dts-errors.js +++ b/testdata/baselines/reference/tscWatch/noEmit/dts-errors.js @@ -14,6 +14,7 @@ const a = class { private p = 10; }; tsgo -w ExitStatus:: Success Output:: +build starting at HH:MM:SS AM 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; }; @@ -26,6 +27,7 @@ Output:: Found 1 error in a.ts:1 +build finished in d.ddds //// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* /// interface Boolean {} @@ -50,6 +52,7 @@ interface Symbol { } declare const console: { log(msg: any): void; }; +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/a.ts @@ -62,7 +65,10 @@ const a = "hello"; Output:: +build starting at HH:MM:SS AM +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/a.ts @@ -80,6 +86,8 @@ Edit [1]:: emit after fixing error Output:: +build starting at HH:MM:SS AM +build finished in d.ddds //// [/home/src/workspaces/project/a.d.ts] *new* declare const a = "hello"; @@ -87,6 +95,7 @@ declare const a = "hello"; const a = "hello"; +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -102,7 +111,10 @@ Edit [2]:: no emit run after fixing error Output:: +build starting at HH:MM:SS AM +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -113,6 +125,7 @@ const a = class { private p = 10; }; Output:: +build starting at HH:MM:SS AM 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; }; @@ -125,7 +138,9 @@ Output:: Found 1 error in a.ts:1 +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/a.ts @@ -143,6 +158,7 @@ Edit [4]:: emit when error Output:: +build starting at HH:MM:SS AM 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; }; @@ -155,6 +171,7 @@ Output:: Found 1 error in a.ts:1 +build finished in d.ddds //// [/home/src/workspaces/project/a.d.ts] *modified* declare const a: { new (): { @@ -168,6 +185,7 @@ const a = class { }; +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -183,6 +201,7 @@ Edit [5]:: no emit run when error Output:: +build starting at HH:MM:SS AM 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; }; @@ -195,6 +214,8 @@ Output:: Found 1 error in a.ts:1 +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: diff --git a/testdata/baselines/reference/tscWatch/noEmit/semantic-errors.js b/testdata/baselines/reference/tscWatch/noEmit/semantic-errors.js index 931f63d408..bc1d0b39ac 100644 --- a/testdata/baselines/reference/tscWatch/noEmit/semantic-errors.js +++ b/testdata/baselines/reference/tscWatch/noEmit/semantic-errors.js @@ -13,6 +13,7 @@ const a: number = "hello" tsgo -w ExitStatus:: Success Output:: +build starting at HH:MM:SS AM a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. 1 const a: number = "hello" @@ -21,6 +22,7 @@ Output:: Found 1 error in a.ts:1 +build finished in d.ddds //// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* /// interface Boolean {} @@ -45,6 +47,7 @@ interface Symbol { } declare const console: { log(msg: any): void; }; +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/a.ts @@ -57,7 +60,10 @@ const a = "hello"; Output:: +build starting at HH:MM:SS AM +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/a.ts @@ -75,10 +81,13 @@ Edit [1]:: emit after fixing error Output:: +build starting at HH:MM:SS AM +build finished in d.ddds //// [/home/src/workspaces/project/a.js] *new* const a = "hello"; +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -94,7 +103,10 @@ Edit [2]:: no emit run after fixing error Output:: +build starting at HH:MM:SS AM +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -105,6 +117,7 @@ const a: number = "hello" Output:: +build starting at HH:MM:SS AM a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. 1 const a: number = "hello" @@ -113,7 +126,9 @@ Output:: Found 1 error in a.ts:1 +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/a.ts @@ -131,6 +146,7 @@ Edit [4]:: emit when error Output:: +build starting at HH:MM:SS AM a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. 1 const a: number = "hello" @@ -139,8 +155,10 @@ Output:: Found 1 error in a.ts:1 +build finished in d.ddds //// [/home/src/workspaces/project/a.js] *rewrite with same content* +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -156,6 +174,7 @@ Edit [5]:: no emit run when error Output:: +build starting at HH:MM:SS AM a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. 1 const a: number = "hello" @@ -164,6 +183,8 @@ Output:: Found 1 error in a.ts:1 +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: diff --git a/testdata/baselines/reference/tscWatch/noEmit/syntax-errors.js b/testdata/baselines/reference/tscWatch/noEmit/syntax-errors.js index ce5b5071b0..1939da8c14 100644 --- a/testdata/baselines/reference/tscWatch/noEmit/syntax-errors.js +++ b/testdata/baselines/reference/tscWatch/noEmit/syntax-errors.js @@ -13,6 +13,7 @@ const a = "hello tsgo -w ExitStatus:: Success Output:: +build starting at HH:MM:SS AM a.ts:1:17 - error TS1002: Unterminated string literal. 1 const a = "hello @@ -21,6 +22,7 @@ Output:: Found 1 error in a.ts:1 +build finished in d.ddds //// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* /// interface Boolean {} @@ -45,6 +47,7 @@ interface Symbol { } declare const console: { log(msg: any): void; }; +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *not cached* /home/src/tslibs/TS/Lib/lib.d.ts *not cached* /home/src/workspaces/project/a.ts @@ -57,7 +60,10 @@ const a = "hello"; Output:: +build starting at HH:MM:SS AM +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.d.ts *refresh* /home/src/workspaces/project/a.ts @@ -75,10 +81,13 @@ Edit [1]:: emit after fixing error Output:: +build starting at HH:MM:SS AM +build finished in d.ddds //// [/home/src/workspaces/project/a.js] *new* const a = "hello"; +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -94,7 +103,10 @@ Edit [2]:: no emit run after fixing error Output:: +build starting at HH:MM:SS AM +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: Signatures:: @@ -105,6 +117,7 @@ const a = "hello Output:: +build starting at HH:MM:SS AM a.ts:1:17 - error TS1002: Unterminated string literal. 1 const a = "hello @@ -113,7 +126,9 @@ Output:: Found 1 error in a.ts:1 +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *not cached* /home/src/workspaces/project/a.ts Signatures:: @@ -129,6 +144,7 @@ Edit [4]:: emit when error Output:: +build starting at HH:MM:SS AM a.ts:1:17 - error TS1002: Unterminated string literal. 1 const a = "hello @@ -137,10 +153,12 @@ Output:: Found 1 error in a.ts:1 +build finished in d.ddds //// [/home/src/workspaces/project/a.js] *modified* const a = "hello; +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *not cached* /home/src/workspaces/project/a.ts Signatures:: @@ -158,6 +176,7 @@ Edit [5]:: no emit run when error Output:: +build starting at HH:MM:SS AM a.ts:1:17 - error TS1002: Unterminated string literal. 1 const a = "hello @@ -166,7 +185,9 @@ Output:: Found 1 error in a.ts:1 +build finished in d.ddds +/home/src/workspaces/project/tsconfig.json:: SemanticDiagnostics:: *not cached* /home/src/workspaces/project/a.ts Signatures::