From 2e9190e2301a9b680631fac93d5392a13bc8c142 Mon Sep 17 00:00:00 2001
From: John Favret <64748847+johnfav03@users.noreply.github.com>
Date: Thu, 29 Oct 2026 12:46:06 -0500
Subject: [PATCH 1/3] track non-root inputs in non-incremental build info
---
tsc/internal/execute/build/buildtask.go | 15 ++++
tsc/internal/execute/incremental/buildInfo.go | 6 ++
.../incremental/buildinfo_path_test.go | 29 +++++++
.../incremental/snapshottobuildinfo.go | 14 ++++
.../tsctests/build_watch_dependencies_test.go | 76 +++++++++++++++++++
...erencingFileFromReferencedProject.baseline | 4 +-
.../tsbuild/clean/tsx-with-dts-emit.js | 4 +-
...y-false-on-commandline-with-declaration.js | 8 +-
...ionOnly-on-commandline-with-declaration.js | 8 +-
...nfig-json-can-be-imported-as-json-input.js | 4 +-
.../reports-dts-generation-errors.js | 4 +-
.../tsbuild/extends/configDir-template.js | 4 +-
.../deleted-file-without-composite.js | 8 +-
.../reverse-mapped-declaration-consumption.js | 4 +-
...iffers-between-projects-for-shared-file.js | 10 +--
...olution-from-d.ts-of-referenced-project.js | 4 +-
...project-correctly-with-preserveSymlinks.js | 4 +-
...-file-from-referenced-project-correctly.js | 4 +-
...ared-resolution-should-not-report-error.js | 4 +-
.../when-resolution-is-not-shared.js | 4 +-
.../reference/tsbuild/noCheck/dts-errors.js | 44 +++++------
.../tsbuild/noCheck/semantic-errors.js | 36 ++++-----
.../tsbuild/noCheck/syntax-errors.js | 44 +++++------
...-errors-with-declaration-enable-changes.js | 20 ++---
.../noEmit/dts-errors-without-dts-enabled.js | 4 +-
.../reference/tsbuild/noEmit/dts-errors.js | 12 +--
.../tsbuild/noEmit/semantic-errors.js | 12 +--
.../reference/tsbuild/noEmit/syntax-errors.js | 12 +--
.../dts-errors-with-declaration.js | 8 +-
.../tsbuild/noEmitOnError/dts-errors.js | 4 +-
.../semantic-errors-with-declaration.js | 8 +-
.../tsbuild/noEmitOnError/semantic-errors.js | 8 +-
.../syntax-errors-with-declaration.js | 8 +-
.../tsbuild/noEmitOnError/syntax-errors.js | 8 +-
.../when-rootDir-is-not-specified.js | 4 +-
...ied-but-not-all-files-belong-to-rootDir.js | 4 +-
.../outputPaths/when-rootDir-is-specified.js | 4 +-
...n-root-is-source-from-project-reference.js | 8 +-
...n-file-belongs-to-multiple-sub-projects.js | 4 +-
...iles-containing-json-file-non-composite.js | 4 +-
.../include-and-files-non-composite.js | 4 +-
...file-name-matches-ts-file-non-composite.js | 4 +-
...-along-with-other-include-non-composite.js | 4 +-
.../include-only-non-composite.js | 4 +-
...-with-json-not-in-rootDir-non-composite.js | 4 +-
...t-outside-configDirectory-non-composite.js | 4 +-
...clude-only-without-outDir-non-composite.js | 4 +-
.../sourcemap-non-composite.js | 4 +-
.../without-outDir-non-composite.js | 4 +-
...composite-or-doesnt-have-any-references.js | 4 +-
.../transitiveReferences/builds-correctly.js | 4 +-
...de-resolution-with-external-module-name.js | 4 +-
.../extends/configDir-template.js | 4 +-
...for-changes-to-package-json-main-fields.js | 12 +--
...de-watches-missing-package-json-lookups.js | 14 ++--
...ge-json-lookups-from-existing-buildinfo.js | 10 +--
...t-correctly-with-cts-and-mts-extensions.js | 20 ++---
...when-watching-when-no-files-are-emitted.js | 4 +-
.../noEmit/dts-errors-without-dts-enabled.js | 4 +-
.../tsbuildWatch/noEmit/dts-errors.js | 12 +--
.../tsbuildWatch/noEmit/semantic-errors.js | 12 +--
.../tsbuildWatch/noEmit/syntax-errors.js | 12 +--
.../noEmitOnError-with-declaration.js | 24 +++---
.../noEmitOnError/noEmitOnError.js | 16 ++--
...e-down-stream-project-and-then-fixes-it.js | 12 +--
...hen-noUnusedParameters-changes-to-false.js | 8 +-
.../works-with-extended-source-files.js | 8 +-
.../reexport/Reports-errors-correctly.js | 12 +--
.../reports-dts-generation-errors.js | 4 +-
69 files changed, 425 insertions(+), 285 deletions(-)
create mode 100644 tsc/internal/execute/tsctests/build_watch_dependencies_test.go
diff --git a/tsc/internal/execute/build/buildtask.go b/tsc/internal/execute/build/buildtask.go
index c31d37a094c69..f34592ec8c229 100644
--- a/tsc/internal/execute/build/buildtask.go
+++ b/tsc/internal/execute/build/buildtask.go
@@ -517,6 +517,18 @@ func (t *BuildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tsp
}
if !t.resolved.CompilerOptions().IsIncremental() {
+ for file := range buildInfo.GetNonIncrementalFileNames(getBuildInfoDirectory()) {
+ inputTime := orchestrator.host.GetMTime(file)
+ if inputTime.IsZero() {
+ return &upToDateStatus{kind: upToDateStatusTypeInputFileMissing, data: file}
+ }
+ if inputTime.After(newestInputFileAndTime.time) {
+ newestInputFileAndTime = fileAndTime{file, inputTime}
+ }
+ if inputTime.After(oldestOutputFileAndTime.time) {
+ return &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{file.AsPath(), buildInfoPath}}
+ }
+ }
// Check output file stamps
for outputFile := range t.resolved.GetOutputFileNames() {
outputTime := orchestrator.host.GetMTime(outputFile)
@@ -591,6 +603,9 @@ func (t *BuildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tsp
return extendedConfigStatus
}
}
+ if !t.resolved.CompilerOptions().IsIncremental() && buildInfo.NonIncrementalFileNames == nil {
+ return &upToDateStatus{kind: upToDateStatusTypeOutOfDateOptions, data: buildInfoPath}
+ }
for packageJson := range buildInfo.GetPackageJsons(getBuildInfoDirectory()) {
packageJsonTime := orchestrator.host.GetMTime(packageJson)
diff --git a/tsc/internal/execute/incremental/buildInfo.go b/tsc/internal/execute/incremental/buildInfo.go
index c0990ef457525..4cca63c6b1e7b 100644
--- a/tsc/internal/execute/incremental/buildInfo.go
+++ b/tsc/internal/execute/incremental/buildInfo.go
@@ -497,6 +497,8 @@ type BuildInfo struct {
// NonIncrementalProgram info
SemanticErrors bool `json:"semanticErrors,omitzero"`
+ // A nil inventory predates dependency tracking; an empty inventory is complete.
+ NonIncrementalFileNames []BuildInfoPath `json:"nonIncrementalFileNames,omitzero"`
}
func (b *BuildInfo) IsValidVersion() bool {
@@ -595,6 +597,10 @@ func (b *BuildInfo) GetMissingPackageJsons(buildInfoDirectory tspath.RootedDirec
return getBuildInfoFileNames(b.MissingPackageJsons, buildInfoDirectory)
}
+func (b *BuildInfo) GetNonIncrementalFileNames(buildInfoDirectory tspath.RootedDirectoryPath) iter.Seq[tspath.RootedFilePath] {
+ return getBuildInfoFileNames(b.NonIncrementalFileNames, buildInfoDirectory)
+}
+
func getBuildInfoFileNames(paths []BuildInfoPath, buildInfoDirectory tspath.RootedDirectoryPath) iter.Seq[tspath.RootedFilePath] {
return func(yield func(tspath.RootedFilePath) bool) {
for _, path := range paths {
diff --git a/tsc/internal/execute/incremental/buildinfo_path_test.go b/tsc/internal/execute/incremental/buildinfo_path_test.go
index b20bfd58b2c4b..976fc939402aa 100644
--- a/tsc/internal/execute/incremental/buildinfo_path_test.go
+++ b/tsc/internal/execute/incremental/buildinfo_path_test.go
@@ -446,3 +446,32 @@ func TestGlobalDeletionPreservesSkippedLibraryDiagnostics(t *testing.T) {
})
}
}
+
+func TestNonIncrementalBuildInfoDependenciesJSON(t *testing.T) {
+ t.Parallel()
+ info := &BuildInfo{
+ Root: []*BuildInfoRoot{{NonIncremental: "./root.ts"}},
+ NonIncrementalFileNames: []BuildInfoPath{"../shared/other.ts"},
+ }
+ data, err := json.Marshal(info)
+ assert.NilError(t, err)
+ assert.Equal(t, string(data), `{"root":["./root.ts"],"nonIncrementalFileNames":["../shared/other.ts"]}`)
+ var restored BuildInfo
+ assert.NilError(t, json.Unmarshal(data, &restored))
+ assert.DeepEqual(t, restored.NonIncrementalFileNames, info.NonIncrementalFileNames)
+ assert.Assert(t, !restored.IsIncremental())
+}
+
+func TestNonIncrementalBuildInfoEmptyInventory(t *testing.T) {
+ t.Parallel()
+ info := &BuildInfo{NonIncrementalFileNames: []BuildInfoPath{}}
+ data, err := json.Marshal(info)
+ assert.NilError(t, err)
+ assert.Equal(t, string(data), `{"nonIncrementalFileNames":[]}`)
+ var restored BuildInfo
+ assert.NilError(t, json.Unmarshal(data, &restored))
+ assert.Assert(t, restored.NonIncrementalFileNames != nil)
+ var legacy BuildInfo
+ assert.NilError(t, json.Unmarshal([]byte(`{}`), &legacy))
+ assert.Assert(t, legacy.NonIncrementalFileNames == nil)
+}
diff --git a/tsc/internal/execute/incremental/snapshottobuildinfo.go b/tsc/internal/execute/incremental/snapshottobuildinfo.go
index ee592a5ee505b..f4c9581e1fc9b 100644
--- a/tsc/internal/execute/incremental/snapshottobuildinfo.go
+++ b/tsc/internal/execute/incremental/snapshottobuildinfo.go
@@ -49,6 +49,20 @@ func snapshotToBuildInfo(snapshot *snapshot, program *compiler.Program, buildInf
}
} else {
to.setRootOfNonIncrementalProgram()
+ buildInfo.NonIncrementalFileNames = []BuildInfoPath{}
+ roots := collections.NewSetFromItems(core.Map(program.CommandLine().FileNames(), func(file tspath.RootedFilePath) tspath.PathKey {
+ return program.CaseSensitivity().PathKey(file.AsPath())
+ })...)
+ for _, file := range program.GetSourceFiles() {
+ if roots.Has(file.PathKey()) || !program.Host().FS().FileExists(file.FileName()) {
+ continue
+ }
+ if lib := program.GetDefaultLibFile(file.PathKey()); lib != nil && !lib.Replaced {
+ continue
+ }
+ buildInfo.NonIncrementalFileNames = append(buildInfo.NonIncrementalFileNames, to.serializedPathKeyRelativeToBuildInfo(file.PathKey()))
+ }
+ slices.Sort(buildInfo.NonIncrementalFileNames)
}
buildInfo.Errors = snapshot.hasErrors.IsTrue()
buildInfo.SemanticErrors = snapshot.hasSemanticErrors
diff --git a/tsc/internal/execute/tsctests/build_watch_dependencies_test.go b/tsc/internal/execute/tsctests/build_watch_dependencies_test.go
new file mode 100644
index 0000000000000..1b35f7bf7c0e8
--- /dev/null
+++ b/tsc/internal/execute/tsctests/build_watch_dependencies_test.go
@@ -0,0 +1,76 @@
+package tsctests
+
+import (
+ "fmt"
+ "strings"
+ "testing"
+
+ "github.com/microsoft/TypeScript/tsc/internal/execute"
+ "gotest.tools/v3/assert"
+)
+
+const (
+ dependencyProject = "/home/src/workspaces/project/"
+ dependencyShared = "/home/src/workspaces/shared/"
+)
+
+func dependencyFiles() FileMap {
+ return FileMap{
+ dependencyProject + "tsconfig.json": `{"compilerOptions":{"outDir":"out","rootDir":"..","module":"nodenext","target":"es2022"},"files":["index.ts"]}`,
+ dependencyProject + "package.json": `{"type":"module"}`,
+ dependencyProject + "index.ts": `import { value } from "./other.js"; export const result = value;`,
+ dependencyProject + "other.ts": `export const value = "before";`,
+ dependencyShared + "other.ts": `export const value = "before";`,
+ }
+}
+
+func checkDependencyOutput(t *testing.T, sys *TestSys, path, expected string) {
+ t.Helper()
+ output := sys.readFileNoError(path)
+ assert.Assert(t, strings.Contains(output, expected), "%s must contain %q:\n%s\nwatch output:\n%s", path, expected, output, sys.getOutput(false))
+}
+
+func TestBuildWatchDependenciesBeforeStartup(t *testing.T) {
+ t.Parallel()
+ sys := newTestSys(&tscInput{files: dependencyFiles(), cwd: "/home/src/workspaces/project"}, false)
+ result := execute.CommandLine(t.Context(), sys, []string{"--build"}, sys)
+ assert.Equal(t, int(result.Status), 0, "%s", sys.getOutput(false))
+ sys.writeFileNoError(dependencyProject+"other.ts", `export const value = "changed";`)
+ sys.clearOutput()
+ result = execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose"}, sys)
+ assert.Equal(t, int(result.Status), 0)
+ assert.Assert(t, result.Watcher != nil)
+ checkDependencyOutput(t, sys, dependencyProject+"out/project/other.js", `"changed"`)
+}
+
+func TestBuildDependencyBeforeRestart(t *testing.T) {
+ t.Parallel()
+ for _, watch := range []bool{false, true} {
+ for _, deleted := range []bool{false, true} {
+ t.Run(fmt.Sprintf("watch=%v/deleted=%v", watch, deleted), func(t *testing.T) {
+ t.Parallel()
+ sys := newTestSys(&tscInput{files: dependencyFiles(), cwd: strings.TrimSuffix(dependencyProject, "/")}, false)
+ result := execute.CommandLine(t.Context(), sys, []string{"--build"}, sys)
+ assert.Equal(t, int(result.Status), 0, "%s", sys.getOutput(false))
+ if deleted {
+ sys.removeNoError(dependencyProject + "other.ts")
+ } else {
+ sys.writeFileNoError(dependencyProject+"other.ts", `export const value = "restarted";`)
+ }
+ sys.clearOutput()
+ args := []string{"--build", "--verbose"}
+ if watch {
+ args = append(args, "--watch")
+ }
+ result = execute.CommandLine(t.Context(), sys, args, sys)
+ if deleted {
+ assert.Assert(t, int(result.Status) != 0)
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "Cannot find module"))
+ } else {
+ assert.Equal(t, int(result.Status), 0, "%s", sys.getOutput(false))
+ checkDependencyOutput(t, sys, dependencyProject+"out/project/other.js", `"restarted"`)
+ }
+ })
+ }
+ }
+}
diff --git a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsProjectWithOwnFilesReferencingFileFromReferencedProject.baseline b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsProjectWithOwnFilesReferencingFileFromReferencedProject.baseline
index 6ebd21371741c..e93ffd3fb0155 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsProjectWithOwnFilesReferencingFileFromReferencedProject.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsProjectWithOwnFilesReferencingFileFromReferencedProject.baseline
@@ -133,7 +133,7 @@ export { foo };
"references": [{ "path": "./tsconfig-src.json" }]
}
//// [/myproject/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./own/main.ts"]}
+{"version":"FakeTSVersion","root":["./own/main.ts"],"nonIncrementalFileNames":["./target/src/helpers/functions.d.ts","./target/src/main.d.ts"]}
//// [/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -145,7 +145,7 @@ export { foo };
"original": "./own/main.ts"
}
],
- "size": 52
+ "size": 143
}
diff --git a/tsc/testdata/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js b/tsc/testdata/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js
index a20c30dde6299..44f7e0af6ffa8 100644
--- a/tsc/testdata/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js
+++ b/tsc/testdata/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js
@@ -53,7 +53,7 @@ export declare const x = 10;
export const x = 10;
//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./src/main.tsx"]}
+{"version":"FakeTSVersion","root":["./src/main.tsx"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -65,7 +65,7 @@ export const x = 10;
"original": "./src/main.tsx"
}
],
- "size": 53
+ "size": 82
}
project/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration.js b/tsc/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration.js
index 8bfdfc3f9cafe..9533946332e22 100644
--- a/tsc/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration.js
+++ b/tsc/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration.js
@@ -84,7 +84,7 @@ export declare const c = 10;
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"]}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts","./d.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -114,7 +114,7 @@ export declare const d = 10;
"original": "./d.ts"
}
],
- "size": 72
+ "size": 101
}
//// [/home/src/workspaces/solution/project2/src/e.d.ts] *new*
export declare const e = 10;
@@ -126,7 +126,7 @@ export declare const f = 10;
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"]}
+{"version":"FakeTSVersion","errors":true,"root":["./e.ts","./f.ts","./g.ts"],"nonIncrementalFileNames":["../../project1/src/a.d.ts","../../project1/src/b.d.ts"]}
//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -151,7 +151,7 @@ export declare const g = 10;
"original": "./g.ts"
}
],
- "size": 77
+ "size": 161
}
project1/src/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration.js b/tsc/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration.js
index 26c75e4d1bc68..7de6393bfbf0c 100644
--- a/tsc/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration.js
+++ b/tsc/testdata/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration.js
@@ -84,7 +84,7 @@ export declare const c = 10;
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"]}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts","./d.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/solution/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -114,7 +114,7 @@ export declare const d = 10;
"original": "./d.ts"
}
],
- "size": 72
+ "size": 101
}
//// [/home/src/workspaces/solution/project2/src/e.d.ts] *new*
export declare const e = 10;
@@ -126,7 +126,7 @@ export declare const f = 10;
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"]}
+{"version":"FakeTSVersion","errors":true,"root":["./e.ts","./f.ts","./g.ts"],"nonIncrementalFileNames":["../../project1/src/a.d.ts","../../project1/src/b.d.ts"]}
//// [/home/src/workspaces/solution/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -151,7 +151,7 @@ export declare const g = 10;
"original": "./g.ts"
}
],
- "size": 77
+ "size": 161
}
project1/src/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/commandLine/included-tsconfig-json-can-be-imported-as-json-input.js b/tsc/testdata/baselines/reference/tsbuild/commandLine/included-tsconfig-json-can-be-imported-as-json-input.js
index fd18b4ad68459..3d8cceaf65f21 100644
--- a/tsc/testdata/baselines/reference/tsbuild/commandLine/included-tsconfig-json-can-be-imported-as-json-input.js
+++ b/tsc/testdata/baselines/reference/tsbuild/commandLine/included-tsconfig-json-can-be-imported-as-json-input.js
@@ -49,7 +49,7 @@ interface Symbol {
}
declare const console: { log(msg: any): void; };
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./index.ts","./tsconfig.json"]}
+{"version":"FakeTSVersion","root":["./index.ts","./tsconfig.json"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -67,7 +67,7 @@ declare const console: { log(msg: any): void; };
"original": "./tsconfig.json"
}
],
- "size": 67
+ "size": 96
}
tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors.js b/tsc/testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors.js
index ce9270c20d9e9..c9e256e12eb63 100644
--- a/tsc/testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors.js
+++ b/tsc/testdata/baselines/reference/tsbuild/declarationEmit/reports-dts-generation-errors.js
@@ -91,7 +91,7 @@ import ky from 'ky';
export const api = ky.extend({});
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["./index.ts"],"packageJsons":["./node_modules/ky/package.json","./package.json"],"missingPackageJsons":["./node_modules/ky/distribution/package.json"]}
+{"version":"FakeTSVersion","errors":true,"root":["./index.ts"],"packageJsons":["./node_modules/ky/package.json","./package.json"],"missingPackageJsons":["./node_modules/ky/distribution/package.json"],"nonIncrementalFileNames":["./node_modules/ky/distribution/index.d.ts"]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -111,7 +111,7 @@ export const api = ky.extend({});
"missingPackageJsons": [
"./node_modules/ky/distribution/package.json"
],
- "size": 200
+ "size": 272
}
tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/extends/configDir-template.js b/tsc/testdata/baselines/reference/tsbuild/extends/configDir-template.js
index 21cb649e93de0..94aa5af47d84f 100644
--- a/tsc/testdata/baselines/reference/tsbuild/extends/configDir-template.js
+++ b/tsc/testdata/baselines/reference/tsbuild/extends/configDir-template.js
@@ -72,7 +72,7 @@ export declare const x = 10;
export const y = 10;
//// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../main.ts"]}
+{"version":"FakeTSVersion","root":["../main.ts"],"nonIncrementalFileNames":["../types/sometype.ts"]}
//// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -84,7 +84,7 @@ export const y = 10;
"original": "../main.ts"
}
],
- "size": 49
+ "size": 100
}
//// [/home/src/projects/myproject/outDir/types/sometype.js] *new*
export const x = 10;
diff --git a/tsc/testdata/baselines/reference/tsbuild/fileDelete/deleted-file-without-composite.js b/tsc/testdata/baselines/reference/tsbuild/fileDelete/deleted-file-without-composite.js
index d2a8a380e456e..6e1b65d42476a 100644
--- a/tsc/testdata/baselines/reference/tsbuild/fileDelete/deleted-file-without-composite.js
+++ b/tsc/testdata/baselines/reference/tsbuild/fileDelete/deleted-file-without-composite.js
@@ -71,7 +71,7 @@ export function child2() {
}
//// [/home/src/workspaces/solution/child/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./child.ts","./child2.ts"]}
+{"version":"FakeTSVersion","root":["./child.ts","./child2.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/solution/child/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -89,7 +89,7 @@ export function child2() {
"original": "./child2.ts"
}
],
- "size": 63
+ "size": 92
}
child/tsconfig.json::
@@ -139,7 +139,7 @@ Found 1 error in child/child.ts[90m:1[0m
//// [/home/src/workspaces/solution/child/child.js] *rewrite with same content*
//// [/home/src/workspaces/solution/child/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./child.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./child.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/solution/child/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -151,7 +151,7 @@ Found 1 error in child/child.ts[90m:1[0m
"original": "./child.ts"
}
],
- "size": 71,
+ "size": 100,
"semanticErrors": true
}
diff --git a/tsc/testdata/baselines/reference/tsbuild/incremental/reverse-mapped-declaration-consumption.js b/tsc/testdata/baselines/reference/tsbuild/incremental/reverse-mapped-declaration-consumption.js
index 10816d6c3e180..26eac7ea98ea4 100644
--- a/tsc/testdata/baselines/reference/tsbuild/incremental/reverse-mapped-declaration-consumption.js
+++ b/tsc/testdata/baselines/reference/tsbuild/incremental/reverse-mapped-declaration-consumption.js
@@ -80,7 +80,7 @@ interface Symbol {
}
declare const console: { log(msg: any): void; };
//// [/home/src/workspaces/project/consumer/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./index.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./index.ts"],"semanticErrors":true,"nonIncrementalFileNames":["../producer/dist/index.d.ts"]}
//// [/home/src/workspaces/project/consumer/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -92,7 +92,7 @@ declare const console: { log(msg: any): void; };
"original": "./index.ts"
}
],
- "size": 71,
+ "size": 129,
"semanticErrors": true
}
//// [/home/src/workspaces/project/producer/dist/index.d.ts] *new*
diff --git a/tsc/testdata/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js b/tsc/testdata/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js
index 2ae9227fc25f2..cb7d46ed683c7 100644
--- a/tsc/testdata/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js
+++ b/tsc/testdata/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js
@@ -102,7 +102,7 @@ declare const console: { log(msg: any): void; };
"use strict";
//// [/home/src/workspaces/project/a/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./src/index.ts"]}
+{"version":"FakeTSVersion","root":["./src/index.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/a/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -114,14 +114,14 @@ declare const console: { log(msg: any): void; };
"original": "./src/index.ts"
}
],
- "size": 53
+ "size": 82
}
//// [/home/src/workspaces/project/b/src/index.js] *new*
import pg from "pg";
pg.foo();
//// [/home/src/workspaces/project/b/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./src/index.ts"],"packageJsons":["./package.json","../node_modules/@types/pg/package.json"],"missingPackageJsons":["../node_modules/pg/package.json"]}
+{"version":"FakeTSVersion","root":["./src/index.ts"],"packageJsons":["./package.json","../node_modules/@types/pg/package.json"],"missingPackageJsons":["../node_modules/pg/package.json"],"nonIncrementalFileNames":["../node_modules/@types/pg/index.d.ts"]}
//// [/home/src/workspaces/project/b/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -140,7 +140,7 @@ pg.foo();
"missingPackageJsons": [
"../node_modules/pg/package.json"
],
- "size": 186
+ "size": 253
}
a/tsconfig.json::
@@ -168,6 +168,6 @@ Output::
[[90mHH:MM:SS AM[0m] Project 'a/tsconfig.json' is up to date because newest input 'a/src/index.ts' is older than output 'a/src/index.js'
-[[90mHH:MM:SS AM[0m] Project 'b/tsconfig.json' is up to date because newest input 'b/src/index.ts' is older than output 'b/src/index.js'
+[[90mHH:MM:SS AM[0m] Project 'b/tsconfig.json' is up to date because newest input 'node_modules/@types/pg/index.d.ts' is older than output 'b/src/index.js'
diff --git a/tsc/testdata/baselines/reference/tsbuild/moduleResolution/resolution-from-d.ts-of-referenced-project.js b/tsc/testdata/baselines/reference/tsbuild/moduleResolution/resolution-from-d.ts-of-referenced-project.js
index b36940c54c909..cbd8d494d3074 100644
--- a/tsc/testdata/baselines/reference/tsbuild/moduleResolution/resolution-from-d.ts-of-referenced-project.js
+++ b/tsc/testdata/baselines/reference/tsbuild/moduleResolution/resolution-from-d.ts-of-referenced-project.js
@@ -159,7 +159,7 @@ v2.onValue = (n) => {
};
//// [/home/src/workspaces/project/consumer/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./index.ts"]}
+{"version":"FakeTSVersion","root":["./index.ts"],"nonIncrementalFileNames":["../common.d.ts","../producer/in-js.d.ts","../producer/index.d.ts"]}
//// [/home/src/workspaces/project/consumer/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -171,7 +171,7 @@ v2.onValue = (n) => {
"original": "./index.ts"
}
],
- "size": 49
+ "size": 144
}
//// [/home/src/workspaces/project/producer/index.d.ts] *new*
export { ValueProducerDeclaration } from "./in-js";
diff --git a/tsc/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js b/tsc/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js
index e06fbe4af7d46..b5d6455150996 100644
--- a/tsc/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js
+++ b/tsc/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js
@@ -124,7 +124,7 @@ declare const console: { log(msg: any): void; };
export const theNum = 42;
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../../pkg2/package.json"],"missingPackageJsons":["../../../node_modules/pkg2/build/package.json"]}
+{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../../pkg2/package.json"],"missingPackageJsons":["../../../node_modules/pkg2/build/package.json"],"nonIncrementalFileNames":["../../../node_modules/pkg2/build/index.d.ts","../../pkg2/build/const.d.ts"]}
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -142,7 +142,7 @@ export const theNum = 42;
"missingPackageJsons": [
"../../../node_modules/pkg2/build/package.json"
],
- "size": 165
+ "size": 269
}
//// [/user/username/projects/myproject/packages/pkg2/build/const.d.ts] *new*
export type TheNum = 42;
diff --git a/tsc/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js b/tsc/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js
index ff2ed0caa4305..ec710bee78ee7 100644
--- a/tsc/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js
+++ b/tsc/testdata/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js
@@ -125,7 +125,7 @@ declare const console: { log(msg: any): void; };
export const theNum = 42;
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../../pkg2/package.json"]}
+{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../../pkg2/package.json"],"nonIncrementalFileNames":["../../pkg2/build/const.d.ts","../../pkg2/build/index.d.ts"]}
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -140,7 +140,7 @@ export const theNum = 42;
"packageJsons": [
"../../pkg2/package.json"
],
- "size": 93
+ "size": 181
}
//// [/user/username/projects/myproject/packages/pkg2/build/const.d.ts] *new*
export type TheNum = 42;
diff --git a/tsc/testdata/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js b/tsc/testdata/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js
index 997f1f39db14f..ab2caf87f00fe 100644
--- a/tsc/testdata/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js
+++ b/tsc/testdata/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js
@@ -227,7 +227,7 @@ import 'a';
"size": 1451
}
//// [/home/src/workspaces/project/packages/b/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./index.js"],"packageJsons":["../a/package.json","./package.json"]}
+{"version":"FakeTSVersion","root":["./index.js"],"packageJsons":["../a/package.json","./package.json"],"nonIncrementalFileNames":["../a/types/index.d.ts"]}
//// [/home/src/workspaces/project/packages/b/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -243,7 +243,7 @@ import 'a';
"../a/package.json",
"./package.json"
],
- "size": 103
+ "size": 155
}
packages/a/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js b/tsc/testdata/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js
index 6d36380384015..eb4bfc0537d8d 100644
--- a/tsc/testdata/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js
+++ b/tsc/testdata/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js
@@ -248,7 +248,7 @@ packages/b/index.js
Matched by default include pattern '**/*'
File is ECMAScript module because 'packages/b/package.json' has field "type" with value "module"
//// [/home/src/workspaces/project/packages/b/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./index.js"],"packageJsons":["../a/package.json","./package.json"]}
+{"version":"FakeTSVersion","root":["./index.js"],"packageJsons":["../a/package.json","./package.json"],"nonIncrementalFileNames":["../a/types/index.d.ts"]}
//// [/home/src/workspaces/project/packages/b/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -264,7 +264,7 @@ packages/b/index.js
"../a/package.json",
"./package.json"
],
- "size": 103
+ "size": 155
}
packages/b/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/noCheck/dts-errors.js b/tsc/testdata/baselines/reference/tsbuild/noCheck/dts-errors.js
index eeff5ee3027e2..4f8f1b3376de4 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noCheck/dts-errors.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noCheck/dts-errors.js
@@ -72,7 +72,7 @@ export declare const b = 10;
export const b = 10;
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"checkPending":true,"root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","errors":true,"checkPending":true,"root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -92,7 +92,7 @@ export const b = 10;
"original": "./b.ts"
}
],
- "size": 88
+ "size": 117
}
tsconfig.json::
@@ -166,7 +166,7 @@ export const a = "hello";
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -185,7 +185,7 @@ export const a = "hello";
"original": "./b.ts"
}
],
- "size": 74
+ "size": 103
}
tsconfig.json::
@@ -226,7 +226,7 @@ Output::
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -244,7 +244,7 @@ Output::
"original": "./b.ts"
}
],
- "size": 54
+ "size": 83
}
tsconfig.json::
@@ -318,7 +318,7 @@ export const a = class {
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","errors":true,"checkPending":true,"root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","errors":true,"checkPending":true,"root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -338,7 +338,7 @@ export const a = class {
"original": "./b.ts"
}
],
- "size": 88
+ "size": 117
}
tsconfig.json::
@@ -421,7 +421,7 @@ Found 1 error in a.ts[90m:1[0m
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","errors":true,"root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -440,7 +440,7 @@ Found 1 error in a.ts[90m:1[0m
"original": "./b.ts"
}
],
- "size": 68
+ "size": 97
}
tsconfig.json::
@@ -472,7 +472,7 @@ export const a = "hello";
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -491,7 +491,7 @@ export const a = "hello";
"original": "./b.ts"
}
],
- "size": 74
+ "size": 103
}
tsconfig.json::
@@ -519,7 +519,7 @@ Output::
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -537,7 +537,7 @@ Output::
"original": "./b.ts"
}
],
- "size": 54
+ "size": 83
}
tsconfig.json::
@@ -581,7 +581,7 @@ export declare const c: number;
export const c = "hello";
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -605,7 +605,7 @@ export const c = "hello";
"original": "./c.ts"
}
],
- "size": 85,
+ "size": 114,
"semanticErrors": true
}
@@ -657,7 +657,7 @@ export const a = class {
//// [/home/src/workspaces/project/c.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/c.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","errors":true,"checkPending":true,"root":["./a.ts","./b.ts","./c.ts"]}
+{"version":"FakeTSVersion","errors":true,"checkPending":true,"root":["./a.ts","./b.ts","./c.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -683,7 +683,7 @@ export const a = class {
"original": "./c.ts"
}
],
- "size": 97
+ "size": 126
}
tsconfig.json::
@@ -718,7 +718,7 @@ export const a = "hello";
//// [/home/src/workspaces/project/c.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/c.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts","./c.ts"]}
+{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts","./c.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -743,7 +743,7 @@ export const a = "hello";
"original": "./c.ts"
}
],
- "size": 83
+ "size": 112
}
tsconfig.json::
@@ -782,7 +782,7 @@ Found 1 error in c.ts[90m:1[0m
//// [/home/src/workspaces/project/c.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/c.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -806,7 +806,7 @@ Found 1 error in c.ts[90m:1[0m
"original": "./c.ts"
}
],
- "size": 85,
+ "size": 114,
"semanticErrors": true
}
diff --git a/tsc/testdata/baselines/reference/tsbuild/noCheck/semantic-errors.js b/tsc/testdata/baselines/reference/tsbuild/noCheck/semantic-errors.js
index b9f56f1c32082..40679de73a209 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noCheck/semantic-errors.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noCheck/semantic-errors.js
@@ -59,7 +59,7 @@ export declare const b = 10;
export const b = 10;
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -78,7 +78,7 @@ export const b = 10;
"original": "./b.ts"
}
],
- "size": 74
+ "size": 103
}
tsconfig.json::
@@ -163,7 +163,7 @@ Output::
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -181,7 +181,7 @@ Output::
"original": "./b.ts"
}
],
- "size": 54
+ "size": 83
}
tsconfig.json::
@@ -239,7 +239,7 @@ export declare const a: number;
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -258,7 +258,7 @@ export declare const a: number;
"original": "./b.ts"
}
],
- "size": 74
+ "size": 103
}
tsconfig.json::
@@ -307,7 +307,7 @@ Found 1 error in a.ts[90m:1[0m
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts","./b.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -325,7 +325,7 @@ Found 1 error in a.ts[90m:1[0m
"original": "./b.ts"
}
],
- "size": 76,
+ "size": 105,
"semanticErrors": true
}
@@ -358,7 +358,7 @@ export declare const a = "hello";
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -377,7 +377,7 @@ export declare const a = "hello";
"original": "./b.ts"
}
],
- "size": 74
+ "size": 103
}
tsconfig.json::
@@ -405,7 +405,7 @@ Output::
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -423,7 +423,7 @@ Output::
"original": "./b.ts"
}
],
- "size": 54
+ "size": 83
}
tsconfig.json::
@@ -467,7 +467,7 @@ export declare const c: number;
export const c = "hello";
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -491,7 +491,7 @@ export const c = "hello";
"original": "./c.ts"
}
],
- "size": 85,
+ "size": 114,
"semanticErrors": true
}
@@ -527,7 +527,7 @@ export declare const a: number;
//// [/home/src/workspaces/project/c.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/c.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts","./c.ts"]}
+{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts","./c.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -552,7 +552,7 @@ export declare const a: number;
"original": "./c.ts"
}
],
- "size": 83
+ "size": 112
}
tsconfig.json::
@@ -625,7 +625,7 @@ Found 1 error in c.ts[90m:1[0m
//// [/home/src/workspaces/project/c.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/c.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -649,7 +649,7 @@ Found 1 error in c.ts[90m:1[0m
"original": "./c.ts"
}
],
- "size": 85,
+ "size": 114,
"semanticErrors": true
}
diff --git a/tsc/testdata/baselines/reference/tsbuild/noCheck/syntax-errors.js b/tsc/testdata/baselines/reference/tsbuild/noCheck/syntax-errors.js
index cab8d12d86e8c..00e0cb48e65e9 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noCheck/syntax-errors.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noCheck/syntax-errors.js
@@ -67,7 +67,7 @@ export declare const b = 10;
export const b = 10;
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"checkPending":true,"root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","errors":true,"checkPending":true,"root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -87,7 +87,7 @@ export const b = 10;
"original": "./b.ts"
}
],
- "size": 88
+ "size": 117
}
tsconfig.json::
@@ -154,7 +154,7 @@ export const a = "hello";
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -173,7 +173,7 @@ export const a = "hello";
"original": "./b.ts"
}
],
- "size": 74
+ "size": 103
}
tsconfig.json::
@@ -214,7 +214,7 @@ Output::
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -232,7 +232,7 @@ Output::
"original": "./b.ts"
}
],
- "size": 54
+ "size": 83
}
tsconfig.json::
@@ -298,7 +298,7 @@ export const a = "hello;
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","errors":true,"checkPending":true,"root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","errors":true,"checkPending":true,"root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -318,7 +318,7 @@ export const a = "hello;
"original": "./b.ts"
}
],
- "size": 88
+ "size": 117
}
tsconfig.json::
@@ -389,7 +389,7 @@ Found 1 error in a.ts[90m:1[0m
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","errors":true,"root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -408,7 +408,7 @@ Found 1 error in a.ts[90m:1[0m
"original": "./b.ts"
}
],
- "size": 68
+ "size": 97
}
tsconfig.json::
@@ -440,7 +440,7 @@ export const a = "hello";
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -459,7 +459,7 @@ export const a = "hello";
"original": "./b.ts"
}
],
- "size": 74
+ "size": 103
}
tsconfig.json::
@@ -487,7 +487,7 @@ Output::
//// [/home/src/workspaces/project/b.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/b.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts","./b.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -505,7 +505,7 @@ Output::
"original": "./b.ts"
}
],
- "size": 54
+ "size": 83
}
tsconfig.json::
@@ -549,7 +549,7 @@ export declare const c: number;
export const c = "hello";
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -573,7 +573,7 @@ export const c = "hello";
"original": "./c.ts"
}
],
- "size": 85,
+ "size": 114,
"semanticErrors": true
}
@@ -617,7 +617,7 @@ export const a = "hello;
//// [/home/src/workspaces/project/c.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/c.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","errors":true,"checkPending":true,"root":["./a.ts","./b.ts","./c.ts"]}
+{"version":"FakeTSVersion","errors":true,"checkPending":true,"root":["./a.ts","./b.ts","./c.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -643,7 +643,7 @@ export const a = "hello;
"original": "./c.ts"
}
],
- "size": 97
+ "size": 126
}
tsconfig.json::
@@ -678,7 +678,7 @@ export const a = "hello";
//// [/home/src/workspaces/project/c.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/c.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts","./c.ts"]}
+{"version":"FakeTSVersion","checkPending":true,"root":["./a.ts","./b.ts","./c.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -703,7 +703,7 @@ export const a = "hello";
"original": "./c.ts"
}
],
- "size": 83
+ "size": 112
}
tsconfig.json::
@@ -742,7 +742,7 @@ Found 1 error in c.ts[90m:1[0m
//// [/home/src/workspaces/project/c.d.ts] *rewrite with same content*
//// [/home/src/workspaces/project/c.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./a.ts","./b.ts","./c.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -766,7 +766,7 @@ Found 1 error in c.ts[90m:1[0m
"original": "./c.ts"
}
],
- "size": 85,
+ "size": 114,
"semanticErrors": true
}
diff --git a/tsc/testdata/baselines/reference/tsbuild/noEmit/dts-errors-with-declaration-enable-changes.js b/tsc/testdata/baselines/reference/tsbuild/noEmit/dts-errors-with-declaration-enable-changes.js
index 00b3cf9829fe5..b2445050efc06 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noEmit/dts-errors-with-declaration-enable-changes.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noEmit/dts-errors-with-declaration-enable-changes.js
@@ -21,7 +21,7 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'tsconfig.json'...
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./a.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -33,7 +33,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 45
+ "size": 74
}
//// [/home/src/tslibs/TS/Lib/lib.es2026.full.d.ts] *Lib*
///
@@ -113,7 +113,7 @@ Output::
Found 1 error in a.ts[90m:1[0m
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -126,7 +126,7 @@ Found 1 error in a.ts[90m:1[0m
"original": "./a.ts"
}
],
- "size": 59
+ "size": 88
}
tsconfig.json::
@@ -183,7 +183,7 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'tsconfig.json'...
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -195,7 +195,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 45
+ "size": 74
}
tsconfig.json::
@@ -238,7 +238,7 @@ const a = class {
};
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -251,7 +251,7 @@ const a = class {
"original": "./a.ts"
}
],
- "size": 59
+ "size": 88
}
tsconfig.json::
@@ -276,7 +276,7 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'tsconfig.json'...
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -288,7 +288,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 45
+ "size": 74
}
tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/noEmit/dts-errors-without-dts-enabled.js b/tsc/testdata/baselines/reference/tsbuild/noEmit/dts-errors-without-dts-enabled.js
index 7af2dd52dcdff..b6a9c8b282d60 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noEmit/dts-errors-without-dts-enabled.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noEmit/dts-errors-without-dts-enabled.js
@@ -22,7 +22,7 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'tsconfig.json'...
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./a.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -34,7 +34,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 45
+ "size": 74
}
//// [/home/src/tslibs/TS/Lib/lib.es2026.full.d.ts] *Lib*
///
diff --git a/tsc/testdata/baselines/reference/tsbuild/noEmit/dts-errors.js b/tsc/testdata/baselines/reference/tsbuild/noEmit/dts-errors.js
index 7c1edf7f8feb5..ad151ed3e8df5 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noEmit/dts-errors.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noEmit/dts-errors.js
@@ -34,7 +34,7 @@ Output::
Found 1 error in a.ts[90m:1[0m
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -47,7 +47,7 @@ Found 1 error in a.ts[90m:1[0m
"original": "./a.ts"
}
],
- "size": 59
+ "size": 88
}
//// [/home/src/tslibs/TS/Lib/lib.es2026.full.d.ts] *Lib*
///
@@ -129,7 +129,7 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'tsconfig.json'...
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -141,7 +141,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 45
+ "size": 74
}
tsconfig.json::
@@ -242,7 +242,7 @@ Output::
Found 1 error in a.ts[90m:1[0m
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -255,7 +255,7 @@ Found 1 error in a.ts[90m:1[0m
"original": "./a.ts"
}
],
- "size": 59
+ "size": 88
}
tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/noEmit/semantic-errors.js b/tsc/testdata/baselines/reference/tsbuild/noEmit/semantic-errors.js
index 4e9be83930b57..48ef3773a66ee 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noEmit/semantic-errors.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noEmit/semantic-errors.js
@@ -30,7 +30,7 @@ Output::
Found 1 error in a.ts[90m:1[0m
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./a.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./a.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -42,7 +42,7 @@ Found 1 error in a.ts[90m:1[0m
"original": "./a.ts"
}
],
- "size": 67,
+ "size": 96,
"semanticErrors": true
}
//// [/home/src/tslibs/TS/Lib/lib.es2026.full.d.ts] *Lib*
@@ -121,7 +121,7 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'tsconfig.json'...
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -133,7 +133,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 45
+ "size": 74
}
tsconfig.json::
@@ -227,7 +227,7 @@ Output::
Found 1 error in a.ts[90m:1[0m
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./a.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -239,7 +239,7 @@ Found 1 error in a.ts[90m:1[0m
"original": "./a.ts"
}
],
- "size": 67,
+ "size": 96,
"semanticErrors": true
}
diff --git a/tsc/testdata/baselines/reference/tsbuild/noEmit/syntax-errors.js b/tsc/testdata/baselines/reference/tsbuild/noEmit/syntax-errors.js
index 0e27ee0f1c406..1d5d8a871dd09 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noEmit/syntax-errors.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noEmit/syntax-errors.js
@@ -30,7 +30,7 @@ Output::
Found 1 error in a.ts[90m:1[0m
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -43,7 +43,7 @@ Found 1 error in a.ts[90m:1[0m
"original": "./a.ts"
}
],
- "size": 59
+ "size": 88
}
//// [/home/src/tslibs/TS/Lib/lib.es2026.full.d.ts] *Lib*
///
@@ -121,7 +121,7 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'tsconfig.json'...
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -133,7 +133,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 45
+ "size": 74
}
tsconfig.json::
@@ -227,7 +227,7 @@ Output::
Found 1 error in a.ts[90m:1[0m
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -240,7 +240,7 @@ Found 1 error in a.ts[90m:1[0m
"original": "./a.ts"
}
],
- "size": 59
+ "size": 88
}
tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/dts-errors-with-declaration.js b/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/dts-errors-with-declaration.js
index 24a5b5af4a542..7f7ea08f3e49b 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/dts-errors-with-declaration.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/dts-errors-with-declaration.js
@@ -67,7 +67,7 @@ interface Symbol {
}
declare const console: { log(msg: any): void; };
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -92,7 +92,7 @@ declare const console: { log(msg: any): void; };
"original": "../src/other.ts"
}
],
- "size": 109
+ "size": 138
}
tsconfig.json::
@@ -183,7 +183,7 @@ console.log("hi");
export {};
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -207,7 +207,7 @@ export {};
"original": "../src/other.ts"
}
],
- "size": 95
+ "size": 124
}
tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/dts-errors.js b/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/dts-errors.js
index d95aeb753b820..f090a50bbe479 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/dts-errors.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/dts-errors.js
@@ -67,7 +67,7 @@ console.log("hi");
export {};
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -91,7 +91,7 @@ export {};
"original": "../src/other.ts"
}
],
- "size": 95
+ "size": 124
}
tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/semantic-errors-with-declaration.js b/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/semantic-errors-with-declaration.js
index 40eb57157df3c..169699489a5ce 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/semantic-errors-with-declaration.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/semantic-errors-with-declaration.js
@@ -63,7 +63,7 @@ interface Symbol {
}
declare const console: { log(msg: any): void; };
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -87,7 +87,7 @@ declare const console: { log(msg: any): void; };
"original": "../src/other.ts"
}
],
- "size": 117,
+ "size": 146,
"semanticErrors": true
}
@@ -170,7 +170,7 @@ console.log("hi");
export {};
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -194,7 +194,7 @@ export {};
"original": "../src/other.ts"
}
],
- "size": 95
+ "size": 124
}
tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/semantic-errors.js b/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/semantic-errors.js
index 5854804c58b3f..5c7f427e637d2 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/semantic-errors.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/semantic-errors.js
@@ -63,7 +63,7 @@ interface Symbol {
}
declare const console: { log(msg: any): void; };
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -87,7 +87,7 @@ declare const console: { log(msg: any): void; };
"original": "../src/other.ts"
}
],
- "size": 117,
+ "size": 146,
"semanticErrors": true
}
@@ -159,7 +159,7 @@ console.log("hi");
export {};
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -183,7 +183,7 @@ export {};
"original": "../src/other.ts"
}
],
- "size": 95
+ "size": 124
}
tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/syntax-errors-with-declaration.js b/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/syntax-errors-with-declaration.js
index 7549cb1e9acbc..c8b1a7218d093 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/syntax-errors-with-declaration.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/syntax-errors-with-declaration.js
@@ -65,7 +65,7 @@ interface Symbol {
}
declare const console: { log(msg: any): void; };
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -90,7 +90,7 @@ declare const console: { log(msg: any): void; };
"original": "../src/other.ts"
}
],
- "size": 109
+ "size": 138
}
tsconfig.json::
@@ -176,7 +176,7 @@ console.log("hi");
export {};
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -200,7 +200,7 @@ export {};
"original": "../src/other.ts"
}
],
- "size": 95
+ "size": 124
}
tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/syntax-errors.js b/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/syntax-errors.js
index e6ac82a65f958..f32ca4ff49dd7 100644
--- a/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/syntax-errors.js
+++ b/tsc/testdata/baselines/reference/tsbuild/noEmitOnError/syntax-errors.js
@@ -65,7 +65,7 @@ interface Symbol {
}
declare const console: { log(msg: any): void; };
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -90,7 +90,7 @@ declare const console: { log(msg: any): void; };
"original": "../src/other.ts"
}
],
- "size": 109
+ "size": 138
}
tsconfig.json::
@@ -165,7 +165,7 @@ console.log("hi");
export {};
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -189,7 +189,7 @@ export {};
"original": "../src/other.ts"
}
],
- "size": 95
+ "size": 124
}
tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js b/tsc/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js
index 22ca312e09f7a..f2c6af02e0fed 100644
--- a/tsc/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js
+++ b/tsc/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js
@@ -56,7 +56,7 @@ declare const console: { log(msg: any): void; };
export const x = 10;
//// [/home/src/workspaces/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -69,7 +69,7 @@ export const x = 10;
"original": "../src/index.ts"
}
],
- "size": 68
+ "size": 97
}
tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir.js b/tsc/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir.js
index fe23f784a518b..81ddc717e7d5f 100644
--- a/tsc/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir.js
+++ b/tsc/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir.js
@@ -56,7 +56,7 @@ declare const console: { log(msg: any): void; };
export const x = 10;
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["./src/index.ts","./types/type.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["./src/index.ts","./types/type.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -75,7 +75,7 @@ export const x = 10;
"original": "./types/type.ts"
}
],
- "size": 85
+ "size": 114
}
//// [/home/src/workspaces/project/types/type.js] *new*
export {};
diff --git a/tsc/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified.js b/tsc/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified.js
index e21d434885bb3..3702308241e42 100644
--- a/tsc/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified.js
+++ b/tsc/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified.js
@@ -48,7 +48,7 @@ declare const console: { log(msg: any): void; };
export const x = 10;
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./src/index.ts"]}
+{"version":"FakeTSVersion","root":["./src/index.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -60,7 +60,7 @@ export const x = 10;
"original": "./src/index.ts"
}
],
- "size": 53
+ "size": 82
}
tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/programUpdates/when-root-is-source-from-project-reference.js b/tsc/testdata/baselines/reference/tsbuild/programUpdates/when-root-is-source-from-project-reference.js
index f5f5064d15929..df1e18becf624 100644
--- a/tsc/testdata/baselines/reference/tsbuild/programUpdates/when-root-is-source-from-project-reference.js
+++ b/tsc/testdata/baselines/reference/tsbuild/programUpdates/when-root-is-source-from-project-reference.js
@@ -102,7 +102,7 @@ export const FOO = 'THEFOOEXPORT';
"size": 1145
}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./index.ts","./lib/foo.ts"]}
+{"version":"FakeTSVersion","root":["./index.ts","./lib/foo.ts"],"nonIncrementalFileNames":["./lib/dist/foo.d.ts"]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -120,7 +120,7 @@ export const FOO = 'THEFOOEXPORT';
"original": "./lib/foo.ts"
}
],
- "size": 64
+ "size": 114
}
lib/tsconfig.json::
@@ -200,7 +200,7 @@ const Bar = 10;
"size": 1160
}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./index.ts","./lib/foo.ts","./lib/dist/foo.d.ts"]}
+{"version":"FakeTSVersion","root":["./index.ts","./lib/foo.ts","./lib/dist/foo.d.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -224,7 +224,7 @@ const Bar = 10;
"original": "./lib/dist/foo.d.ts"
}
],
- "size": 86
+ "size": 115
}
lib/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/projectReferenceRedirect/uses-correct-project-reference-redirect-when-file-belongs-to-multiple-sub-projects.js b/tsc/testdata/baselines/reference/tsbuild/projectReferenceRedirect/uses-correct-project-reference-redirect-when-file-belongs-to-multiple-sub-projects.js
index cbac523991879..c9cc314b26a07 100644
--- a/tsc/testdata/baselines/reference/tsbuild/projectReferenceRedirect/uses-correct-project-reference-redirect-when-file-belongs-to-multiple-sub-projects.js
+++ b/tsc/testdata/baselines/reference/tsbuild/projectReferenceRedirect/uses-correct-project-reference-redirect-when-file-belongs-to-multiple-sub-projects.js
@@ -340,7 +340,7 @@ export declare const platform: "native";
"size": 1716
}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./app.ts"],"packageJsons":["./pkg/package.json"]}
+{"version":"FakeTSVersion","root":["./app.ts"],"packageJsons":["./pkg/package.json"],"nonIncrementalFileNames":["./pkg/dist/index.native.d.ts","./pkg/dist/src/util.native.d.ts"]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -355,7 +355,7 @@ export declare const platform: "native";
"packageJsons": [
"./pkg/package.json"
],
- "size": 85
+ "size": 178
}
pkg/tsconfig.native.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file-non-composite.js b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file-non-composite.js
index b78622fdfcb42..99784ed787b9b 100644
--- a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file-non-composite.js
+++ b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file-non-composite.js
@@ -90,7 +90,7 @@ const hello_json_1 = __importDefault(require("./hello.json"));
exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts","../src/hello.json"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts","../src/hello.json"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -109,7 +109,7 @@ exports.default = hello_json_1.default.hello;
"original": "../src/hello.json"
}
],
- "size": 88
+ "size": 117
}
project/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files-non-composite.js b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files-non-composite.js
index 5ec0bfb3356ba..1fb227a58a628 100644
--- a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files-non-composite.js
+++ b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files-non-composite.js
@@ -90,7 +90,7 @@ const hello_json_1 = __importDefault(require("./hello.json"));
exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["../src/hello.json","../src/index.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/hello.json","../src/index.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -109,7 +109,7 @@ exports.default = hello_json_1.default.hello;
"original": "../src/index.ts"
}
],
- "size": 88
+ "size": 117
}
project/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file-non-composite.js b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file-non-composite.js
index 4d9c8aae2ad20..c6da68e9e5821 100644
--- a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file-non-composite.js
+++ b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file-non-composite.js
@@ -90,7 +90,7 @@ exports.default = index_json_1.default.hello;
}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts","../src/index.json"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts","../src/index.json"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -109,7 +109,7 @@ exports.default = index_json_1.default.hello;
"original": "../src/index.json"
}
],
- "size": 88
+ "size": 117
}
project/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-non-composite.js b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-non-composite.js
index b05549918b20d..6c6ffa05e2c59 100644
--- a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-non-composite.js
+++ b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-non-composite.js
@@ -90,7 +90,7 @@ const hello_json_1 = __importDefault(require("./hello.json"));
exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts","../src/hello.json"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts","../src/hello.json"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -109,7 +109,7 @@ exports.default = hello_json_1.default.hello;
"original": "../src/hello.json"
}
],
- "size": 88
+ "size": 117
}
project/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js
index b2b6b5f438da0..8312c2dd57e3b 100644
--- a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js
+++ b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js
@@ -89,7 +89,7 @@ const hello_json_1 = __importDefault(require("./hello.json"));
exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts"],"nonIncrementalFileNames":["../src/hello.json"]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -102,7 +102,7 @@ exports.default = hello_json_1.default.hello;
"original": "../src/index.ts"
}
],
- "size": 68
+ "size": 116
}
project/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir-non-composite.js b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir-non-composite.js
index 6065a116ace7c..4a67637f2130e 100644
--- a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir-non-composite.js
+++ b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir-non-composite.js
@@ -74,7 +74,7 @@ const hello_json_1 = __importDefault(require("../hello.json"));
exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./src/index.ts"]}
+{"version":"FakeTSVersion","root":["./src/index.ts"],"nonIncrementalFileNames":["./hello.json"]}
//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -86,7 +86,7 @@ exports.default = hello_json_1.default.hello;
"original": "./src/index.ts"
}
],
- "size": 53
+ "size": 96
}
project/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory-non-composite.js b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory-non-composite.js
index db5d5dff781e7..36a38cbcd8e5d 100644
--- a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory-non-composite.js
+++ b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory-non-composite.js
@@ -83,7 +83,7 @@ const hello_json_1 = __importDefault(require("../../hello.json"));
exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts"],"nonIncrementalFileNames":["../../hello.json"]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -96,7 +96,7 @@ exports.default = hello_json_1.default.hello;
"original": "../src/index.ts"
}
],
- "size": 68
+ "size": 115
}
project/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir-non-composite.js b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir-non-composite.js
index 1310c4c9cf585..e06b61e6ab09c 100644
--- a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir-non-composite.js
+++ b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir-non-composite.js
@@ -74,7 +74,7 @@ const hello_json_1 = __importDefault(require("./hello.json"));
exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./src/index.ts"]}
+{"version":"FakeTSVersion","root":["./src/index.ts"],"nonIncrementalFileNames":["./src/hello.json"]}
//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -86,7 +86,7 @@ exports.default = hello_json_1.default.hello;
"original": "./src/index.ts"
}
],
- "size": 53
+ "size": 100
}
project/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js
index 95c16ccef1aa1..864aa5bbf944d 100644
--- a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js
+++ b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js
@@ -93,7 +93,7 @@ exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/dist/src/index.js.map] *new*
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;AAAA,8DAAgC;kBACjB,oBAAK,CAAC,KAAK"}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts","../src/hello.json"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts","../src/hello.json"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -112,7 +112,7 @@ exports.default = hello_json_1.default.hello;
"original": "../src/hello.json"
}
],
- "size": 88
+ "size": 117
}
project/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js
index aea177c045829..ed4f2f96101ad 100644
--- a/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js
+++ b/tsc/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js
@@ -75,7 +75,7 @@ const hello_json_1 = __importDefault(require("./hello.json"));
exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./src/index.ts","./src/hello.json"]}
+{"version":"FakeTSVersion","root":["./src/index.ts","./src/hello.json"],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -93,7 +93,7 @@ exports.default = hello_json_1.default.hello;
"original": "./src/hello.json"
}
],
- "size": 72
+ "size": 101
}
project/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/sample/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js b/tsc/testdata/baselines/reference/tsbuild/sample/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js
index 356f3cc2a5d62..265b0c23ca993 100644
--- a/tsc/testdata/baselines/reference/tsbuild/sample/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js
+++ b/tsc/testdata/baselines/reference/tsbuild/sample/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js
@@ -114,7 +114,7 @@ export function leftPad(s, n) { return s + n; }
export function multiply(a, b) { return a * b; }
//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./anotherModule.ts","./index.ts","./some_decl.d.ts"]}
+{"version":"FakeTSVersion","root":["./anotherModule.ts","./index.ts","./some_decl.d.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -138,7 +138,7 @@ export function multiply(a, b) { return a * b; }
"original": "./some_decl.d.ts"
}
],
- "size": 89
+ "size": 118
}
core/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/transitiveReferences/builds-correctly.js b/tsc/testdata/baselines/reference/tsbuild/transitiveReferences/builds-correctly.js
index 5cfd7df738c63..85d4787927d33 100644
--- a/tsc/testdata/baselines/reference/tsbuild/transitiveReferences/builds-correctly.js
+++ b/tsc/testdata/baselines/reference/tsbuild/transitiveReferences/builds-correctly.js
@@ -215,7 +215,7 @@ X;
"size": 1278
}
//// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./c.ts"]}
+{"version":"FakeTSVersion","root":["./c.ts"],"nonIncrementalFileNames":["./a.d.ts","./b.d.ts","./refs/a.d.ts"]}
//// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -227,7 +227,7 @@ X;
"original": "./c.ts"
}
],
- "size": 45
+ "size": 111
}
tsconfig.a.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/transitiveReferences/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js b/tsc/testdata/baselines/reference/tsbuild/transitiveReferences/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js
index 2d559feeb3df5..5464d7c961dc1 100644
--- a/tsc/testdata/baselines/reference/tsbuild/transitiveReferences/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js
+++ b/tsc/testdata/baselines/reference/tsbuild/transitiveReferences/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js
@@ -222,7 +222,7 @@ X;
"size": 1321
}
//// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./c.ts"]}
+{"version":"FakeTSVersion","root":["./c.ts"],"nonIncrementalFileNames":["./b.d.ts","./refs/a.d.ts"]}
//// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -234,7 +234,7 @@ X;
"original": "./c.ts"
}
],
- "size": 45
+ "size": 100
}
tsconfig.a.json::
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/extends/configDir-template.js b/tsc/testdata/baselines/reference/tsbuildWatch/extends/configDir-template.js
index 66e735a549b1b..e0dc64b21537f 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/extends/configDir-template.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/extends/configDir-template.js
@@ -76,7 +76,7 @@ export declare const x = 10;
export const y = 10;
//// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../main.ts"]}
+{"version":"FakeTSVersion","root":["../main.ts"],"nonIncrementalFileNames":["../types/sometype.ts"]}
//// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -88,7 +88,7 @@ export const y = 10;
"original": "../main.ts"
}
],
- "size": 49
+ "size": 100
}
//// [/home/src/projects/myproject/outDir/types/sometype.js] *new*
export const x = 10;
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js
index 826f6c95b39ab..e0c852b91a649 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js
@@ -122,7 +122,7 @@ declare const console: { log(msg: any): void; };
export const theNum = 42;
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"]}
+{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"],"nonIncrementalFileNames":["../../pkg2/build/const.d.ts","../../pkg2/build/index.d.ts"]}
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -138,7 +138,7 @@ export const theNum = 42;
"../package.json",
"../../pkg2/package.json"
],
- "size": 111
+ "size": 199
}
//// [/user/username/projects/myproject/packages/pkg2/build/const.d.ts] *new*
export type TheNum = 42;
@@ -340,7 +340,7 @@ Resolving real path for '/user/username/projects/myproject/node_modules/pkg2/bui
//// [/user/username/projects/myproject/packages/pkg1/build/index.js] *rewrite with same content*
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"],"semanticErrors":true,"nonIncrementalFileNames":["../../pkg2/build/other.d.ts"]}
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -356,7 +356,7 @@ Resolving real path for '/user/username/projects/myproject/node_modules/pkg2/bui
"../package.json",
"../../pkg2/package.json"
],
- "size": 133,
+ "size": 191,
"semanticErrors": true
}
//// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo] *mTime changed*
@@ -446,7 +446,7 @@ File '/user/username/projects/myproject/packages/pkg2/const.ts' exists - use it
//// [/user/username/projects/myproject/packages/pkg1/build/index.js] *rewrite with same content*
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"]}
+{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"],"nonIncrementalFileNames":["../../pkg2/build/const.d.ts","../../pkg2/build/index.d.ts"]}
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -462,7 +462,7 @@ File '/user/username/projects/myproject/packages/pkg2/const.ts' exists - use it
"../package.json",
"../../pkg2/package.json"
],
- "size": 111
+ "size": 199
}
//// [/user/username/projects/myproject/packages/pkg2/build/tsconfig.tsbuildinfo] *mTime changed*
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-missing-package-json-lookups.js b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-missing-package-json-lookups.js
index 9d13ee0f631be..d77933ba3d684 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-missing-package-json-lookups.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-missing-package-json-lookups.js
@@ -85,7 +85,7 @@ declare const console: { log(msg: any): void; };
export const theNum = 42;
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../index.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["../index.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -97,7 +97,7 @@ export const theNum = 42;
"original": "../index.ts"
}
],
- "size": 72,
+ "size": 101,
"semanticErrors": true
}
@@ -163,7 +163,7 @@ Resolving real path for '/user/username/projects/myproject/node_modules/pkg2/ind
//// [/user/username/projects/myproject/packages/pkg1/build/index.js] *rewrite with same content*
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../../../node_modules/pkg2/package.json"]}
+{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../../../node_modules/pkg2/package.json"],"nonIncrementalFileNames":["../../../node_modules/pkg2/index.d.ts"]}
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -178,7 +178,7 @@ Resolving real path for '/user/username/projects/myproject/node_modules/pkg2/ind
"packageJsons": [
"../../../node_modules/pkg2/package.json"
],
- "size": 109
+ "size": 177
}
Watch Registrations::
@@ -207,7 +207,7 @@ Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* packages/pkg1/tsconfig.json
-[[90mHH:MM:SS AM[0m] Project 'packages/pkg1/tsconfig.json' is out of date because input 'node_modules/pkg2/package.json' does not exist.
+[[90mHH:MM:SS AM[0m] Project 'packages/pkg1/tsconfig.json' is out of date because input 'node_modules/pkg2/index.d.ts' does not exist.
[[90mHH:MM:SS AM[0m] Building project 'packages/pkg1/tsconfig.json'...
@@ -259,7 +259,7 @@ Directory '/node_modules' does not exist, skipping all lookups in it.
//// [/user/username/projects/myproject/packages/pkg1/build/index.js] *rewrite with same content*
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../index.ts"],"missingPackageJsons":["../../../node_modules/pkg2/package.json"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["../index.ts"],"missingPackageJsons":["../../../node_modules/pkg2/package.json"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -274,7 +274,7 @@ Directory '/node_modules' does not exist, skipping all lookups in it.
"missingPackageJsons": [
"../../../node_modules/pkg2/package.json"
],
- "size": 138,
+ "size": 167,
"semanticErrors": true
}
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-package-json-lookups-from-existing-buildinfo.js b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-package-json-lookups-from-existing-buildinfo.js
index 689d62859e4d2..e6c690c77fa47 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-package-json-lookups-from-existing-buildinfo.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-package-json-lookups-from-existing-buildinfo.js
@@ -22,7 +22,7 @@ export const theNum: TheNum = 42;
export const theNum = 42;
//// [/user/username/projects/myproject/packages/pkg1/zzbuild/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../../../node_modules/pkg2/package.json"]}
+{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../../../node_modules/pkg2/package.json"],"nonIncrementalFileNames":["../../../node_modules/pkg2/index.d.ts"]}
//// [/user/username/projects/myproject/packages/pkg1/zzbuild/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -37,7 +37,7 @@ export const theNum = 42;
"packageJsons": [
"../../../node_modules/pkg2/package.json"
],
- "size": 109
+ "size": 177
}
tsgo -b packages/pkg1 -w --verbose --traceResolution
@@ -72,7 +72,7 @@ Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* packages/pkg1/tsconfig.json
-[[90mHH:MM:SS AM[0m] Project 'packages/pkg1/tsconfig.json' is out of date because input 'node_modules/pkg2/package.json' does not exist.
+[[90mHH:MM:SS AM[0m] Project 'packages/pkg1/tsconfig.json' is out of date because input 'node_modules/pkg2/index.d.ts' does not exist.
[[90mHH:MM:SS AM[0m] Building project 'packages/pkg1/tsconfig.json'...
@@ -147,7 +147,7 @@ interface Symbol {
declare const console: { log(msg: any): void; };
//// [/user/username/projects/myproject/packages/pkg1/zzbuild/index.js] *rewrite with same content*
//// [/user/username/projects/myproject/packages/pkg1/zzbuild/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../index.ts"],"missingPackageJsons":["../../../node_modules/pkg2/package.json"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["../index.ts"],"missingPackageJsons":["../../../node_modules/pkg2/package.json"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/user/username/projects/myproject/packages/pkg1/zzbuild/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -162,7 +162,7 @@ declare const console: { log(msg: any): void; };
"missingPackageJsons": [
"../../../node_modules/pkg2/package.json"
],
- "size": 138,
+ "size": 167,
"semanticErrors": true
}
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js
index e809fd8231939..1be569026b5e6 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js
@@ -121,7 +121,7 @@ declare const console: { log(msg: any): void; };
export const theNum = 42;
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"]}
+{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"],"nonIncrementalFileNames":["../../pkg2/build/const.d.cts","../../pkg2/build/index.d.ts"]}
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -137,7 +137,7 @@ export const theNum = 42;
"../package.json",
"../../pkg2/package.json"
],
- "size": 111
+ "size": 200
}
//// [/user/username/projects/myproject/packages/pkg2/build/const.cjs] *new*
"use strict";
@@ -322,7 +322,7 @@ exports.theNum = void 0;
exports.theNum = 42;
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"],"semanticErrors":true,"nonIncrementalFileNames":["../../pkg2/build/const.d.cts","../../pkg2/build/index.d.ts"]}
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -338,7 +338,7 @@ exports.theNum = 42;
"../package.json",
"../../pkg2/package.json"
],
- "size": 133,
+ "size": 222,
"semanticErrors": true
}
@@ -411,7 +411,7 @@ File '/user/username/projects/myproject/packages/pkg2/const.cts' exists - use it
export const theNum = 42;
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"]}
+{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"],"nonIncrementalFileNames":["../../pkg2/build/const.d.cts","../../pkg2/build/index.d.ts"]}
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -427,7 +427,7 @@ export const theNum = 42;
"../package.json",
"../../pkg2/package.json"
],
- "size": 111
+ "size": 200
}
Watch Registrations::
@@ -511,7 +511,7 @@ exports.theNum = void 0;
exports.theNum = 42;
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"],"semanticErrors":true,"nonIncrementalFileNames":["../../pkg2/build/const.d.cts","../../pkg2/build/index.d.ts"]}
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -527,7 +527,7 @@ exports.theNum = 42;
"../package.json",
"../../pkg2/package.json"
],
- "size": 133,
+ "size": 222,
"semanticErrors": true
}
@@ -614,7 +614,7 @@ File '/user/username/projects/myproject/packages/pkg2/const.cts' exists - use it
//// [/user/username/projects/myproject/packages/pkg1/build/index.js] *rewrite with same content*
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"]}
+{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json","../../pkg2/package.json"],"nonIncrementalFileNames":["../../pkg2/build/const.d.cts","../../pkg2/build/index.d.cts"]}
//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -630,7 +630,7 @@ File '/user/username/projects/myproject/packages/pkg2/const.cts' exists - use it
"../package.json",
"../../pkg2/package.json"
],
- "size": 111
+ "size": 201
}
//// [/user/username/projects/myproject/packages/pkg2/build/index.cjs] *new*
"use strict";
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js b/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js
index d8091d5efe80c..903e7725be40a 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js
@@ -51,7 +51,7 @@ interface Symbol {
}
declare const console: { log(msg: any): void; };
//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./a.js","./b.ts"]}
+{"version":"FakeTSVersion","root":["./a.js","./b.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -69,7 +69,7 @@ declare const console: { log(msg: any): void; };
"original": "./b.ts"
}
],
- "size": 54
+ "size": 83
}
Watch Registrations::
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-without-dts-enabled.js b/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-without-dts-enabled.js
index 3f639dd741b48..0201bc41b42ba 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-without-dts-enabled.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors-without-dts-enabled.js
@@ -26,7 +26,7 @@ Output::
[[90mHH:MM:SS AM[0m] Found 0 errors. Watching for file changes.
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./a.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -38,7 +38,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 45
+ "size": 74
}
//// [/home/src/tslibs/TS/Lib/lib.es2026.full.d.ts] *Lib*
///
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors.js b/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors.js
index b8619c23b026d..cf80cbb7b3be8 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/dts-errors.js
@@ -35,7 +35,7 @@ Output::
[[90mHH:MM:SS AM[0m] Found 1 error. Watching for file changes.
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -48,7 +48,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 59
+ "size": 88
}
//// [/home/src/tslibs/TS/Lib/lib.es2026.full.d.ts] *Lib*
///
@@ -102,7 +102,7 @@ Output::
[[90mHH:MM:SS AM[0m] Found 0 errors. Watching for file changes.
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -114,7 +114,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 45
+ "size": 74
}
Watch Registrations::
@@ -231,7 +231,7 @@ Output::
[[90mHH:MM:SS AM[0m] Found 1 error. Watching for file changes.
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -244,7 +244,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 59
+ "size": 88
}
Watch Registrations::
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/semantic-errors.js b/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/semantic-errors.js
index 6224fe598f0fa..b4d8381e9304e 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/semantic-errors.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/semantic-errors.js
@@ -31,7 +31,7 @@ Output::
[[90mHH:MM:SS AM[0m] Found 1 error. Watching for file changes.
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./a.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./a.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -43,7 +43,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 67,
+ "size": 96,
"semanticErrors": true
}
//// [/home/src/tslibs/TS/Lib/lib.es2026.full.d.ts] *Lib*
@@ -98,7 +98,7 @@ Output::
[[90mHH:MM:SS AM[0m] Found 0 errors. Watching for file changes.
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -110,7 +110,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 45
+ "size": 74
}
Watch Registrations::
@@ -220,7 +220,7 @@ Output::
[[90mHH:MM:SS AM[0m] Found 1 error. Watching for file changes.
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./a.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -232,7 +232,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 67,
+ "size": 96,
"semanticErrors": true
}
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/syntax-errors.js b/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/syntax-errors.js
index d8e92ccb082a4..e004d15a602c4 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/syntax-errors.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/noEmit/syntax-errors.js
@@ -31,7 +31,7 @@ Output::
[[90mHH:MM:SS AM[0m] Found 1 error. Watching for file changes.
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -44,7 +44,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 59
+ "size": 88
}
//// [/home/src/tslibs/TS/Lib/lib.es2026.full.d.ts] *Lib*
///
@@ -98,7 +98,7 @@ Output::
[[90mHH:MM:SS AM[0m] Found 0 errors. Watching for file changes.
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./a.ts"]}
+{"version":"FakeTSVersion","root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -110,7 +110,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 45
+ "size": 74
}
Watch Registrations::
@@ -220,7 +220,7 @@ Output::
[[90mHH:MM:SS AM[0m] Found 1 error. Watching for file changes.
//// [/home/src/projects/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","errors":true,"root":["./a.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["./a.ts"],"nonIncrementalFileNames":[]}
//// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -233,7 +233,7 @@ Output::
"original": "./a.ts"
}
],
- "size": 59
+ "size": 88
}
Watch Registrations::
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError-with-declaration.js b/tsc/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError-with-declaration.js
index 0eb4d0568e03c..8190027b9acc1 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError-with-declaration.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError-with-declaration.js
@@ -66,7 +66,7 @@ interface Symbol {
}
declare const console: { log(msg: any): void; };
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -91,7 +91,7 @@ declare const console: { log(msg: any): void; };
"original": "../src/other.ts"
}
],
- "size": 109
+ "size": 138
}
Watch Registrations::
@@ -187,7 +187,7 @@ console.log("hi");
export {};
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -211,7 +211,7 @@ export {};
"original": "../src/other.ts"
}
],
- "size": 95
+ "size": 124
}
Watch Registrations::
@@ -287,7 +287,7 @@ Output::
[[90mHH:MM:SS AM[0m] Found 1 error. Watching for file changes.
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -311,7 +311,7 @@ Output::
"original": "../src/other.ts"
}
],
- "size": 117,
+ "size": 146,
"semanticErrors": true
}
@@ -391,7 +391,7 @@ export {};
//// [/user/username/projects/noEmitOnError/dev-build/src/other.d.ts] *rewrite with same content*
//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *rewrite with same content*
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -415,7 +415,7 @@ export {};
"original": "../src/other.ts"
}
],
- "size": 95
+ "size": 124
}
Watch Registrations::
@@ -495,7 +495,7 @@ Output::
[[90mHH:MM:SS AM[0m] Found 1 error. Watching for file changes.
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -520,7 +520,7 @@ Output::
"original": "../src/other.ts"
}
],
- "size": 109
+ "size": 138
}
Watch Registrations::
@@ -610,7 +610,7 @@ export const a = class {
//// [/user/username/projects/noEmitOnError/dev-build/src/other.d.ts] *rewrite with same content*
//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *rewrite with same content*
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -634,7 +634,7 @@ export const a = class {
"original": "../src/other.ts"
}
],
- "size": 95
+ "size": 124
}
Watch Registrations::
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError.js b/tsc/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError.js
index aaa8e5b7e2ba9..c9dc73080e6b8 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/noEmitOnError/noEmitOnError.js
@@ -66,7 +66,7 @@ interface Symbol {
}
declare const console: { log(msg: any): void; };
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -91,7 +91,7 @@ declare const console: { log(msg: any): void; };
"original": "../src/other.ts"
}
],
- "size": 109
+ "size": 138
}
Watch Registrations::
@@ -176,7 +176,7 @@ console.log("hi");
export {};
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -200,7 +200,7 @@ export {};
"original": "../src/other.ts"
}
],
- "size": 95
+ "size": 124
}
Watch Registrations::
@@ -273,7 +273,7 @@ Output::
[[90mHH:MM:SS AM[0m] Found 1 error. Watching for file changes.
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -297,7 +297,7 @@ Output::
"original": "../src/other.ts"
}
],
- "size": 117,
+ "size": 146,
"semanticErrors": true
}
@@ -374,7 +374,7 @@ export {};
//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] *rewrite with same content*
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"]}
+{"version":"FakeTSVersion","root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -398,7 +398,7 @@ export {};
"original": "../src/other.ts"
}
],
- "size": 95
+ "size": 124
}
Watch Registrations::
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js b/tsc/testdata/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js
index 08108a89f8c5e..90dfc1c9b2324 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js
@@ -62,7 +62,7 @@ import { createSomeObject } from "../Library/library";
createSomeObject().message;
//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./app.ts"]}
+{"version":"FakeTSVersion","root":["./app.ts"],"nonIncrementalFileNames":["../Library/library.d.ts"]}
//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -74,7 +74,7 @@ createSomeObject().message;
"original": "./app.ts"
}
],
- "size": 47
+ "size": 101
}
//// [/user/username/projects/sample1/Library/library.d.ts] *new*
interface SomeObject {
@@ -191,7 +191,7 @@ Output::
//// [/user/username/projects/sample1/App/app.js] *rewrite with same content*
//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./app.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./app.ts"],"semanticErrors":true,"nonIncrementalFileNames":["../Library/library.d.ts"]}
//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -203,7 +203,7 @@ Output::
"original": "./app.ts"
}
],
- "size": 69,
+ "size": 123,
"semanticErrors": true
}
//// [/user/username/projects/sample1/Library/library.d.ts] *modified*
@@ -311,7 +311,7 @@ Output::
//// [/user/username/projects/sample1/App/app.js] *rewrite with same content*
//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./app.ts"]}
+{"version":"FakeTSVersion","root":["./app.ts"],"nonIncrementalFileNames":["../Library/library.d.ts"]}
//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -323,7 +323,7 @@ Output::
"original": "./app.ts"
}
],
- "size": 47
+ "size": 101
}
//// [/user/username/projects/sample1/Library/library.d.ts] *modified*
interface SomeObject {
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/programUpdates/works-when-noUnusedParameters-changes-to-false.js b/tsc/testdata/baselines/reference/tsbuildWatch/programUpdates/works-when-noUnusedParameters-changes-to-false.js
index f13f221e58231..d45ce27aa530b 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/programUpdates/works-when-noUnusedParameters-changes-to-false.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/programUpdates/works-when-noUnusedParameters-changes-to-false.js
@@ -50,7 +50,7 @@ declare const console: { log(msg: any): void; };
const fn = (a, b) => b;
//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./index.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["./index.ts"],"semanticErrors":true,"nonIncrementalFileNames":[]}
//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -62,7 +62,7 @@ const fn = (a, b) => b;
"original": "./index.ts"
}
],
- "size": 71,
+ "size": 100,
"semanticErrors": true
}
@@ -92,7 +92,7 @@ Output::
//// [/user/username/projects/myproject/index.js] *rewrite with same content*
//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./index.ts"]}
+{"version":"FakeTSVersion","root":["./index.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -104,7 +104,7 @@ Output::
"original": "./index.ts"
}
],
- "size": 49
+ "size": 78
}
Watch Registrations::
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js b/tsc/testdata/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js
index 31ca209c41258..4f7f5dbbf2b9a 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js
@@ -253,7 +253,7 @@ let k = 0;
"size": 1117
}
//// [/user/username/projects/project/project3.tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./other2.ts"]}
+{"version":"FakeTSVersion","root":["./other2.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/project/project3.tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -265,7 +265,7 @@ let k = 0;
"original": "./other2.ts"
}
],
- "size": 50
+ "size": 79
}
Watch Registrations::
@@ -451,7 +451,7 @@ Output::
//// [/user/username/projects/project/other.js] *rewrite with same content*
//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["./other.ts"]}
+{"version":"FakeTSVersion","root":["./other.ts"],"nonIncrementalFileNames":[]}
//// [/user/username/projects/project/project2.tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -463,7 +463,7 @@ Output::
"original": "./other.ts"
}
],
- "size": 49
+ "size": 78
}
Watch Registrations::
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js b/tsc/testdata/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js
index f098000488034..f1278180cf1b8 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js
@@ -88,7 +88,7 @@ export const session = {
};
//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../../src/main/index.ts"]}
+{"version":"FakeTSVersion","root":["../../src/main/index.ts"],"nonIncrementalFileNames":["../pure/index.d.ts","../pure/session.d.ts"]}
//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -100,7 +100,7 @@ export const session = {
"original": "../../src/main/index.ts"
}
],
- "size": 62
+ "size": 134
}
//// [/user/username/projects/reexport/out/pure/index.d.ts] *new*
export * from "./session";
@@ -257,7 +257,7 @@ Output::
//// [/user/username/projects/reexport/out/main/index.js] *rewrite with same content*
//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../../src/main/index.ts"],"semanticErrors":true}
+{"version":"FakeTSVersion","root":["../../src/main/index.ts"],"semanticErrors":true,"nonIncrementalFileNames":["../pure/index.d.ts","../pure/session.d.ts"]}
//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -269,7 +269,7 @@ Output::
"original": "../../src/main/index.ts"
}
],
- "size": 84,
+ "size": 156,
"semanticErrors": true
}
//// [/user/username/projects/reexport/out/pure/index.js] *rewrite with same content*
@@ -411,7 +411,7 @@ Output::
//// [/user/username/projects/reexport/out/main/index.js] *rewrite with same content*
//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":["../../src/main/index.ts"]}
+{"version":"FakeTSVersion","root":["../../src/main/index.ts"],"nonIncrementalFileNames":["../pure/index.d.ts","../pure/session.d.ts"]}
//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
{
"version": "FakeTSVersion",
@@ -423,7 +423,7 @@ Output::
"original": "../../src/main/index.ts"
}
],
- "size": 62
+ "size": 134
}
//// [/user/username/projects/reexport/out/pure/index.js] *rewrite with same content*
//// [/user/username/projects/reexport/out/pure/session.d.ts] *modified*
diff --git a/tsc/testdata/baselines/reference/tsc/declarationEmit/reports-dts-generation-errors.js b/tsc/testdata/baselines/reference/tsc/declarationEmit/reports-dts-generation-errors.js
index 17f94f5256ff6..bf2e2afdc7e03 100644
--- a/tsc/testdata/baselines/reference/tsc/declarationEmit/reports-dts-generation-errors.js
+++ b/tsc/testdata/baselines/reference/tsc/declarationEmit/reports-dts-generation-errors.js
@@ -143,7 +143,7 @@ Found 1 error in index.ts[90m:2[0m
//// [/home/src/workspaces/project/index.js] *rewrite with same content*
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","errors":true,"root":["./index.ts"],"packageJsons":["./node_modules/ky/package.json","./package.json"],"missingPackageJsons":["./node_modules/ky/distribution/package.json"]}
+{"version":"FakeTSVersion","errors":true,"root":["./index.ts"],"packageJsons":["./node_modules/ky/package.json","./package.json"],"missingPackageJsons":["./node_modules/ky/distribution/package.json"],"nonIncrementalFileNames":["./node_modules/ky/distribution/index.d.ts"]}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -163,7 +163,7 @@ Found 1 error in index.ts[90m:2[0m
"missingPackageJsons": [
"./node_modules/ky/distribution/package.json"
],
- "size": 200
+ "size": 272
}
tsconfig.json::
From f6825f31d229c8be423255f0bf1d51acd8900100 Mon Sep 17 00:00:00 2001
From: John Favret <64748847+johnfav03@users.noreply.github.com>
Date: Thu, 29 Oct 2026 13:13:26 -0500
Subject: [PATCH 2/3] track live build-watch dependencies and aliases
---
tsc/internal/execute/build/buildtask.go | 83 +-
tsc/internal/execute/build/compilerHost.go | 13 +
tsc/internal/execute/build/host.go | 49 +-
tsc/internal/execute/build/orchestrator.go | 250 +++-
.../execute/build/watchDependencies.go | 255 +++++
.../execute/build/watchDependencies_test.go | 34 +
.../tsctests/build_watch_dependencies_test.go | 1013 +++++++++++++++++
.../tsctests/build_watch_precision_test.go | 493 ++++++++
...for-changes-to-package-json-main-fields.js | 9 +
...ge-json-lookups-from-existing-buildinfo.js | 47 +-
...t-correctly-with-cts-and-mts-extensions.js | 13 +
11 files changed, 2163 insertions(+), 96 deletions(-)
create mode 100644 tsc/internal/execute/build/watchDependencies.go
create mode 100644 tsc/internal/execute/build/watchDependencies_test.go
create mode 100644 tsc/internal/execute/tsctests/build_watch_precision_test.go
diff --git a/tsc/internal/execute/build/buildtask.go b/tsc/internal/execute/build/buildtask.go
index f34592ec8c229..30fab009926e6 100644
--- a/tsc/internal/execute/build/buildtask.go
+++ b/tsc/internal/execute/build/buildtask.go
@@ -2,7 +2,6 @@ package build
import (
"fmt"
- "slices"
"strconv"
"strings"
"sync"
@@ -65,9 +64,13 @@ type BuildTask struct {
result *taskResult
built chan struct{} // closed when result is ready to be reported
- buildInfoEntry *buildInfoEntry
- buildInfoEntryMu sync.Mutex
- packageJsons []tspath.RootedFilePath
+ buildInfoEntry *buildInfoEntry
+ buildInfoEntryMu sync.Mutex
+ packageJsons []tspath.RootedFilePath
+ watchDependencies *watchDependencies
+ changedInput tspath.RootedPath
+ inputAliasChanged bool
+ watchDependenciesDirty bool
errors []*ast.Diagnostic
pending atomic.Bool
@@ -219,6 +222,17 @@ func (t *BuildTask) updateDownstream(orchestrator *Orchestrator, path tspath.Pat
}
}
+func (t *BuildTask) captureCurrentWatchDependencies(orchestrator *Orchestrator, contentMapperProject contentmapper.Project) {
+ host := &compilerHost{
+ host: orchestrator.host,
+ trace: func(*diagnostics.Message, ...any) {},
+ contentMapperProject: contentMapperProject,
+ }
+ host.trackDependencies()
+ program := compiler.NewProgram(compiler.ProgramOptions{Config: t.resolved, Host: host})
+ t.captureWatchDependencies(orchestrator, program, host.watchFS)
+}
+
func (t *BuildTask) compileAndEmit(orchestrator *Orchestrator, path tspath.PathKey) {
t.errors = nil
if orchestrator.opts.Command.BuildOptions.Verbose.IsTrue() {
@@ -243,15 +257,24 @@ func (t *BuildTask) compileAndEmit(orchestrator *Orchestrator, path tspath.PathK
trace: tsc.GetTraceWithWriterFromSys(&t.result.builder, orchestrator.opts.Command.Locale(), orchestrator.opts.Testing),
contentMapperProject: contentMapperProject,
}
- if !orchestrator.opts.Command.BuildOptions.Force.IsTrue() {
+ // Alias changes can alter resolution diagnostics without changing the set of referenced files.
+ if !orchestrator.opts.Command.BuildOptions.Force.IsTrue() && !t.inputAliasChanged {
oldProgram = incremental.ReadBuildInfoProgram(t.resolved, orchestrator.host, compilerHost)
}
compileTimes.BuildInfoReadTime = orchestrator.opts.Sys.Now().Sub(buildInfoReadStart)
+ compilerHost.trackDependencies()
parseStart := orchestrator.opts.Sys.Now()
program := compiler.NewProgram(compiler.ProgramOptions{
Config: t.resolved,
Host: compilerHost,
})
+ if t.captureWatchDependencies(orchestrator, program, compilerHost.watchFS) {
+ if t.inputAliasChanged {
+ oldProgram = nil
+ }
+ t.changedInput = ""
+ t.inputAliasChanged = false
+ }
compileTimes.ParseTime = orchestrator.opts.Sys.Now().Sub(parseStart)
changesComputeStart := orchestrator.opts.Sys.Now()
t.result.program = incremental.NewProgram(program, oldProgram, orchestrator.host, orchestrator.opts.Sys.Now, orchestrator.opts.Testing != nil)
@@ -621,8 +644,41 @@ func (t *BuildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tsp
return &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{packageJson.AsPath(), oldestOutputFileAndTime.file}}
}
}
- t.packageJsons = slices.Collect(buildInfo.GetPackageJsons(getBuildInfoDirectory()))
- t.packageJsons = append(t.packageJsons, slices.Collect(buildInfo.GetMissingPackageJsons(getBuildInfoDirectory()))...)
+
+ if t.changedInput != "" {
+ if !orchestrator.host.FS().FileExists(tspath.RootedFilePathFromPath(t.changedInput)) &&
+ !orchestrator.host.FS().DirectoryExists(tspath.RootedDirectoryPathFromPath(t.changedInput)) {
+ return &upToDateStatus{kind: upToDateStatusTypeInputFileMissing, data: tspath.RootedFilePathFromPath(t.changedInput)}
+ }
+ return &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{t.changedInput, buildInfoPath}}
+ }
+
+ if orchestrator.opts.Command.CompilerOptions.Watch.IsTrue() {
+ if t.watchDependencies == nil || t.watchDependenciesDirty {
+ t.captureCurrentWatchDependencies(orchestrator, contentMapperProject)
+ }
+ if input := t.watchDependencies.changedInputAlias(orchestrator, nil); input != "" {
+ t.changedInput = input
+ t.inputAliasChanged = true
+ }
+ if t.inputAliasChanged {
+ return &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{t.changedInput, buildInfoPath}}
+ }
+ if !t.resolved.CompilerOptions().IsIncremental() && t.watchDependencies != nil {
+ for path, file := range t.watchDependencies.inputs {
+ if seenRoots.Has(path) {
+ continue
+ }
+ inputTime := orchestrator.host.GetMTime(file)
+ if inputTime.IsZero() {
+ return &upToDateStatus{kind: upToDateStatusTypeInputFileMissing, data: file}
+ }
+ if inputTime.After(oldestOutputFileAndTime.time) {
+ return &upToDateStatus{kind: upToDateStatusTypeInputFileNewer, data: &inputOutputName{file.AsPath(), oldestOutputFileAndTime.file}}
+ }
+ }
+ }
+ }
return &upToDateStatus{
kind: core.IfElse(
@@ -858,9 +914,21 @@ func (t *BuildTask) resetStatus() {
func (t *BuildTask) resetConfig(orchestrator *Orchestrator, path tspath.PathKey) {
t.dirty = true
+ // Keep the last valid inventory and pending invalidation until a valid capture.
+ t.watchDependenciesDirty = true
orchestrator.host.resolvedReferences.delete(path)
}
+func (t *BuildTask) invalidateWatchDependencies(input tspath.RootedPath, aliasChanged bool) {
+ t.resetStatus()
+ t.built = make(chan struct{})
+ t.done = make(chan struct{})
+ if input != "" {
+ t.changedInput = input
+ }
+ t.inputAliasChanged = t.inputAliasChanged || aliasChanged
+}
+
func (t *BuildTask) loadOrStoreBuildInfo(orchestrator *Orchestrator, buildInfoFileName tspath.RootedFilePath) (*incremental.BuildInfo, time.Time) {
path := orchestrator.caseSensitivity.PathKey(tspath.RootedPath(buildInfoFileName))
t.buildInfoEntryMu.Lock()
@@ -931,6 +999,7 @@ func (t *BuildTask) storeOutputTimeStamp(orchestrator *Orchestrator) bool {
func (t *BuildTask) writeFile(orchestrator *Orchestrator, fileName tspath.RootedFilePath, text string, data *compiler.WriteFileData) error {
err := orchestrator.host.FS().WriteFile(fileName, text)
if err == nil {
+ orchestrator.host.invalidateSourceFile(fileName)
if data != nil && data.BuildInfo != nil {
t.onBuildInfoEmit(orchestrator, fileName, data.BuildInfo.(*incremental.BuildInfo), t.result.program.HasChangedDtsFile())
} else if t.storeOutputTimeStamp(orchestrator) {
diff --git a/tsc/internal/execute/build/compilerHost.go b/tsc/internal/execute/build/compilerHost.go
index 566a99cdce2e7..8af4f86f45a87 100644
--- a/tsc/internal/execute/build/compilerHost.go
+++ b/tsc/internal/execute/build/compilerHost.go
@@ -14,14 +14,23 @@ type compilerHost struct {
host *host
trace func(msg *diagnostics.Message, args ...any)
contentMapperProject contentmapper.Project
+ watchFS *dependencyTrackingFS
}
var _ compiler.CompilerHost = (*compilerHost)(nil)
func (h *compilerHost) FS() vfs.FS {
+ if h.watchFS != nil {
+ return h.watchFS
+ }
return h.host.FS()
}
+func (h *compilerHost) trackDependencies() {
+ h.watchFS = &dependencyTrackingFS{}
+ h.watchFS.Inner = h.host.FS()
+}
+
func (h *compilerHost) DefaultLibraryPath() tspath.RootedDirectoryPath {
return h.host.DefaultLibraryPath()
}
@@ -31,6 +40,10 @@ func (h *compilerHost) Trace(msg *diagnostics.Message, args ...any) {
}
func (h *compilerHost) GetSourceFile(opts ast.SourceFileParseOptions) *ast.SourceFile {
+ if h.watchFS != nil {
+ h.watchFS.SeenFiles.Add(opts.FileName.AsPath())
+ h.watchFS.Realpath(opts.FileName.AsPath())
+ }
return h.host.GetSourceFile(opts)
}
diff --git a/tsc/internal/execute/build/host.go b/tsc/internal/execute/build/host.go
index 5949d952d7043..2b0ded2d585d7 100644
--- a/tsc/internal/execute/build/host.go
+++ b/tsc/internal/execute/build/host.go
@@ -1,6 +1,7 @@
package build
import (
+ "sync"
"time"
"github.com/microsoft/TypeScript/tsc/internal/ast"
@@ -20,15 +21,21 @@ type host struct {
host compiler.CompilerHost
// Caches that last only for build cycle and then cleared out
- extendedConfigCache tsc.ExtendedConfigCache
- sourceFiles parseCache[ast.SourceFileParseOptions, *ast.SourceFile]
- configTimes collections.SyncMap[tspath.PathKey, time.Duration]
+ extendedConfigCache tsc.ExtendedConfigCache
+ sourceFiles parseCache[ast.SourceFileParseOptions, *ast.SourceFile]
+ sourceFileIdentities collections.SyncMap[tspath.PathKey, *sourceFileIdentity]
+ configTimes collections.SyncMap[tspath.PathKey, time.Duration]
// caches that stay as long as they are needed
resolvedReferences parseCache[tspath.PathKey, *tsoptions.ParsedCommandLine]
mTimes *collections.SyncMap[tspath.PathKey, time.Time]
}
+type sourceFileIdentity struct {
+ mu sync.Mutex
+ options map[ast.SourceFileParseOptions]struct{}
+}
+
var (
_ compiler.CompilerHost = (*host)(nil)
_ incremental.BuildInfoReader = (*host)(nil)
@@ -48,11 +55,39 @@ func (h *host) Trace(msg *diagnostics.Message, args ...any) {
}
func (h *host) GetSourceFile(opts ast.SourceFileParseOptions) *ast.SourceFile {
- if opts.FileName.IsDeclarationFile() || opts.FileName.ExtensionIs(tspath.ExtensionJson) {
- // Cache dts and json files as they will be reused
- return h.sourceFiles.loadOrStore(opts, h.host.GetSourceFile, false /* allowZero */)
+ if !isCachedSourceFile(opts.FileName) {
+ return h.host.GetSourceFile(opts)
+ }
+ // Cache dts and json files as they will be reused. Serialize cache access for
+ // aliases of the same physical file so an emitted replacement cannot race
+ // with insertion under a logical symlink path.
+ path := h.orchestrator.caseSensitivity.PathKey(h.FS().Realpath(opts.FileName.AsPath()))
+ identity, _ := h.sourceFileIdentities.LoadOrStore(path, &sourceFileIdentity{
+ options: make(map[ast.SourceFileParseOptions]struct{}),
+ })
+ identity.mu.Lock()
+ defer identity.mu.Unlock()
+ identity.options[opts] = struct{}{}
+ return h.sourceFiles.loadOrStore(opts, h.host.GetSourceFile, false /* allowZero */)
+}
+
+func (h *host) invalidateSourceFile(fileName tspath.RootedFilePath) {
+ if !isCachedSourceFile(fileName) {
+ return
}
- return h.host.GetSourceFile(opts)
+ path := h.orchestrator.caseSensitivity.PathKey(h.FS().Realpath(fileName.AsPath()))
+ if identity, ok := h.sourceFileIdentities.Load(path); ok {
+ identity.mu.Lock()
+ for opts := range identity.options {
+ h.sourceFiles.delete(opts)
+ }
+ clear(identity.options)
+ identity.mu.Unlock()
+ }
+}
+
+func isCachedSourceFile(fileName tspath.RootedFilePath) bool {
+ return fileName.IsDeclarationFile() || fileName.ExtensionIs(tspath.ExtensionJson)
}
func (h *host) GetContentMappedSourceFiles(parseOptions ast.SourceFileParseOptions, mapper *contentmapper.Mapper) (contentmapper.SourceFiles, error) {
diff --git a/tsc/internal/execute/build/orchestrator.go b/tsc/internal/execute/build/orchestrator.go
index 664e47844616e..0abda9d53331c 100644
--- a/tsc/internal/execute/build/orchestrator.go
+++ b/tsc/internal/execute/build/orchestrator.go
@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"io"
+ "maps"
"slices"
"strings"
"sync/atomic"
@@ -177,6 +178,7 @@ func (o *Orchestrator) createBuildTasks(oldTasks *collections.SyncMap[tspath.Pat
path := o.caseSensitivity.PathKey(tspath.RootedPath(config))
var task *BuildTask
var buildInfo *buildInfoEntry
+ var previous *BuildTask
if oldTasks != nil {
if existing, ok := oldTasks.Load(path); ok {
if !existing.dirty {
@@ -187,6 +189,7 @@ func (o *Orchestrator) createBuildTasks(oldTasks *collections.SyncMap[tspath.Pat
_ = existing.contentMapperProject.Close()
}
buildInfo = existing.buildInfoEntry
+ previous = existing
}
}
}
@@ -194,6 +197,12 @@ func (o *Orchestrator) createBuildTasks(oldTasks *collections.SyncMap[tspath.Pat
task = &BuildTask{config: config, path: path, isInitialCycle: oldTasks == nil}
task.pending.Store(true)
task.buildInfoEntry = buildInfo
+ if previous != nil {
+ task.watchDependencies = previous.watchDependencies
+ task.watchDependenciesDirty = previous.watchDependenciesDirty
+ task.changedInput = previous.changedInput
+ task.inputAliasChanged = previous.inputAliasChanged
+ }
}
if _, loaded := o.tasks.LoadOrStore(path, task); loaded {
return
@@ -509,6 +518,7 @@ func (o *Orchestrator) resetCaches() {
cachesVfs.ClearCache()
o.host.extendedConfigCache = tsc.ExtendedConfigCache{}
o.host.sourceFiles.reset()
+ o.host.sourceFileIdentities = collections.SyncMap[tspath.PathKey, *sourceFileIdentity]{}
o.host.configTimes = collections.SyncMap[tspath.PathKey, time.Duration]{}
}
@@ -522,47 +532,38 @@ func (o *Orchestrator) checkTasksForEventChanges(changedPaths map[tspath.RootedP
task := o.order[i]
path := task.path
- if _, changed := normalizedPaths[path]; changed {
- task.resetConfig(o, path)
- needsConfigUpdate.Store(true)
+ if input := task.watchDependencies.changedInputAlias(o, normalizedPaths); input != "" {
+ task.invalidateWatchDependencies(input, true)
needsUpdate.Store(true)
- continue
}
-
+ _, configChanged := normalizedPaths[path]
if task.resolved == nil {
+ if configChanged {
+ task.resetConfig(o, path)
+ needsConfigUpdate.Store(true)
+ needsUpdate.Store(true)
+ }
continue
}
- configChanged := false
+ handled := collections.NewSetFromItems(path)
for _, file := range task.resolved.ExtendedSourceFiles() {
fp := o.caseSensitivity.PathKey(tspath.RootedPath(file))
+ handled.Add(fp)
if _, changed := normalizedPaths[fp]; changed {
- task.resetConfig(o, path)
- needsConfigUpdate.Store(true)
- needsUpdate.Store(true)
configChanged = true
- break
}
}
- if configChanged {
- continue
- }
for _, mapper := range task.resolved.ContentMappers() {
if mapper.PackageDirectory == "" || mapper.ContributionID != "" {
continue
}
manifestPath := o.caseSensitivity.PathKey(tspath.RootedPath(mapper.PackageDirectory.ResolveFile("package.json")))
+ handled.Add(manifestPath)
if _, changed := normalizedPaths[manifestPath]; changed {
- task.resetConfig(o, path)
- needsConfigUpdate.Store(true)
- needsUpdate.Store(true)
configChanged = true
- break
}
}
- if configChanged {
- continue
- }
rootChanged := false
if task.contentMapperProject != nil {
@@ -597,50 +598,77 @@ func (o *Orchestrator) checkTasksForEventChanges(changedPaths map[tspath.RootedP
}
}
- if !rootChanged {
- task.buildInfoEntryMu.Lock()
- bi := task.buildInfoEntry
- task.buildInfoEntryMu.Unlock()
- if bi != nil && bi.buildInfo != nil {
- buildInfoDir := bi.fileName.Directory()
- for _, fileName := range bi.buildInfo.FileNames {
- fp := o.caseSensitivity.PathKey(tspath.RootedPath(incremental.ResolveBuildInfoFileName(fileName, buildInfoDir, o.host.DefaultLibraryPath())))
- if roots.Has(fp) {
- continue
- }
- if _, changed := normalizedPaths[fp]; changed {
- task.resetStatus()
- needsUpdate.Store(true)
- break
- }
+ task.buildInfoEntryMu.Lock()
+ bi := task.buildInfoEntry
+ task.buildInfoEntryMu.Unlock()
+ if bi != nil && bi.buildInfo != nil {
+ buildInfoDir := bi.fileName.Directory()
+ for _, fileName := range bi.buildInfo.FileNames {
+ fp := o.caseSensitivity.PathKey(tspath.RootedPath(incremental.ResolveBuildInfoFileName(fileName, buildInfoDir, o.host.DefaultLibraryPath())))
+ if roots.Has(fp) {
+ continue
}
- for packageJson := range bi.buildInfo.GetPackageJsons(buildInfoDir) {
- if o.packageJsonLookupChanged(packageJson, normalizedPaths) {
- task.resetStatus()
- needsUpdate.Store(true)
- break
- }
+ if _, changed := normalizedPaths[fp]; changed {
+ task.resetStatus()
+ handled.Add(fp)
+ needsUpdate.Store(true)
+ break
}
- for packageJson := range bi.buildInfo.GetMissingPackageJsons(buildInfoDir) {
- if o.packageJsonLookupChanged(packageJson, normalizedPaths) {
- task.resetStatus()
- needsUpdate.Store(true)
- break
- }
+ }
+ // Classify every ordinary lookup, even when another event already reset the task.
+ for packageJson := range bi.buildInfo.GetPackageJsons(buildInfoDir) {
+ if o.packageJsonLookupChanged(packageJson, normalizedPaths, handled) {
+ task.resetStatus()
+ needsUpdate.Store(true)
}
}
- for _, packageJson := range task.packageJsons {
- if o.packageJsonLookupChanged(packageJson, normalizedPaths) {
+ for packageJson := range bi.buildInfo.GetMissingPackageJsons(buildInfoDir) {
+ if o.packageJsonLookupChanged(packageJson, normalizedPaths, handled) {
task.resetStatus()
needsUpdate.Store(true)
+ }
+ }
+ }
+ for _, packageJson := range task.packageJsons {
+ if o.packageJsonLookupChanged(packageJson, normalizedPaths, handled) {
+ task.resetStatus()
+ needsUpdate.Store(true)
+ }
+ }
+ input, changed, aliasChanged := task.watchDependencies.changed(o, normalizedPaths, roots, handled)
+ if !changed && task.watchDependencies != nil && bi != nil {
+ // Directory notifications can replace consumed children without naming them.
+ for inputPath, inputFile := range task.watchDependencies.lookups {
+ if !task.watchDependencies.inputPaths.Has(inputPath) && task.watchDependencies.inputAliases[inputPath].realPath == "" {
+ continue
+ }
+ for eventPath := range normalizedPaths {
+ if eventPath != inputPath && eventPath.ContainsPath(inputPath) {
+ inputTime := o.host.loadOrStoreMTime(tspath.RootedFilePathFromPath(inputFile), nil, false)
+ changed = inputTime.IsZero() || inputTime.After(bi.mTime)
+ break
+ }
+ }
+ if changed {
break
}
}
}
+ if changed {
+ task.invalidateWatchDependencies(input, aliasChanged)
+ needsUpdate.Store(true)
+ }
task.built = make(chan struct{})
task.done = make(chan struct{})
+ if configChanged {
+ task.resetConfig(o, path)
+ needsConfigUpdate.Store(true)
+ needsUpdate.Store(true)
+ continue
+ }
+
newConfig := task.resolved.ReloadFileNamesOfParsedCommandLine(o.host.FS())
if !slices.Equal(task.resolved.FileNames(), newConfig.FileNames()) {
o.host.resolvedReferences.store(path, newConfig)
@@ -655,11 +683,17 @@ func (o *Orchestrator) checkTasksForEventChanges(changedPaths map[tspath.RootedP
if o.host.FS().DirectoryExists(tspath.RootedDirectoryPathFromPath(eventPath)) {
if o.wm.IsPathUnderWatch(eventPath) {
o.rangeTask(func(path tspath.PathKey, task *BuildTask) {
+ if task.watchDependencies != nil {
+ return
+ }
+ if task.resolved != nil && len(task.resolved.FileNames()) == 0 && task.resolved.ProjectReferences() != nil {
+ return
+ }
task.resetStatus()
task.built = make(chan struct{})
task.done = make(chan struct{})
+ needsUpdate.Store(true)
})
- needsUpdate.Store(true)
break
}
}
@@ -667,17 +701,20 @@ func (o *Orchestrator) checkTasksForEventChanges(changedPaths map[tspath.RootedP
}
}
-func (o *Orchestrator) packageJsonLookupChanged(packageJson tspath.RootedFilePath, changedPaths map[tspath.PathKey]fswatch.EventKind) bool {
+func (o *Orchestrator) packageJsonLookupChanged(packageJson tspath.RootedFilePath, changedPaths map[tspath.PathKey]fswatch.EventKind, handled *collections.Set[tspath.PathKey]) bool {
packageJsonPath := o.caseSensitivity.PathKey(tspath.RootedPath(packageJson))
- if _, changed := changedPaths[packageJsonPath]; changed {
- return true
+ changed := false
+ if _, present := changedPaths[packageJsonPath]; present {
+ handled.Add(packageJsonPath)
+ changed = true
}
for changedPath, kind := range changedPaths {
if kind == fswatch.EventDelete && changedPath.ContainsPath(packageJsonPath) {
- return true
+ handled.Add(changedPath)
+ changed = true
}
}
- return false
+ return changed
}
func (o *Orchestrator) computeDesiredWatches() map[tspath.RootedDirectoryPath]bool {
@@ -692,6 +729,7 @@ func (o *Orchestrator) computeDesiredWatches() map[tspath.RootedDirectoryPath]bo
desiredDirs.Set(realConfigDir, false)
if task.resolved == nil {
+ o.addDependencyWatchDirs(desiredDirs, configDir, task.watchDependencies)
continue
}
@@ -751,6 +789,9 @@ func (o *Orchestrator) computeDesiredWatches() map[tspath.RootedDirectoryPath]bo
}
o.addProgramFileWatchDir(desiredDirs, absPath.Directory())
}
+ for fileName := range bi.buildInfo.GetNonIncrementalFileNames(buildInfoDir) {
+ o.addProgramFileWatchDir(desiredDirs, o.host.FS().Realpath(fileName.AsPath()).Directory())
+ }
for packageJson := range bi.buildInfo.GetPackageJsons(buildInfoDir) {
o.addPackageJsonWatchDirs(desiredDirs, packageJson)
}
@@ -761,11 +802,68 @@ func (o *Orchestrator) computeDesiredWatches() map[tspath.RootedDirectoryPath]bo
for _, packageJson := range task.packageJsons {
o.addPackageJsonWatchDirs(desiredDirs, packageJson)
}
+ o.addDependencyWatchDirs(desiredDirs, configDir, task.watchDependencies)
}
return o.wm.ResolveDesiredDirs(desiredDirs.Dirs())
}
+func (o *Orchestrator) addDependencyWatchDirs(desiredDirs *watchmanager.DirWatchSet, configDir tspath.RootedDirectoryPath, dependencies *watchDependencies) {
+ if dependencies == nil {
+ return
+ }
+ o.addKnownDependencyWatchDirs(desiredDirs, dependencies)
+ o.addResidualDependencyWatchDirs(desiredDirs, configDir, dependencies)
+}
+
+func (o *Orchestrator) addKnownDependencyWatchDirs(desiredDirs *watchmanager.DirWatchSet, dependencies *watchDependencies) {
+ for _, file := range dependencies.inputs {
+ o.addProgramFileWatchDir(desiredDirs, o.host.FS().Realpath(file.AsPath()).Directory())
+ }
+ for _, alias := range dependencies.inputAliases {
+ o.addProgramFileWatchDir(desiredDirs, alias.file.Directory())
+ if realPath := dependencies.lookups[alias.realPath]; realPath != "" {
+ o.addProgramFileWatchDir(desiredDirs, realPath.Directory())
+ }
+ }
+}
+
+func (o *Orchestrator) addResidualDependencyWatchDirs(desiredDirs *watchmanager.DirWatchSet, configDir tspath.RootedDirectoryPath, dependencies *watchDependencies) {
+ for _, enumeration := range dependencies.enumerations {
+ o.addWatchDir(desiredDirs, tspath.RootedDirectoryPathFromPath(o.host.FS().Realpath(enumeration.directory.AsPath())))
+ }
+ for dir := range dependencies.relativeDirectories.Keys() {
+ exists := o.host.FS().DirectoryExists(dir)
+ for !o.host.FS().DirectoryExists(dir) {
+ parent := dir.AsPath().Directory()
+ if parent == dir {
+ break
+ }
+ dir = parent
+ }
+ // A missing relative import can share the project's immediate parent, unlike generic package lookup ancestors.
+ if exists || watchmanager.CanWatchDirectory(dir) || (dir == configDir.AsPath().Directory() && len(dir.Components()) > 2) {
+ o.addProgramFileWatchDir(desiredDirs, dir)
+ }
+ }
+ aliasTargets := collections.NewSetWithSizeHint[tspath.PathKey](len(dependencies.inputAliases))
+ for _, alias := range dependencies.inputAliases {
+ aliasTargets.Add(alias.realPath)
+ }
+ for path, lookup := range dependencies.lookups {
+ if dependencies.inputPaths.Has(path) {
+ continue
+ }
+ if alias, ok := dependencies.inputAliases[path]; ok && alias.file != "" {
+ continue
+ }
+ if aliasTargets.Has(path) {
+ continue
+ }
+ o.addWatchDir(desiredDirs, o.host.FS().Realpath(lookup).Directory())
+ }
+}
+
func (o *Orchestrator) addWatchDir(desiredDirs *watchmanager.DirWatchSet, dir tspath.RootedDirectoryPath) {
if !desiredDirs.Covered(dir) && watchmanager.CanWatchDirectory(dir) {
desiredDirs.Set(dir, false)
@@ -814,13 +912,39 @@ func (o *Orchestrator) DoCycle() {
defer o.wm.Unlock()
changedPaths, overflow := o.wm.DrainEvents()
+ for {
+ if !o.doCycle(changedPaths, overflow) {
+ return
+ }
+ // An alias target can appear after event classification but before its logical watch is installed.
+ // Recheck aliases with fresh caches once those watches are active.
+ changedPaths = make(map[tspath.RootedPath]fswatch.EventKind)
+ o.rangeTask(func(_ tspath.PathKey, task *BuildTask) {
+ if !task.watchDependenciesDirty && !task.inputAliasChanged {
+ if input := task.watchDependencies.changedInputAlias(o, nil); input != "" {
+ changedPaths[input] = fswatch.EventUpdate
+ }
+ }
+ })
+ o.resetCaches()
+ if len(changedPaths) == 0 {
+ return
+ }
+ // Coalesce notifications already queued for the alias change we just observed.
+ queuedPaths, queuedOverflow := o.wm.DrainEvents()
+ maps.Copy(changedPaths, queuedPaths)
+ overflow = queuedOverflow
+ }
+}
+
+func (o *Orchestrator) doCycle(changedPaths map[tspath.RootedPath]fswatch.EventKind, overflow bool) bool {
hasEvents := len(changedPaths) > 0 || overflow
if !hasEvents {
if o.wm.DebugLog != nil {
fmt.Fprintf(o.wm.DebugLog, "[watch] DoCycle: no events, skipping\n")
}
- return
+ return false
}
var needsConfigUpdate atomic.Bool
@@ -829,6 +953,9 @@ func (o *Orchestrator) DoCycle() {
if overflow {
// Overflow: reset all tasks to force a full rebuild.
o.rangeTask(func(path tspath.PathKey, task *BuildTask) {
+ if input := task.watchDependencies.changedInputAlias(o, nil); input != "" {
+ task.invalidateWatchDependencies(input, true)
+ }
task.resetConfig(o, path)
task.built = make(chan struct{})
task.done = make(chan struct{})
@@ -842,7 +969,7 @@ func (o *Orchestrator) DoCycle() {
if !needsUpdate.Load() {
o.resetCaches()
- return
+ return false
}
o.watchStatusReporter(ast.NewCompilerDiagnostic(diagnostics.File_change_detected_Starting_incremental_compilation))
@@ -853,13 +980,18 @@ func (o *Orchestrator) DoCycle() {
o.buildOrClean()
o.updateWatch()
+ o.reconcileWatches()
+ o.resetCaches()
+ return true
+}
+
+func (o *Orchestrator) reconcileWatches() {
desiredDirs := o.computeDesiredWatches()
if err := o.wm.ReconcileWatches(desiredDirs); err != nil {
fmt.Fprintf(o.opts.Sys.Writer(), "%v\n", err)
// Mark overflow so the next event triggers a full rebuild
o.wm.ForceOverflow()
}
- o.resetCaches()
}
func (o *Orchestrator) buildOrClean() tsc.CommandLineResult {
diff --git a/tsc/internal/execute/build/watchDependencies.go b/tsc/internal/execute/build/watchDependencies.go
new file mode 100644
index 0000000000000..b301058b128f3
--- /dev/null
+++ b/tsc/internal/execute/build/watchDependencies.go
@@ -0,0 +1,255 @@
+package build
+
+import (
+ "maps"
+ "slices"
+
+ "github.com/microsoft/TypeScript/tsc/internal/collections"
+ "github.com/microsoft/TypeScript/tsc/internal/compiler"
+ "github.com/microsoft/TypeScript/tsc/internal/core"
+ "github.com/microsoft/TypeScript/tsc/internal/fswatch"
+ "github.com/microsoft/TypeScript/tsc/internal/module"
+ "github.com/microsoft/TypeScript/tsc/internal/tsoptions"
+ "github.com/microsoft/TypeScript/tsc/internal/tspath"
+ "github.com/microsoft/TypeScript/tsc/internal/vfs"
+ "github.com/microsoft/TypeScript/tsc/internal/vfs/trackingvfs"
+)
+
+type dependencyTrackingFS struct {
+ trackingvfs.FS
+ directories collections.SyncSet[tspath.RootedDirectoryPath]
+ enumerations collections.SyncMap[tspath.RootedDirectoryPath, []string]
+ realpaths collections.SyncMap[tspath.RootedPath, tspath.RootedPath]
+}
+
+func (f *dependencyTrackingFS) Realpath(path tspath.RootedPath) tspath.RootedPath {
+ realPath := f.FS.Realpath(path)
+ // Keep the identity consumed by resolution, not a later retarget before inventory capture.
+ f.realpaths.LoadOrStore(path, realPath)
+ return realPath
+}
+
+func (f *dependencyTrackingFS) DirectoryExists(path tspath.RootedDirectoryPath) bool {
+ f.directories.Add(path)
+ return f.FS.DirectoryExists(path)
+}
+
+func (f *dependencyTrackingFS) GetAccessibleEntries(path tspath.RootedDirectoryPath) vfs.Entries {
+ f.directories.Add(path)
+ entries := f.FS.GetAccessibleEntries(path)
+ directories := slices.Clone(entries.Directories)
+ slices.Sort(directories)
+ f.enumerations.Store(path, directories)
+ return entries
+}
+
+type directoryDependency struct {
+ directory tspath.RootedDirectoryPath
+ entries []string
+}
+
+type inputAlias struct {
+ file tspath.RootedFilePath
+ realPath tspath.PathKey
+}
+
+type watchDependencies struct {
+ inputs map[tspath.PathKey]tspath.RootedFilePath
+ inputPaths collections.Set[tspath.PathKey]
+ inputAliases map[tspath.PathKey]inputAlias
+ lookups map[tspath.PathKey]tspath.RootedPath
+ missingDirectories []tspath.PathKey
+ relativeDirectories collections.Set[tspath.RootedDirectoryPath]
+ enumerations map[tspath.PathKey]directoryDependency
+ referenceSources collections.Set[tspath.PathKey]
+}
+
+func (d *watchDependencies) addInputAlias(o *Orchestrator, path, realPath tspath.RootedPath) {
+ key := o.caseSensitivity.PathKey(path)
+ realKey := o.caseSensitivity.PathKey(realPath)
+ if key != realKey && d.inputPaths.Has(realKey) && !d.referenceSources.Has(key) && !d.referenceSources.Has(realKey) {
+ d.inputAliases[key] = inputAlias{tspath.RootedFilePathFromPath(path), realKey}
+ }
+}
+
+func (d *watchDependencies) addLookup(o *Orchestrator, path tspath.RootedPath) {
+ if d.referenceSources.Has(o.caseSensitivity.PathKey(path)) {
+ return
+ }
+ d.lookups[o.caseSensitivity.PathKey(path)] = path
+ realPath := o.host.FS().Realpath(path)
+ d.lookups[o.caseSensitivity.PathKey(realPath)] = realPath
+}
+
+func (t *BuildTask) captureWatchDependencies(o *Orchestrator, program *compiler.Program, fs *dependencyTrackingFS) bool {
+ if fs == nil || len(t.resolved.GetConfigFileParsingDiagnostics()) != 0 {
+ return false
+ }
+ dependencies := &watchDependencies{
+ inputs: make(map[tspath.PathKey]tspath.RootedFilePath),
+ inputAliases: make(map[tspath.PathKey]inputAlias),
+ lookups: make(map[tspath.PathKey]tspath.RootedPath),
+ enumerations: make(map[tspath.PathKey]directoryDependency),
+ }
+ program.RangeResolvedProjectReference(func(_ tspath.PathKey, config, _ *tsoptions.ParsedCommandLine, _ int) bool {
+ if config == nil {
+ return true
+ }
+ for _, file := range config.FileNames() {
+ dependencies.referenceSources.Add(o.caseSensitivity.PathKey(file.AsPath()))
+ dependencies.referenceSources.Add(o.caseSensitivity.PathKey(o.host.FS().Realpath(file.AsPath())))
+ }
+ return true
+ })
+ for _, file := range program.GetSourceFiles() {
+ if lib := program.GetDefaultLibFile(file.PathKey()); lib != nil && !lib.Replaced {
+ continue
+ }
+ if o.host.FS().FileExists(file.FileName()) {
+ realPath, observed := fs.realpaths.Load(file.FileName().AsPath())
+ if !observed {
+ realPath = o.host.FS().Realpath(file.FileName().AsPath())
+ }
+ realPathKey := o.caseSensitivity.PathKey(realPath)
+ if dependencies.referenceSources.Has(file.PathKey()) || dependencies.referenceSources.Has(realPathKey) {
+ continue
+ }
+ dependencies.inputs[file.PathKey()] = file.FileName()
+ dependencies.inputPaths.Add(file.PathKey())
+ dependencies.inputPaths.Add(realPathKey)
+ dependencies.addLookup(o, file.FileName().AsPath())
+ }
+ }
+ fs.realpaths.Range(func(path, realPath tspath.RootedPath) bool {
+ dependencies.addInputAlias(o, path, realPath)
+ return true
+ })
+ for _, path := range fs.SeenFiles.ToSlice() {
+ if o.caseSensitivity.ContainsPath(o.host.DefaultLibraryPath(), path) {
+ continue
+ }
+ if o.host.FS().DirectoryExists(tspath.RootedDirectoryPathFromPath(path)) {
+ continue
+ }
+ dependencies.addLookup(o, path)
+ }
+ for _, dir := range fs.directories.ToSlice() {
+ for !o.host.FS().DirectoryExists(dir) {
+ dependencies.missingDirectories = append(dependencies.missingDirectories, o.caseSensitivity.PathKey(dir.AsPath()))
+ dependencies.addLookup(o, dir.AsPath())
+ parent := dir.AsPath().Directory()
+ if parent == dir {
+ break
+ }
+ dir = parent
+ }
+ }
+ program.ForEachResolvedModule(func(_ *module.ResolvedModule, name string, _ core.ResolutionMode, file tspath.PathKey) {
+ if tspath.IsExternalModuleNameRelative(name) {
+ dependencies.relativeDirectories.Add(program.GetSourceFileByPath(file).FileName().Directory().ResolveFile(name).Directory())
+ }
+ }, nil)
+ fs.enumerations.Range(func(dir tspath.RootedDirectoryPath, entries []string) bool {
+ dependency := directoryDependency{dir, entries}
+ dependencies.enumerations[o.caseSensitivity.PathKey(dir.AsPath())] = dependency
+ dependencies.enumerations[o.caseSensitivity.PathKey(o.host.FS().Realpath(dir.AsPath()))] = dependency
+ return true
+ })
+ if t.watchDependencies != nil {
+ for path, alias := range t.watchDependencies.inputAliases {
+ _, observed := dependencies.lookups[path]
+ for _, directory := range dependencies.missingDirectories {
+ observed = observed || directory.ContainsPath(path)
+ }
+ if observed && !o.host.FS().FileExists(alias.file) {
+ // Resolution can stop at a missing parent before probing the alias itself.
+ dependencies.inputAliases[path] = inputAlias{file: alias.file}
+ }
+ }
+ for path, current := range dependencies.inputAliases {
+ if current.realPath != t.watchDependencies.inputAliases[path].realPath {
+ // The topology may change after event classification but before resolution consumes it.
+ t.changedInput = current.file.AsPath()
+ t.inputAliasChanged = true
+ }
+ }
+ }
+ t.watchDependencies = dependencies
+ t.watchDependenciesDirty = false
+ return true
+}
+
+func (d *watchDependencies) changedInputAlias(o *Orchestrator, paths map[tspath.PathKey]fswatch.EventKind) tspath.RootedPath {
+ if d == nil {
+ return ""
+ }
+ for _, path := range slices.Sorted(maps.Keys(d.inputAliases)) {
+ affected := paths == nil
+ for eventPath := range paths {
+ if eventPath.ContainsPath(path) {
+ affected = true
+ break
+ }
+ }
+ if affected {
+ alias := d.inputAliases[path]
+ // Event classification must not cache a negative probe before the child is created.
+ fs := o.opts.Sys.FS()
+ exists := fs.FileExists(alias.file)
+ if (alias.realPath == "" && exists) ||
+ (alias.realPath != "" && (!exists || o.caseSensitivity.PathKey(fs.Realpath(alias.file.AsPath())) != alias.realPath)) {
+ return alias.file.AsPath()
+ }
+ }
+ }
+ return ""
+}
+
+func (d *watchDependencies) changed(o *Orchestrator, paths map[tspath.PathKey]fswatch.EventKind, roots, handled *collections.Set[tspath.PathKey]) (input tspath.RootedPath, changed, aliasChanged bool) {
+ if d == nil {
+ return "", false, false
+ }
+ if alias := d.changedInputAlias(o, paths); alias != "" {
+ return alias, true, true
+ }
+ eventPaths := slices.Sorted(maps.Keys(paths))
+ inputChanged := false
+ for _, path := range eventPaths {
+ kind := paths[path]
+ if roots.Has(path) || handled.Has(path) {
+ continue
+ }
+ if d.inputPaths.Has(path) || d.inputAliases[path].file != "" {
+ // Consumed inputs and unchanged aliases share the normal timestamp/hash checks.
+ inputChanged = true
+ continue
+ }
+ if lookup, ok := d.lookups[path]; ok {
+ return lookup, true, false
+ }
+ if kind == fswatch.EventDelete {
+ for _, dependency := range slices.Sorted(maps.Keys(d.lookups)) {
+ if path.ContainsPath(dependency) {
+ return d.lookups[dependency], true, false
+ }
+ }
+ }
+ for _, dir := range d.missingDirectories {
+ if dir.ContainsPath(path) {
+ return d.lookups[dir], true, false
+ }
+ }
+ for _, key := range slices.Sorted(maps.Keys(d.enumerations)) {
+ enumeration := d.enumerations[key]
+ if path != key && path.Parent() != key && !(kind == fswatch.EventDelete && path.ContainsPath(key)) {
+ continue
+ }
+ entries := slices.Clone(o.host.FS().GetAccessibleEntries(enumeration.directory).Directories)
+ slices.Sort(entries)
+ if !slices.Equal(entries, enumeration.entries) {
+ return enumeration.directory.AsPath(), true, false
+ }
+ }
+ }
+ return "", inputChanged, false
+}
diff --git a/tsc/internal/execute/build/watchDependencies_test.go b/tsc/internal/execute/build/watchDependencies_test.go
new file mode 100644
index 0000000000000..53c72f2777146
--- /dev/null
+++ b/tsc/internal/execute/build/watchDependencies_test.go
@@ -0,0 +1,34 @@
+package build
+
+import (
+ "testing"
+
+ "github.com/microsoft/TypeScript/tsc/internal/tspath"
+ "github.com/microsoft/TypeScript/tsc/internal/vfs/iovfs"
+ "github.com/microsoft/TypeScript/tsc/internal/vfs/vfstest"
+ "gotest.tools/v3/assert"
+)
+
+func TestDependencyRealpathFirstObservation(t *testing.T) {
+ t.Parallel()
+ const alias tspath.RootedPath = "/project/link.d.ts"
+ const first tspath.RootedPath = "/shared/first.d.ts"
+ const second tspath.RootedPath = "/shared/second.d.ts"
+ fs := vfstest.FromMap(map[string]any{
+ alias.AsString(): vfstest.Symlink(first.AsString()),
+ first.AsString(): "export const value: 1;",
+ second.AsString(): "export const value: 2;",
+ }, tspath.CaseSensitive)
+ tracker := &dependencyTrackingFS{}
+ tracker.Inner = fs
+ assert.Equal(t, tracker.Realpath(alias), first)
+ fs.(iovfs.FsWithSys).FSys().(*vfstest.MapFS).AddSymlink("project/link.d.ts", "shared/second.d.ts")
+ assert.Equal(t, tracker.Realpath(alias), second)
+ observed, ok := tracker.realpaths.Load(alias)
+ assert.Assert(t, ok)
+ assert.Equal(t, observed, first)
+ assert.Assert(t, tracker.SeenFiles.Has(alias))
+ const output tspath.RootedFilePath = "/project/out.js"
+ assert.NilError(t, tracker.WriteFile(output, "export const value = 1;"))
+ assert.Assert(t, !tracker.SeenFiles.Has(output.AsPath()))
+}
diff --git a/tsc/internal/execute/tsctests/build_watch_dependencies_test.go b/tsc/internal/execute/tsctests/build_watch_dependencies_test.go
index 1b35f7bf7c0e8..a8fc6ab0fb373 100644
--- a/tsc/internal/execute/tsctests/build_watch_dependencies_test.go
+++ b/tsc/internal/execute/tsctests/build_watch_dependencies_test.go
@@ -6,6 +6,11 @@ import (
"testing"
"github.com/microsoft/TypeScript/tsc/internal/execute"
+ "github.com/microsoft/TypeScript/tsc/internal/fswatch"
+ "github.com/microsoft/TypeScript/tsc/internal/json"
+ "github.com/microsoft/TypeScript/tsc/internal/testutil/fsbaselineutil"
+ "github.com/microsoft/TypeScript/tsc/internal/tspath"
+ "github.com/microsoft/TypeScript/tsc/internal/vfs/vfstest"
"gotest.tools/v3/assert"
)
@@ -24,12 +29,165 @@ func dependencyFiles() FileMap {
}
}
+func startDependencyWatch(t *testing.T, files FileMap, args []string, prebuild bool, expectedError string) (*TestSys, interface{ DoCycle() }) {
+ t.Helper()
+ sys := newTestSys(&tscInput{files: files, cwd: "/home/src/workspaces/project"}, false)
+ if prebuild {
+ result := execute.CommandLine(t.Context(), sys, []string{"--build"}, sys)
+ assert.Equal(t, int(result.Status), 0, "prebuild must succeed:\n%s", sys.getOutput(false))
+ sys.clearOutput()
+ }
+ result := execute.CommandLine(t.Context(), sys, args, sys)
+ assert.Assert(t, result.Watcher != nil)
+ output := sys.getOutput(false)
+ assert.Assert(t, !strings.Contains(output, "Cannot find global type"), "the fixture must provide global types:\n%s", output)
+ if expectedError == "" {
+ assert.Equal(t, int(result.Status), 0, "startup must succeed:\n%s", output)
+ assert.Assert(t, strings.Contains(output, "Found 0 errors"))
+ if prebuild {
+ assert.Assert(t, strings.Contains(output, "is up to date"), "startup must actually skip compilation:\n%s", output)
+ assert.Assert(t, !strings.Contains(output, "Building project"))
+ }
+ } else {
+ assert.Assert(t, int(result.Status) != 0)
+ assert.Assert(t, strings.Contains(output, expectedError), "expected %q:\n%s", expectedError, output)
+ }
+ sys.clearOutput()
+ return sys, result.Watcher
+}
+
+func dependencyEvent(sys *TestSys, watcher interface{ DoCycle() }, kind fswatch.EventKind, path string) {
+ sys.mockWatchBackend.SendChangedPaths([]fsbaselineutil.FileChange{{Path: path, Deleted: kind == fswatch.EventDelete}})
+ watcher.DoCycle()
+}
+
func checkDependencyOutput(t *testing.T, sys *TestSys, path, expected string) {
t.Helper()
output := sys.readFileNoError(path)
assert.Assert(t, strings.Contains(output, expected), "%s must contain %q:\n%s\nwatch output:\n%s", path, expected, output, sys.getOutput(false))
}
+func checkDependencySuccess(t *testing.T, sys *TestSys) {
+ t.Helper()
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "Found 0 errors"), "the change must compile successfully:\n%s", sys.getOutput(false))
+ assert.Assert(t, !strings.Contains(sys.getOutput(true), "error"))
+}
+
+func TestBuildWatchDependencies(t *testing.T) {
+ t.Parallel()
+ for _, external := range []bool{false, true} {
+ for _, prebuild := range []bool{false, true} {
+ t.Run(fmt.Sprintf("external=%v/prebuild=%v", external, prebuild), func(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ input := dependencyProject + "other.ts"
+ output := dependencyProject + "out/project/other.js"
+ if external {
+ files[dependencyProject+"index.ts"] = `import { value } from "../shared/other.js"; export const result = value;`
+ input = dependencyShared + "other.ts"
+ output = dependencyProject + "out/shared/other.js"
+ }
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, prebuild, "")
+ checkDependencyOutput(t, sys, output, `"before"`)
+ sys.writeFileNoError(input, `export const value = "after";`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, input)
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, output, `"after"`)
+ })
+ }
+ }
+}
+
+func TestBuildWatchDependencyGraphChanges(t *testing.T) {
+ t.Parallel()
+ sys, watcher := startDependencyWatch(t, dependencyFiles(), []string{"--build", "--watch", "--verbose"}, false, "")
+ sys.writeFileNoError(dependencyProject+"tsconfig.json", `{"compilerOptions":{"outDir":"changed","rootDir":"..","module":"nodenext","target":"es2022"},"files":["index.ts"]}`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyProject+"tsconfig.json")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"changed/project/other.js", `"before"`)
+ sys.clearOutput()
+ sys.writeFileNoError(dependencyProject+"index.ts", `import { value } from "../shared/other.js"; export const changed = value;`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyProject+"index.ts")
+ checkDependencySuccess(t, sys)
+ assert.Assert(t, isWatched(sys, "/home/src/workspaces/shared"))
+ sys.clearOutput()
+ sys.writeFileNoError(dependencyShared+"other.ts", `export const value = "after";`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyShared+"other.ts")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"changed/shared/other.js", `"after"`)
+ sys.clearOutput()
+ sys.writeFileNoError(dependencyProject+"index.ts", `export const removed = true;`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyProject+"index.ts")
+ checkDependencySuccess(t, sys)
+ assert.Assert(t, !isWatched(sys, "/home/src/workspaces/shared"))
+ sys.clearOutput()
+ sys.writeFileNoError(dependencyShared+"other.ts", `export const value = "unrelated";`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyShared+"other.ts")
+ assert.Equal(t, sys.getOutput(false), "")
+}
+
+func TestBuildWatchMissingDependencies(t *testing.T) {
+ t.Parallel()
+ for _, external := range []bool{false, true} {
+ for _, initiallyMissing := range []bool{false, true} {
+ t.Run(fmt.Sprintf("external=%v/missing=%v", external, initiallyMissing), func(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ input := dependencyProject + "other.ts"
+ output := dependencyProject + "out/project/other.js"
+ if external {
+ files[dependencyProject+"index.ts"] = `import { value } from "../shared/other.js"; export const result = value;`
+ input = dependencyShared + "other.ts"
+ output = dependencyProject + "out/shared/other.js"
+ }
+ expectedError := ""
+ if initiallyMissing {
+ delete(files, input)
+ expectedError = "Cannot find module"
+ }
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, false, expectedError)
+ if !initiallyMissing {
+ sys.removeNoError(input)
+ dependencyEvent(sys, watcher, fswatch.EventDelete, input)
+ assert.Assert(t, strings.Contains(sys.getOutput(true), "Cannot find module"), "deleting a dependency must be diagnosed:\n%s", sys.getOutput(false))
+ sys.clearOutput()
+ }
+ sys.writeFileNoError(input, `export const value = "restored";`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, input)
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, output, `"restored"`)
+ })
+ }
+ }
+}
+
+func TestBuildWatchMissingDependencyDirectory(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ files[dependencyProject+"index.ts"] = `import { value } from "../missing/deep/other.js"; export const result = value;`
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, false, "Cannot find module")
+ sys.writeFileNoError("/home/src/workspaces/missing/deep/other.ts", `export const value = "created";`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, "/home/src/workspaces/missing")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/missing/deep/other.js", `"created"`)
+}
+
+func TestBuildWatchFailedDependencyRecovery(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ files[dependencyProject+"index.ts"] = `import { value } from "./other.js"; export const result: number = value;`
+ files[dependencyProject+"tsconfig.json"] = `{"compilerOptions":{"outDir":"out","rootDir":"..","noEmitOnError":true},"files":["index.ts"]}`
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, false, "not assignable")
+ sys.removeNoError(dependencyProject + "other.ts")
+ dependencyEvent(sys, watcher, fswatch.EventDelete, dependencyProject+"other.ts")
+ assert.Assert(t, strings.Contains(sys.getOutput(true), "Cannot find module"))
+ sys.clearOutput()
+ sys.writeFileNoError(dependencyProject+"other.ts", `export const value = 42;`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyProject+"other.ts")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/project/other.js", "42")
+}
+
func TestBuildWatchDependenciesBeforeStartup(t *testing.T) {
t.Parallel()
sys := newTestSys(&tscInput{files: dependencyFiles(), cwd: "/home/src/workspaces/project"}, false)
@@ -43,6 +201,87 @@ func TestBuildWatchDependenciesBeforeStartup(t *testing.T) {
checkDependencyOutput(t, sys, dependencyProject+"out/project/other.js", `"changed"`)
}
+func TestBuildWatchDependencyControls(t *testing.T) {
+ t.Parallel()
+ for _, mode := range []string{"incremental", "composite"} {
+ t.Run(mode, func(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ args := []string{"--build", "--watch", "--verbose"}
+ input := dependencyProject + "other.ts"
+ output := dependencyProject + "out/project/other.js"
+ content := `export const value = "after";`
+ switch mode {
+ case "incremental":
+ files[dependencyProject+"tsconfig.json"] = `{"compilerOptions":{"outDir":"out","rootDir":"..","incremental":true},"files":["index.ts"]}`
+ case "composite":
+ files[dependencyProject+"tsconfig.json"] = `{"compilerOptions":{"outDir":"out","rootDir":"..","composite":true},"files":["index.ts"]}`
+ delete(files, input)
+ input = dependencyProject + "other.d.ts"
+ files[input] = `export const value: "before";`
+ content = `export const value: "after";`
+ output = dependencyProject + "out/project/index.d.ts"
+ }
+ sys, watcher := startDependencyWatch(t, files, args, false, "")
+ sys.writeFileNoError(input, content)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, input)
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, output, `"after"`)
+ })
+ }
+}
+
+func TestBuildWatchReplacementLibrary(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ t.Run(fmt.Sprintf("incremental=%v", incremental), func(t *testing.T) {
+ t.Parallel()
+ files := FileMap{
+ dependencyProject + "tsconfig.json": fmt.Sprintf(`{"compilerOptions":{"outDir":"out","noEmitOnError":true,"lib":["es2022","dom"],"libReplacement":true,"incremental":%v},"files":["index.ts"]}`, incremental),
+ dependencyProject + "index.ts": `export const result: number = libValue;`,
+ dependencyProject + "node_modules/@typescript/lib-dom/package.json": `{"name":"@typescript/lib-dom","version":"1.0.0","types":"index.d.ts"}`,
+ dependencyProject + "node_modules/@typescript/lib-dom/index.d.ts": `declare const libValue: string;`,
+ }
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, false, "not assignable")
+ sys.writeFileNoError(dependencyProject+"node_modules/@typescript/lib-dom/index.d.ts", `declare const libValue: number;`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyProject+"node_modules/@typescript/lib-dom/index.d.ts")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/index.js", "libValue")
+ sys.clearOutput()
+ sys.writeFileNoError(dependencyProject+"node_modules/@typescript/lib-dom/index.d.ts", `declare const libValue: string;`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyProject+"node_modules/@typescript/lib-dom/index.d.ts")
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "not assignable"))
+ })
+ }
+}
+
+func TestBuildWatchUnrelatedDependencyEvents(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ files[dependencyProject+"index.ts"] = `import { value } from "../shared/other.js"; export const result = value;`
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, false, "")
+ for _, path := range []string{dependencyProject + "unused.ts", dependencyShared + "unused.ts", dependencyProject + "note.txt"} {
+ sys.writeFileNoError(path, "unrelated")
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, path)
+ assert.Equal(t, sys.getOutput(false), "", "unrelated file %s must not start a cycle", path)
+ }
+}
+
+func TestBuildWatchDependencyRootChanges(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ files[dependencyProject+"tsconfig.json"] = `{"compilerOptions":{"outDir":"out","rootDir":".."},"include":["*.ts"]}`
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, false, "")
+ sys.writeFileNoError(dependencyProject+"added.ts", `export const added = 123;`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyProject+"added.ts")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/project/added.js", "123")
+ sys.clearOutput()
+ sys.removeNoError(dependencyProject + "added.ts")
+ dependencyEvent(sys, watcher, fswatch.EventDelete, dependencyProject+"added.ts")
+ checkDependencySuccess(t, sys)
+}
+
func TestBuildDependencyBeforeRestart(t *testing.T) {
t.Parallel()
for _, watch := range []bool{false, true} {
@@ -74,3 +313,777 @@ func TestBuildDependencyBeforeRestart(t *testing.T) {
}
}
}
+
+func TestBuildWatchDependencyConfiguration(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ files[dependencyProject+"base.json"] = `{"compilerOptions":{"outDir":"out","rootDir":"..","incremental":false}}`
+ files[dependencyProject+"tsconfig.json"] = `{"extends":"./base.json","files":["index.ts"]}`
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, true, "")
+ for _, incremental := range []bool{true, false} {
+ sys.writeFileNoError(dependencyProject+"base.json", fmt.Sprintf(`{"compilerOptions":{"outDir":"out","rootDir":"..","incremental":%v}}`, incremental))
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyProject+"base.json")
+ checkDependencySuccess(t, sys)
+ sys.clearOutput()
+ content := fmt.Sprintf(`export const value = "incremental=%v";`, incremental)
+ sys.writeFileNoError(dependencyProject+"other.ts", content)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyProject+"other.ts")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/project/other.js", fmt.Sprintf(`"incremental=%v"`, incremental))
+ sys.clearOutput()
+ }
+}
+
+func TestBuildWatchDependencyPackages(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ t.Run(fmt.Sprintf("incremental=%v", incremental), func(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ files[dependencyProject+"tsconfig.json"] = fmt.Sprintf(`{"compilerOptions":{"outDir":"out","declaration":true,"incremental":%v},"files":["index.ts"]}`, incremental)
+ files[dependencyProject+"index.ts"] = `import { value } from "widget"; export const result = value;`
+ pkg := dependencyProject + "node_modules/widget/"
+ files[pkg+"package.json"] = `{"types":"first.d.ts"}`
+ files[pkg+"first.d.ts"] = `export const value: 1;`
+ files[pkg+"second.d.ts"] = `export const value: 2;`
+ files[pkg+"index.d.ts"] = `export const value: 3;`
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, true, "")
+ for _, path := range []string{dependencyProject + "node_modules/unused/index.d.ts", dependencyProject + "node_modules/unused/package.json", dependencyProject + "unused/deep/note.txt"} {
+ sys.writeFileNoError(path, "unrelated")
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, path)
+ assert.Equal(t, sys.getOutput(false), "", "unrelated package/directory event: %s", path)
+ }
+ sys.writeFileNoError(pkg+"package.json", `{"types":"second.d.ts"}`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, pkg+"package.json")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/index.d.ts", "result: 2")
+ sys.clearOutput()
+ sys.removeNoError(pkg + "package.json")
+ dependencyEvent(sys, watcher, fswatch.EventDelete, pkg+"package.json")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/index.d.ts", "result: 3")
+ sys.clearOutput()
+ sys.writeFileNoError(pkg+"package.json", `{"types":"first.d.ts"}`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, pkg+"package.json")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/index.d.ts", "result: 1")
+ })
+ }
+}
+
+func TestBuildWatchMissingDependencyPackage(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ files[dependencyProject+"index.ts"] = `import { value } from "widget"; export const result = value;`
+ files[dependencyProject+"tsconfig.json"] = `{"compilerOptions":{"outDir":"out","declaration":true},"files":["index.ts"]}`
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, false, "Cannot find module")
+ path := dependencyProject + "node_modules/widget/index.d.ts"
+ sys.writeFileNoError(path, `export const value: 42;`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, path)
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/index.d.ts", "result: 42")
+}
+
+func TestBuildWatchDependencyResolutionChanges(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ t.Run(fmt.Sprintf("incremental=%v", incremental), func(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ delete(files, dependencyProject+"other.ts")
+ files[dependencyProject+"other.d.ts"] = `export const value: "declaration";`
+ files[dependencyProject+"tsconfig.json"] = fmt.Sprintf(`{"compilerOptions":{"outDir":"out","declaration":true,"incremental":%v},"files":["index.ts"]}`, incremental)
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, true, "")
+ sys.writeFileNoError(dependencyProject+"other.ts", `export const value = "source";`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyProject+"other.ts")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/other.js", `"source"`)
+ sys.clearOutput()
+ sys.writeFileNoError(dependencyProject+"index.ts", `export const removed = true;`)
+ sys.writeFileNoError(dependencyProject+"other.d.ts", `export const value: "unused";`)
+ sys.mockWatchBackend.SendChangedPaths([]fsbaselineutil.FileChange{{Path: dependencyProject + "index.ts"}, {Path: dependencyProject + "other.d.ts"}})
+ watcher.DoCycle()
+ checkDependencySuccess(t, sys)
+ sys.clearOutput()
+ sys.writeFileNoError(dependencyProject+"other.ts", `export const value = "unused";`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyProject+"other.ts")
+ assert.Equal(t, sys.getOutput(false), "")
+ })
+ }
+}
+
+func TestBuildWatchDependencyReferences(t *testing.T) {
+ t.Parallel()
+ for _, composite := range []bool{false, true} {
+ t.Run(fmt.Sprintf("composite=%v", composite), func(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ files[dependencyProject+"tsconfig.json"] = `{"files":[],"references":[{"path":"./child"}]}`
+ files[dependencyProject+"child/tsconfig.json"] = fmt.Sprintf(`{"compilerOptions":{"outDir":"out","composite":%v},"files":["index.ts","other.ts"]}`, composite)
+ if !composite {
+ files[dependencyProject+"child/tsconfig.json"] = `{"compilerOptions":{"outDir":"out"},"files":["index.ts"]}`
+ }
+ files[dependencyProject+"child/index.ts"] = `import { value } from "./other.js"; export const result = value;`
+ files[dependencyProject+"child/other.ts"] = `export const value = "before";`
+ if composite {
+ files[dependencyProject+"tsconfig.json"] = `{"files":[],"references":[{"path":"./client"}]}`
+ files[dependencyProject+"client/tsconfig.json"] = `{"compilerOptions":{"outDir":"out","composite":true},"files":["index.ts"],"references":[{"path":"../child"}]}`
+ files[dependencyProject+"client/index.ts"] = `import { result } from "../child/index.js"; export const propagated = result;`
+ }
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, true, "")
+ sys.writeFileNoError(dependencyProject+"child/other.ts", `export const value = "after";`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyProject+"child/other.ts")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"child/out/other.js", `"after"`)
+ if composite {
+ checkDependencyOutput(t, sys, dependencyProject+"child/out/index.d.ts", `"after"`)
+ checkDependencyOutput(t, sys, dependencyProject+"client/out/index.d.ts", `"after"`)
+ sys.clearOutput()
+ sys.writeFileNoError(dependencyProject+"child/other.ts", `export const value = "after"; const implementation = 1;`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyProject+"child/other.ts")
+ checkDependencySuccess(t, sys)
+ assert.Assert(t, !strings.Contains(sys.getOutput(false), "Building project 'client/tsconfig.json'"), "%s", sys.getOutput(false))
+ }
+ })
+ }
+}
+
+func TestBuildWatchDependencyReferenceEmitInvalidatesLogicalAlias(t *testing.T) {
+ t.Parallel()
+ files := FileMap{
+ dependencyProject + "tsconfig.json": `{"files":[],"references":[{"path":"./client"}]}`,
+ dependencyProject + "child/tsconfig.json": `{
+ "compilerOptions":{"outDir":"out","composite":true},
+ "files":["index.ts"]
+ }`,
+ dependencyProject + "child/index.ts": `export const value = "before";`,
+ dependencyProject + "client/tsconfig.json": `{
+ "compilerOptions":{"outDir":"out","composite":true,"preserveSymlinks":true},
+ "files":["index.ts"],
+ "references":[{"path":"../child"}]
+ }`,
+ dependencyProject + "client/index.ts": `import { value } from "widget"; export const propagated = value;`,
+ dependencyProject + "client/node_modules/widget/index.d.ts": vfstest.Symlink(dependencyProject + "child/out/index.d.ts"),
+ }
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, true, "")
+ checkDependencyOutput(t, sys, dependencyProject+"client/out/index.d.ts", `"before"`)
+
+ sys.writeFileNoError(dependencyProject+"child/index.ts", `export const value = "after";`)
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{{Kind: fswatch.EventUpdate, Path: dependencyProject + "child/index.ts"}})
+ watcher.DoCycle()
+
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"child/out/index.d.ts", `"after"`)
+ checkDependencyOutput(t, sys, dependencyProject+"client/out/index.d.ts", `"after"`)
+}
+
+func TestBuildWatchShallowDependencies(t *testing.T) {
+ t.Parallel()
+ files := FileMap{
+ "/app/tsconfig.json": `{"compilerOptions":{"outDir":"out","rootDir":"/"},"files":["index.ts"]}`,
+ "/app/index.ts": `import { value } from "../shared/other.js"; export const result = value;`,
+ "/shared/other.ts": `export const value = "before";`,
+ }
+ sys := newTestSys(&tscInput{files: files, cwd: "/app"}, false)
+ result := execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose"}, sys)
+ assert.Equal(t, int(result.Status), 0, "%s", sys.getOutput(false))
+ assert.Assert(t, result.Watcher != nil)
+ assert.Assert(t, isWatched(sys, "/shared"))
+ assert.Assert(t, !isWatched(sys, "/"))
+ assert.Assert(t, !isWatched(sys, "/home"))
+ sys.clearOutput()
+ sys.removeNoError("/shared/other.ts")
+ dependencyEvent(sys, result.Watcher, fswatch.EventDelete, "/shared/other.ts")
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "Cannot find module"))
+ sys.clearOutput()
+ sys.writeFileNoError("/shared/other.ts", `export const value = "restored";`)
+ dependencyEvent(sys, result.Watcher, fswatch.EventUpdate, "/shared/other.ts")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, "/app/out/shared/other.js", `"restored"`)
+}
+
+func TestBuildWatchDependencyDirectoryRecreation(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ files[dependencyProject+"index.ts"] = `import { value } from "../shared/other.js"; export const result = value;`
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, true, "")
+ sys.removeNoError(dependencyShared + "other.ts")
+ sys.removeNoError(strings.TrimSuffix(dependencyShared, "/"))
+ // Deleting a watched directory terminates its watch and causes an overflow recovery.
+ sys.mockWatchBackend.SendOverflow()
+ watcher.DoCycle()
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "Cannot find module"))
+ sys.clearOutput()
+ sys.writeFileNoError(dependencyShared+"other.ts", `export const value = "directory";`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, dependencyShared+"other.ts")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/shared/other.js", `"directory"`)
+}
+
+func TestBuildWatchDependencyDirectoryReplacement(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ for _, startup := range []string{"live", "restored", "restored-hint"} {
+ t.Run(fmt.Sprintf("incremental=%v/%s", incremental, startup), func(t *testing.T) {
+ t.Parallel()
+ const pkg = dependencyProject + "node_modules/widget"
+ const manifest = `{"name":"widget","types":"index.d.ts"}`
+ const output = dependencyProject + "out/index.d.ts"
+ files := FileMap{
+ dependencyProject + "tsconfig.json": fmt.Sprintf(`{"compilerOptions":{"outDir":"out","declaration":true,"incremental":%v,"module":"nodenext","target":"es2022","types":[],"libReplacement":false},"include":["**/*.ts"]}`, incremental),
+ dependencyProject + "index.ts": `import { value } from "widget"; export const result = value;`,
+ pkg + "/package.json": manifest,
+ pkg + "/index.d.ts": `export const value: 1;`,
+ }
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose", "--pretty", "false"}, startup != "live", "")
+ checkDependencyOutput(t, sys, output, "result: 1;")
+ notify := func() {
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{{Kind: fswatch.EventUpdate, Path: pkg}})
+ watcher.DoCycle()
+ }
+ if startup == "restored-hint" {
+ notify()
+ assert.Equal(t, sys.getOutput(false), "")
+ }
+
+ for _, value := range []int{2, 3} {
+ sys.removeNoError(pkg + "/index.d.ts")
+ sys.removeNoError(pkg + "/package.json")
+ sys.removeNoError(pkg)
+ sys.writeFileNoError(pkg+"/package.json", manifest)
+ sys.writeFileNoError(pkg+"/index.d.ts", fmt.Sprintf(`export const value: %d;`, value))
+ notify()
+ checkDependencyOutput(t, sys, output, fmt.Sprintf("result: %d;", value))
+ checkDependencySuccess(t, sys)
+
+ sys.clearOutput()
+ notify()
+ assert.Equal(t, sys.getOutput(false), "")
+ }
+ })
+ }
+ }
+}
+
+func TestBuildWatchPhysicalInputPrecision(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ for _, preserve := range []bool{false, true} {
+ for _, prebuild := range []bool{false, true} {
+ for _, ignoreCase := range []bool{false, true} {
+ t.Run(fmt.Sprintf("incremental=%v/preserve=%v/prebuild=%v/ignoreCase=%v", incremental, preserve, prebuild, ignoreCase), func(t *testing.T) {
+ t.Parallel()
+ const physical = "/home/src/dependencies/shared/types.d.ts"
+ const logical = dependencyProject + "node_modules/widget/index.d.ts"
+ files := FileMap{
+ dependencyProject + "tsconfig.json": fmt.Sprintf(`{"compilerOptions":{"outDir":"out","declaration":true,"incremental":%v,"preserveSymlinks":%v,"types":[],"module":"esnext","moduleResolution":"bundler"},"files":["index.ts"]}`, incremental, preserve),
+ dependencyProject + "index.ts": `import { value } from "widget"; export const result = value;`,
+ logical: vfstest.Symlink(physical),
+ physical: `export const value: "before";`,
+ }
+ sys := newTestSys(&tscInput{files: files, ignoreCase: ignoreCase}, false)
+ if prebuild {
+ result := execute.CommandLine(t.Context(), sys, []string{"--build"}, sys)
+ assert.Equal(t, int(result.Status), 0, "%s", sys.getOutput(false))
+ sys.clearOutput()
+ }
+ observer := &dependencyObserver{TestSys: sys}
+ result := execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose", "--extendedDiagnostics", "--pretty", "false"}, observer)
+ assert.Equal(t, int(result.Status), 0, "%s", sys.getOutput(false))
+ assert.Assert(t, result.Watcher != nil)
+ checkDependencySuccess(t, sys)
+ if prebuild {
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "is up to date"))
+ assert.Assert(t, !strings.Contains(sys.getOutput(false), "Building project"))
+ }
+ output := tspath.RootedPath(dependencyProject + "out/index.d.ts")
+ checkDependencyOutput(t, sys, output.AsString(), `"before"`)
+ eventPath := physical
+ if ignoreCase {
+ eventPath = strings.ToUpper(physical)
+ }
+ event := fswatch.Event{Kind: fswatch.EventUpdate, Path: eventPath}
+ logicalEventPath := logical
+ if ignoreCase {
+ logicalEventPath = strings.ToUpper(logical)
+ }
+ logicalEvent := fswatch.Event{Kind: fswatch.EventUpdate, Path: logicalEventPath}
+ sys.clearOutput()
+ observer.programs = 0
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{event})
+ result.Watcher.DoCycle()
+ assert.Equal(t, observer.programs, 0, "unchanged physical input hints must not construct a program:\n%s", sys.getOutput(false))
+ for _, edit := range []struct {
+ declaration string
+ path string
+ }{
+ {`"after"`, eventPath},
+ {"number", eventPath},
+ {"string", tspath.RootedFilePathFromNormalized(logicalEventPath).Directory().AsString()},
+ } {
+ changedEvent := fswatch.Event{Kind: fswatch.EventUpdate, Path: edit.path}
+ sys.clearOutput()
+ sys.writeFileNoError(physical, "export const value: "+edit.declaration+";")
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{changedEvent})
+ result.Watcher.DoCycle()
+ checkDependencySuccess(t, sys)
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "Building project"))
+ checkDependencyOutput(t, sys, output.AsString(), "result: "+edit.declaration+";")
+ before := sys.readFileNoError(output.AsString())
+ stamp := sys.fsFromFileMap().Stat(output).ModTime()
+ for range 2 {
+ sys.clearOutput()
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{changedEvent})
+ result.Watcher.DoCycle()
+ trace := sys.getOutput(false)
+ assert.Assert(t, !strings.Contains(trace, "Building project"), "consumed physical event must not rebuild:\n%s", trace)
+ assert.Assert(t, !strings.Contains(trace, "Check time:") && !strings.Contains(trace, "Emit time:"), "consumed event must not check or emit:\n%s", trace)
+ assert.Equal(t, sys.readFileNoError(output.AsString()), before)
+ assert.Assert(t, sys.fsFromFileMap().Stat(output).ModTime().Equal(stamp), "consumed event must not rewrite output timestamps")
+ }
+ for _, events := range [][]fswatch.Event{{logicalEvent}, {event, logicalEvent}} {
+ for range 2 {
+ sys.clearOutput()
+ sys.mockWatchBackend.SendEvents(events)
+ result.Watcher.DoCycle()
+ trace := sys.getOutput(false)
+ assert.Assert(t, !strings.Contains(trace, "Building project"), "consumed aliases must not rebuild:\n%s", trace)
+ assert.Assert(t, !strings.Contains(trace, "Check time:") && !strings.Contains(trace, "Emit time:"), "consumed aliases must not check or emit:\n%s", trace)
+ assert.Equal(t, sys.readFileNoError(output.AsString()), before)
+ assert.Assert(t, sys.fsFromFileMap().Stat(output).ModTime().Equal(stamp), "consumed aliases must not rewrite output timestamps")
+ }
+ }
+ }
+ sys.clearOutput()
+ sys.removeNoError(logical)
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{{Kind: fswatch.EventDelete, Path: logical}})
+ result.Watcher.DoCycle()
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "error TS2307"), "%s", sys.getOutput(false))
+ sys.clearOutput()
+ sys.writeFileNoError(physical, `export const value: "restored";`)
+ sys.mapFs().AddSymlink(strings.TrimPrefix(logical, "/"), strings.TrimPrefix(physical, "/"))
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{{Kind: fswatch.EventUpdate, Path: logical}})
+ result.Watcher.DoCycle()
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, output.AsString(), `"restored"`)
+ sys.clearOutput()
+ const source = dependencyProject + "node_modules/widget/index.ts"
+ sys.writeFileNoError(source, `export const value = 99 as const;`)
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{event, {Kind: fswatch.EventUpdate, Path: source}})
+ result.Watcher.DoCycle()
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, output.AsString(), "result: 99;")
+ })
+ }
+ }
+ }
+ }
+}
+
+func TestBuildWatchInputAliasIdentity(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ for _, preserve := range []bool{false, true} {
+ for _, prebuild := range []bool{false, true} {
+ for _, loadedTarget := range []bool{false, true} {
+ t.Run(fmt.Sprintf("incremental=%v/preserve=%v/prebuild=%v/loadedTarget=%v", incremental, preserve, prebuild, loadedTarget), func(t *testing.T) {
+ t.Parallel()
+ const first = "/home/src/dependencies/first/types.d.ts"
+ const second = "/home/src/dependencies/second/types.d.ts"
+ const logical = dependencyProject + "node_modules/widget/index.d.ts"
+ root := `import { value } from "widget"; export const result = value;`
+ if loadedTarget {
+ root += `import { value as other } from "../../dependencies/second/types.js"; export const alreadyLoaded = other;`
+ }
+ files := FileMap{
+ dependencyProject + "tsconfig.json": fmt.Sprintf(`{"compilerOptions":{"outDir":"out","declaration":true,"incremental":%v,"preserveSymlinks":%v,"types":[],"module":"esnext","moduleResolution":"bundler"},"files":["index.ts"]}`, incremental, preserve),
+ dependencyProject + "index.ts": root,
+ logical: vfstest.Symlink(first),
+ first: `export const value: 1;`,
+ second: `export const value: 2;`,
+ }
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose", "--pretty", "false"}, prebuild, "")
+ checkDependencyOutput(t, sys, dependencyProject+"out/index.d.ts", "result: 1;")
+ sys.writeFileNoError(first, `export const value: 3;`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, first)
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/index.d.ts", "result: 3;")
+ output := tspath.RootedPath(dependencyProject + "out/index.d.ts")
+ assert.Assert(t, sys.fsFromFileMap().Stat(tspath.RootedPath(second)).ModTime().Before(sys.fsFromFileMap().Stat(output).ModTime()), "retarget must not be rescued by a newer target timestamp")
+ sys.clearOutput()
+ sys.mapFs().AddSymlink(strings.TrimPrefix(logical, "/"), strings.TrimPrefix(second, "/"))
+ assert.Equal(t, sys.readFileNoError(logical), `export const value: 2;`)
+ assert.Equal(t, sys.readFileNoError(first), `export const value: 3;`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, logical)
+ checkDependencySuccess(t, sys)
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "Building project"))
+ checkDependencyOutput(t, sys, output.AsString(), "result: 2;")
+ before := sys.readFileNoError(output.AsString())
+ stamp := sys.fsFromFileMap().Stat(output).ModTime()
+ for range 2 {
+ sys.clearOutput()
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{
+ {Kind: fswatch.EventUpdate, Path: logical},
+ {Kind: fswatch.EventUpdate, Path: second},
+ })
+ watcher.DoCycle()
+ assert.Assert(t, !strings.Contains(sys.getOutput(false), "Building project"), "%s", sys.getOutput(false))
+ assert.Equal(t, sys.readFileNoError(output.AsString()), before)
+ assert.Assert(t, sys.fsFromFileMap().Stat(output).ModTime().Equal(stamp))
+ }
+ sys.clearOutput()
+ sys.writeFileNoError(second, `export const value: 4;`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, logical)
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, output.AsString(), "result: 4;")
+ sys.clearOutput()
+ sys.removeNoError(logical)
+ assert.Equal(t, sys.readFileNoError(second), `export const value: 4;`)
+ dependencyEvent(sys, watcher, fswatch.EventDelete, logical)
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "error TS2307"), "%s", sys.getOutput(false))
+ sys.clearOutput()
+ sys.mapFs().AddSymlink(strings.TrimPrefix(logical, "/"), strings.TrimPrefix(first, "/"))
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, logical)
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, output.AsString(), "result: 3;")
+ })
+ }
+ }
+ }
+ }
+}
+
+func TestBuildWatchCoalescedPhysicalPackageLookup(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ for _, preserve := range []bool{false, true} {
+ t.Run(fmt.Sprintf("incremental=%v/preserve=%v", incremental, preserve), func(t *testing.T) {
+ t.Parallel()
+ const physical = "/home/src/dependencies/shared/types.d.ts"
+ const manifest = dependencyProject + "node_modules/widget/package.json"
+ files := FileMap{
+ dependencyProject + "tsconfig.json": fmt.Sprintf(`{"compilerOptions":{"outDir":"out","declaration":true,"incremental":%v,"preserveSymlinks":%v,"types":[]},"files":["index.ts"]}`, incremental, preserve),
+ dependencyProject + "index.ts": `import { value } from "widget"; export const result = value;`,
+ manifest: `{"types":"first.d.ts"}`,
+ dependencyProject + "node_modules/widget/first.d.ts": vfstest.Symlink(physical),
+ physical: `export const value: 1;`,
+ dependencyProject + "node_modules/widget/next.d.ts": `export const value: 2;`,
+ }
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, true, "")
+ checkDependencyOutput(t, sys, dependencyProject+"out/index.d.ts", "result: 1;")
+ sys.writeFileNoError(manifest, `{"types":"next.d.ts"}`)
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{
+ {Kind: fswatch.EventUpdate, Path: physical},
+ {Kind: fswatch.EventUpdate, Path: manifest},
+ })
+ watcher.DoCycle()
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/index.d.ts", "result: 2;")
+ })
+ }
+ }
+}
+
+func configurationAliasFiles(incremental, preserve, extended bool) (FileMap, string, string) {
+ const first = "/home/src/dependencies/first/types.d.ts"
+ const second = "/home/src/dependencies/second/types.d.ts"
+ text := fmt.Sprintf(`{"compilerOptions":{"outDir":"out","declaration":true,"incremental":%v,"preserveSymlinks":%v,"types":[],"module":"esnext","moduleResolution":"bundler"},"files":["index.ts"]}`, incremental, preserve)
+ config := dependencyProject + "tsconfig.json"
+ files := FileMap{
+ config: text,
+ dependencyProject + "index.ts": `import { value } from "widget";
+import { value as first } from "../../dependencies/first/types.js";
+import { value as second } from "../../dependencies/second/types.js";
+export const result = value; export const other = first; export const extra = second;`,
+ dependencyProject + "node_modules/widget/index.d.ts": vfstest.Symlink(first),
+ first: `export const value: 1;`,
+ second: `export const value: 2;`,
+ }
+ if extended {
+ files[config] = `{"extends":"./settings/base.json","compilerOptions":{"outDir":"out"},"files":["index.ts"]}`
+ config = dependencyProject + "settings/base.json"
+ files[config] = text
+ }
+ return files, config, text
+}
+
+func TestBuildWatchConfigurationAliasChanges(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ for _, preserve := range []bool{false, true} {
+ for _, extended := range []bool{false, true} {
+ for _, mode := range []string{"alias-only", "duplicate-config", "rewritten-config"} {
+ t.Run(fmt.Sprintf("incremental=%v/preserve=%v/extended=%v/%s", incremental, preserve, extended, mode), func(t *testing.T) {
+ t.Parallel()
+ files, config, text := configurationAliasFiles(incremental, preserve, extended)
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose", "--pretty", "false"}, true, "")
+ cycle := func(events ...fswatch.Event) {
+ sys.clearOutput()
+ if mode != "alias-only" {
+ if mode == "rewritten-config" {
+ sys.writeFileNoError(config, text)
+ }
+ events = append(events, fswatch.Event{Kind: fswatch.EventUpdate, Path: config})
+ }
+ sys.mockWatchBackend.SendEvents(events)
+ watcher.DoCycle()
+ }
+ const output = dependencyProject + "out/index.d.ts"
+ checkDependencyOutput(t, sys, output, "result: 1;")
+ if mode != "alias-only" {
+ before := sys.readFileNoError(output)
+ cycle()
+ checkDependencySuccess(t, sys)
+ assert.Equal(t, sys.readFileNoError(output), before)
+ if mode == "duplicate-config" {
+ assert.Assert(t, !strings.Contains(sys.getOutput(false), "Building project"), "%s", sys.getOutput(false))
+ }
+ }
+ const logical = dependencyProject + "node_modules/widget/index.d.ts"
+ sys.mapFs().AddSymlink(strings.TrimPrefix(logical, "/"), "home/src/dependencies/second/types.d.ts")
+ cycle(fswatch.Event{Kind: fswatch.EventUpdate, Path: logical})
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, output, "result: 2;")
+ assert.Equal(t, sys.readFileNoError("/home/src/dependencies/first/types.d.ts"), `export const value: 1;`)
+ sys.removeNoError(logical)
+ cycle(fswatch.Event{Kind: fswatch.EventDelete, Path: logical})
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "error TS2307"), "%s", sys.getOutput(false))
+ assert.Equal(t, sys.readFileNoError("/home/src/dependencies/second/types.d.ts"), `export const value: 2;`)
+ sys.mapFs().AddSymlink(strings.TrimPrefix(logical, "/"), "home/src/dependencies/first/types.d.ts")
+ cycle(fswatch.Event{Kind: fswatch.EventUpdate, Path: logical})
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, output, "result: 1;")
+ stamp := sys.fsFromFileMap().Stat(output).ModTime()
+ for range 2 {
+ sys.clearOutput()
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{
+ {Kind: fswatch.EventUpdate, Path: logical},
+ {Kind: fswatch.EventUpdate, Path: config},
+ })
+ watcher.DoCycle()
+ assert.Assert(t, !strings.Contains(sys.getOutput(false), "Building project"), "consumed invalidation must not survive recovery:\n%s", sys.getOutput(false))
+ assert.Assert(t, sys.fsFromFileMap().Stat(output).ModTime().Equal(stamp))
+ }
+ })
+ }
+ }
+ }
+ }
+}
+
+func TestBuildWatchConfigurationAliasRecovery(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ for _, extended := range []bool{false, true} {
+ for _, invalid := range []string{"missing", "malformed"} {
+ for _, coalesced := range []bool{false, true} {
+ t.Run(fmt.Sprintf("incremental=%v/extended=%v/%s/coalesced=%v", incremental, extended, invalid, coalesced), func(t *testing.T) {
+ t.Parallel()
+ files, config, text := configurationAliasFiles(incremental, false, extended)
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose", "--pretty", "false"}, true, "")
+ const logical = dependencyProject + "node_modules/widget/index.d.ts"
+ if invalid == "missing" {
+ sys.removeNoError(config)
+ } else {
+ sys.writeFileNoError(config, `{"compilerOptions":`)
+ }
+ events := []fswatch.Event{{Kind: fswatch.EventUpdate, Path: config}}
+ if coalesced {
+ sys.removeNoError(logical)
+ events = append(events, fswatch.Event{Kind: fswatch.EventDelete, Path: logical})
+ }
+ sys.mockWatchBackend.SendEvents(events)
+ watcher.DoCycle()
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "error TS"), "invalid configuration must be reported:\n%s", sys.getOutput(false))
+ if !coalesced {
+ sys.clearOutput()
+ sys.removeNoError(logical)
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{{Kind: fswatch.EventDelete, Path: logical}})
+ watcher.DoCycle()
+ }
+ sys.clearOutput()
+ sys.writeFileNoError(config, text)
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{{Kind: fswatch.EventUpdate, Path: config}})
+ watcher.DoCycle()
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "error TS2307"), "configuration recovery must retain the missing-alias invalidation:\n%s", sys.getOutput(false))
+ sys.clearOutput()
+ sys.mapFs().AddSymlink(strings.TrimPrefix(logical, "/"), "home/src/dependencies/second/types.d.ts")
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, logical)
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/index.d.ts", "result: 2;")
+ })
+ }
+ }
+ }
+ }
+}
+
+func TestBuildWatchLegacyDependencyInventory(t *testing.T) {
+ t.Parallel()
+ for _, kind := range []string{"delete", "change", "unchanged", "empty"} {
+ t.Run(kind, func(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ files[dependencyProject+"tsconfig.json"] = `{"compilerOptions":{"outDir":"out","module":"nodenext","target":"es2022"},"files":["index.ts"]}`
+ if kind == "empty" {
+ files[dependencyProject+"index.ts"] = `export const result = "root";`
+ }
+ sys := newTestSys(&tscInput{files: files, cwd: strings.TrimSuffix(dependencyProject, "/")}, false)
+ result := execute.CommandLine(t.Context(), sys, []string{"--build"}, sys)
+ assert.Equal(t, int(result.Status), 0, "%s", sys.getOutput(false))
+ info := dependencyProject + "out/tsconfig.tsbuildinfo"
+ sys.writeFileNoError(info, `{"version":"FakeTSVersion","root":["../index.ts"],"packageJsons":["../package.json"]}`)
+ if kind == "delete" {
+ sys.removeNoError(dependencyProject + "other.ts")
+ }
+ if kind == "change" {
+ sys.writeFileNoError(dependencyProject+"other.ts", `export const value = "changed";`)
+ }
+ sys.clearOutput()
+ result = execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose"}, sys)
+ assert.Assert(t, result.Watcher != nil)
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "Building project"), "legacy metadata must be refreshed:\n%s", sys.getOutput(false))
+ if kind == "delete" {
+ assert.Assert(t, int(result.Status) != 0)
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "Cannot find module"))
+ } else {
+ assert.Equal(t, int(result.Status), 0, "%s", sys.getOutput(false))
+ checkDependencySuccess(t, sys)
+ if kind == "change" {
+ checkDependencyOutput(t, sys, dependencyProject+"out/other.js", `"changed"`)
+ }
+ }
+
+ var metadata map[string]json.Value
+ assert.NilError(t, json.Unmarshal([]byte(sys.readFileNoError(info)), &metadata))
+ _, known := metadata["nonIncrementalFileNames"]
+ assert.Assert(t, known, "refresh must persist the inventory even when empty")
+ if kind != "empty" {
+ sys.clearOutput()
+ sys.writeFileNoError(dependencyProject+"other.ts", `export const value = "recovered";`)
+ dependencyEvent(sys, result.Watcher, fswatch.EventUpdate, dependencyProject+"other.ts")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/other.js", `"recovered"`)
+ }
+ for range 2 {
+ sys.clearOutput()
+ result = execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose"}, sys)
+ assert.Equal(t, int(result.Status), 0, "%s", sys.getOutput(false))
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "is up to date"))
+ assert.Assert(t, !strings.Contains(sys.getOutput(false), "Building project"), "known inventory must not refresh repeatedly:\n%s", sys.getOutput(false))
+ }
+ })
+ }
+}
+
+func TestBuildDependencyReferenceTimestamps(t *testing.T) {
+ t.Parallel()
+ for _, watch := range []bool{false, true} {
+ t.Run(fmt.Sprintf("watch=%v", watch), func(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ files[dependencyProject+"tsconfig.json"] = `{"files":[],"references":[{"path":"./client"}]}`
+ files[dependencyProject+"child/tsconfig.json"] = `{"compilerOptions":{"outDir":"out","composite":true},"files":["index.ts"]}`
+ files[dependencyProject+"child/index.ts"] = `export const value: string = "before";`
+ files[dependencyProject+"client/tsconfig.json"] = `{"compilerOptions":{"outDir":"out","declaration":true},"files":["index.ts"],"references":[{"path":"../child"}]}`
+ files[dependencyProject+"client/index.ts"] = `import { value } from "../child/index.js"; export const result = value;`
+ sys := newTestSys(&tscInput{files: files, cwd: strings.TrimSuffix(dependencyProject, "/")}, false)
+ result := execute.CommandLine(t.Context(), sys, []string{"--build"}, sys)
+ assert.Equal(t, int(result.Status), 0, "%s", sys.getOutput(false))
+ sys.writeFileNoError(dependencyProject+"child/index.ts", `export const value: string = "after";`)
+ sys.clearOutput()
+ result = execute.CommandLine(t.Context(), sys, []string{"--build", "child"}, sys)
+ assert.Equal(t, int(result.Status), 0, "%s", sys.getOutput(false))
+ sys.clearOutput()
+ args := []string{"--build", "--verbose"}
+ if watch {
+ args = append(args, "--watch")
+ }
+ result = execute.CommandLine(t.Context(), sys, args, sys)
+ assert.Equal(t, int(result.Status), 0, "%s", sys.getOutput(false))
+ assert.Assert(t, !strings.Contains(sys.getOutput(false), "Building project 'client/tsconfig.json'"), "unchanged referenced declarations must not recompile the consumer:\n%s", sys.getOutput(false))
+ checkDependencyOutput(t, sys, dependencyProject+"client/out/index.d.ts", "result: string")
+ if watch {
+ sys.clearOutput()
+ sys.writeFileNoError(dependencyProject+"child/index.ts", `export const value: number = 42;`)
+ dependencyEvent(sys, result.Watcher, fswatch.EventUpdate, dependencyProject+"child/index.ts")
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"client/out/index.d.ts", "result: number")
+ sys.clearOutput()
+ dependencyEvent(sys, result.Watcher, fswatch.EventUpdate, dependencyProject+"child/out/index.d.ts")
+ assert.Assert(t, !strings.Contains(sys.getOutput(false), "Building project"), "a delayed event for a consumed declaration must not rebuild:\n%s", sys.getOutput(false))
+ }
+ })
+ }
+}
+
+func TestBuildWatchReplacementLibraryOrder(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ t.Run(fmt.Sprintf("incremental=%v", incremental), func(t *testing.T) {
+ t.Parallel()
+ names := []string{"es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "es2023", "es2024", "es2025", "esnext", "dom", "scripthost"}
+ files := FileMap{
+ dependencyProject + "tsconfig.json": fmt.Sprintf(`{"compilerOptions":{"outDir":"out","lib":["es5","%s"],"libReplacement":true,"incremental":%v},"files":["index.ts"]}`, strings.Join(names, `","`), incremental),
+ dependencyProject + "index.ts": `declare const lib: Library; export const result: "scripthost" = lib.which();`,
+ }
+ for _, name := range names {
+ files[dependencyProject+"node_modules/@typescript/lib-"+name+"/index.d.ts"] = fmt.Sprintf(`interface Library { which(): "%s"; }`, name)
+ }
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, true, "")
+ path := dependencyProject + "node_modules/@typescript/lib-scripthost/index.d.ts"
+ sys.writeFileNoError(path, `interface Library { which(): "changed"; }`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, path)
+ assert.Assert(t, strings.Contains(sys.getOutput(false), `Type '"changed"' is not assignable to type '"scripthost"'`), "%s", sys.getOutput(false))
+ sys.clearOutput()
+ sys.writeFileNoError(path, `interface Library { which(): "scripthost"; }`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, path)
+ checkDependencySuccess(t, sys)
+ })
+ }
+}
+
+func TestBuildWatchCoalescedDependencyLookups(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ delete(files, dependencyProject+"other.ts")
+ files[dependencyProject+"other.d.ts"] = `export const value: "declaration";`
+ files[dependencyProject+"tsconfig.json"] = `{"compilerOptions":{"outDir":"out","declaration":true},"files":["index.ts"]}`
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, true, "")
+ sys.writeFileNoError(dependencyProject+"other.ts", `export const value = "source";`)
+ sys.mockWatchBackend.SendChangedPaths([]fsbaselineutil.FileChange{
+ {Path: dependencyProject + "other.d.ts"},
+ {Path: dependencyProject + "other.ts"},
+ })
+ watcher.DoCycle()
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/other.js", `"source"`)
+}
+
+func TestBuildWatchSolutionDependencyPrecision(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ files[dependencyProject+"tsconfig.json"] = `{"files":[],"references":[{"path":"./child"},{"path":"./sibling"}]}`
+ files[dependencyProject+"child/tsconfig.json"] = `{"compilerOptions":{"outDir":"out","declaration":true},"files":["index.ts"]}`
+ files[dependencyProject+"child/index.ts"] = `import { value } from "./other"; export const result = value;`
+ files[dependencyProject+"child/other.d.ts"] = `export const value: 1;`
+ files[dependencyProject+"sibling/tsconfig.json"] = `{"compilerOptions":{"outDir":"out"},"files":["index.ts"]}`
+ files[dependencyProject+"sibling/index.ts"] = `export const value = 1;`
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose"}, true, "")
+ for _, path := range []string{dependencyProject + "unused", dependencyProject + "out"} {
+ sys.writeFileNoError(path+"/note.txt", "unrelated")
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, path)
+ assert.Equal(t, sys.getOutput(false), "", "an unrelated directory must not invalidate a solution: %s", path)
+ }
+
+ sys.writeFileNoError(dependencyProject+"child/other.d.ts", `export const value: 2;`)
+ sys.writeFileNoError(dependencyProject+"sibling/index.ts", `export const value = 2;`)
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{
+ {Kind: fswatch.EventUpdate, Path: dependencyProject + "child"},
+ {Kind: fswatch.EventUpdate, Path: dependencyProject + "sibling/index.ts"},
+ })
+ watcher.DoCycle()
+ checkDependencyOutput(t, sys, dependencyProject+"child/out/index.d.ts", "result: 2;")
+ checkDependencyOutput(t, sys, dependencyProject+"sibling/out/index.js", "value = 2;")
+ checkDependencySuccess(t, sys)
+}
diff --git a/tsc/internal/execute/tsctests/build_watch_precision_test.go b/tsc/internal/execute/tsctests/build_watch_precision_test.go
new file mode 100644
index 0000000000000..b55641e2fb0c0
--- /dev/null
+++ b/tsc/internal/execute/tsctests/build_watch_precision_test.go
@@ -0,0 +1,493 @@
+package tsctests
+
+import (
+ "fmt"
+ "regexp"
+ "slices"
+ "strings"
+ "sync"
+ "testing"
+
+ "github.com/microsoft/TypeScript/tsc/internal/execute"
+ "github.com/microsoft/TypeScript/tsc/internal/execute/build"
+ "github.com/microsoft/TypeScript/tsc/internal/execute/incremental"
+ "github.com/microsoft/TypeScript/tsc/internal/fswatch"
+ "github.com/microsoft/TypeScript/tsc/internal/tsoptions"
+ "github.com/microsoft/TypeScript/tsc/internal/tspath"
+ "github.com/microsoft/TypeScript/tsc/internal/vfs"
+ "github.com/microsoft/TypeScript/tsc/internal/vfs/vfstest"
+ "gotest.tools/v3/assert"
+)
+
+type dependencyWrites struct {
+ vfs.FS
+ mu sync.Mutex
+ writes map[string]int
+ restoreFile tspath.RootedFilePath
+ restore func()
+ restoreAfter int
+ afterWrite func(tspath.RootedFilePath)
+}
+
+func (f *dependencyWrites) FileExists(path tspath.RootedFilePath) bool {
+ exists := f.FS.FileExists(path)
+ f.mu.Lock()
+ var restore func()
+ if !exists && path == f.restoreFile {
+ f.restoreAfter--
+ if f.restoreAfter == 0 {
+ restore, f.restore = f.restore, nil
+ }
+ }
+ f.mu.Unlock()
+ if restore != nil {
+ restore()
+ }
+ return exists
+}
+
+func (f *dependencyWrites) WriteFile(path tspath.RootedFilePath, text string) error {
+ f.mu.Lock()
+ f.writes[path.AsString()]++
+ f.mu.Unlock()
+ err := f.FS.WriteFile(path, text)
+ if err == nil && f.afterWrite != nil {
+ f.afterWrite(path)
+ }
+ return err
+}
+
+func TestBuildWatchCoalescesAliasChangesDuringEmit(t *testing.T) {
+ t.Parallel()
+ for _, preserve := range []bool{false, true} {
+ t.Run(fmt.Sprintf("preserve=%v", preserve), func(t *testing.T) {
+ t.Parallel()
+ files, _, _ := configurationAliasFiles(true, preserve, false)
+ const logical = dependencyProject + "node_modules/widget/index.d.ts"
+ const target = "/home/src/dependencies/second/types.d.ts"
+ sys := newTestSys(&tscInput{files: files}, false)
+ writes := &dependencyWrites{FS: sys.fs.FS, writes: make(map[string]int)}
+ sys.fs.FS = writes
+ observer := &dependencyObserver{TestSys: sys}
+ r := execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--pretty", "false"}, observer)
+ assert.Equal(t, int(r.Status), 0)
+ var mutate sync.Once
+ writes.afterWrite = func(path tspath.RootedFilePath) {
+ if path == dependencyProject+"out/index.js" {
+ mutate.Do(func() {
+ sys.mapFs().AddSymlink(strings.TrimPrefix(logical, "/"), strings.TrimPrefix(target, "/"))
+ files[logical] = vfstest.Symlink(target)
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{{Kind: fswatch.EventUpdate, Path: logical}})
+ })
+ }
+ }
+ root := dependencyProject + "index.ts"
+ source := sys.readFileNoError(root) + "\nexport const tick = 1;"
+ files[root] = source
+ sys.writeFileNoError(root, source)
+ sys.clearOutput()
+ observer.programs = 0
+ dependencyEvent(sys, r.Watcher, fswatch.EventUpdate, root)
+ assert.Equal(t, observer.programs, 2)
+ trace := sys.getOutput(false)
+ lastCompilation := strings.LastIndex(trace, "File change detected.")
+ if lastCompilation < 0 {
+ t.Fatalf("expected an incremental compilation: %s", trace)
+ }
+ assert.Assert(t, !strings.Contains(trace[lastCompilation:], "error TS"), "%s", trace)
+ cold := newTestSys(&tscInput{files: files}, false)
+ execute.CommandLine(t.Context(), cold, []string{"--build", "--force", "--pretty", "false"}, cold)
+ assert.DeepEqual(t, dependencyDiagnosticCodes(cold), []string{})
+ for _, name := range []string{"index.js", "index.d.ts"} {
+ assert.Equal(t, sys.readFileNoError(dependencyProject+"out/"+name), cold.readFileNoError(dependencyProject+"out/"+name))
+ }
+ sys.clearOutput()
+ observer.programs = 0
+ writes.writes = make(map[string]int)
+ r.Watcher.DoCycle()
+ assert.Equal(t, observer.programs, 0)
+ assert.Equal(t, len(writes.writes), 0)
+ assert.Equal(t, sys.getOutput(false), "")
+ })
+ }
+}
+
+type dependencyObserver struct {
+ *TestSys
+ programs int
+ owners []string
+}
+
+func (o *dependencyObserver) OnProgram(p *incremental.Program) {
+ o.programs++
+ o.owners = nil
+ for _, file := range p.GetProgram().GetSourceFiles() {
+ o.owners = append(o.owners, file.FileName().AsString())
+ }
+ slices.Sort(o.owners)
+ o.TestSys.OnProgram(p)
+}
+
+func dependencyDiagnosticCodes(sys *TestSys) []string {
+ codes := []string{}
+ for _, match := range regexp.MustCompile(`error TS(\d+)`).FindAllStringSubmatch(sys.getOutput(false), -1) {
+ codes = append(codes, match[1])
+ }
+ slices.Sort(codes)
+ return codes
+}
+
+func TestBuildWatchAliasCreatedDuringProbe(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ for _, preserve := range []bool{false, true} {
+ for _, probe := range []string{"classification", "before-resolution", "resolution"} {
+ t.Run(fmt.Sprintf("incremental=%v/preserve=%v/%s", incremental, preserve, probe), func(t *testing.T) {
+ t.Parallel()
+ files, _, _ := configurationAliasFiles(incremental, preserve, false)
+ const logical = dependencyProject + "node_modules/widget/index.d.ts"
+ const parent = dependencyProject + "node_modules/widget"
+ sys := newTestSys(&tscInput{files: files}, false)
+ writes := &dependencyWrites{FS: sys.fs.FS, writes: make(map[string]int)}
+ sys.fs.FS = writes
+ observer := &dependencyObserver{TestSys: sys}
+ r := execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose", "--pretty", "false"}, observer)
+ assert.Equal(t, int(r.Status), 0)
+ sys.removeNoError(logical)
+ sys.removeNoError(parent)
+ sys.clearOutput()
+ dependencyEvent(sys, r.Watcher, fswatch.EventDelete, parent)
+ assert.DeepEqual(t, dependencyDiagnosticCodes(sys), []string{"2307"})
+ sys.writeFileNoError(parent+"/placeholder", "")
+ sys.removeNoError(parent + "/placeholder")
+ writes.restoreFile = logical
+ writes.restoreAfter = 1
+ if probe == "before-resolution" {
+ writes.restoreAfter = 2
+ }
+ if probe == "resolution" {
+ writes.restoreAfter = 3
+ }
+ // The parent notification can precede creation of its child and installation of its watch.
+ writes.restore = func() {
+ sys.mapFs().AddSymlink(strings.TrimPrefix(logical, "/"), "home/src/dependencies/first/types.d.ts")
+ }
+ sys.clearOutput()
+ observer.programs = 0
+ writes.writes = make(map[string]int)
+ dependencyEvent(sys, r.Watcher, fswatch.EventUpdate, parent)
+ assert.Assert(t, writes.restore == nil, "the missing-file observation must precede restoration")
+ trace := sys.getOutput(false)
+ final := trace[strings.LastIndex(trace, "File change detected."):]
+ assert.Assert(t, !strings.Contains(final, "error TS"), "%s", trace)
+ assert.Assert(t, strings.Contains(final, "Found 0 errors"), "%s", trace)
+ expectedPrograms := 1
+ if probe == "resolution" {
+ expectedPrograms = 2
+ } else {
+ assert.DeepEqual(t, dependencyDiagnosticCodes(sys), []string{})
+ }
+ assert.Equal(t, observer.programs, expectedPrograms)
+ expectedWrites := 1
+ if !incremental && probe == "resolution" {
+ expectedWrites = 2
+ }
+ assert.Equal(t, writes.writes[dependencyProject+"out/index.d.ts"], expectedWrites)
+ cold := newTestSys(&tscInput{files: files}, false)
+ coldObserver := &dependencyObserver{TestSys: cold}
+ execute.CommandLine(t.Context(), cold, []string{"--build", "--force", "--pretty", "false"}, coldObserver)
+ assert.DeepEqual(t, dependencyDiagnosticCodes(cold), []string{})
+ for _, name := range []string{"index.js", "index.d.ts"} {
+ assert.Equal(t, sys.readFileNoError(dependencyProject+"out/"+name), cold.readFileNoError(dependencyProject+"out/"+name))
+ }
+ assert.DeepEqual(t, observer.owners, coldObserver.owners)
+ sys.clearOutput()
+ observer.programs = 0
+ writes.writes = make(map[string]int)
+ dependencyEvent(sys, r.Watcher, fswatch.EventUpdate, logical)
+ assert.Equal(t, observer.programs, 0)
+ assert.Equal(t, len(writes.writes), 0)
+ })
+ }
+ }
+ }
+}
+
+func TestBuildWatchAliasRecoveryPrecision(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ for _, preserve := range []bool{false, true} {
+ for _, prebuild := range []bool{false, true} {
+ for _, mode := range []string{"file", "parent", "parent-config", "overflow"} {
+ t.Run(fmt.Sprintf("incremental=%v/preserve=%v/prebuild=%v/%s", incremental, preserve, prebuild, mode), func(t *testing.T) {
+ t.Parallel()
+ files, config, _ := configurationAliasFiles(incremental, preserve, false)
+ const logical = dependencyProject + "node_modules/widget/index.d.ts"
+ const parent = dependencyProject + "node_modules/widget"
+ const first = "/home/src/dependencies/first/types.d.ts"
+ const second = "/home/src/dependencies/second/types.d.ts"
+ const output = dependencyProject + "out/index.d.ts"
+ sys := newTestSys(&tscInput{files: files}, false)
+ if prebuild {
+ r := execute.CommandLine(t.Context(), sys, []string{"--build"}, sys)
+ assert.Equal(t, int(r.Status), 0)
+ }
+ writes := &dependencyWrites{FS: sys.fs.FS, writes: make(map[string]int)}
+ sys.fs.FS = writes
+ observer := &dependencyObserver{TestSys: sys}
+ r := execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose", "--pretty", "false"}, observer)
+ assert.Equal(t, int(r.Status), 0)
+ assert.Assert(t, r.Watcher != nil)
+ cycle := func(events ...fswatch.Event) {
+ t.Helper()
+ sys.clearOutput()
+ writes.writes = make(map[string]int)
+ observer.programs = 0
+ if mode == "parent-config" {
+ events = append(events, fswatch.Event{Kind: fswatch.EventUpdate, Path: config})
+ }
+ if mode == "overflow" {
+ sys.mockWatchBackend.SendOverflow()
+ } else {
+ sys.mockWatchBackend.SendEvents(events)
+ }
+ r.Watcher.DoCycle()
+ }
+ check := func(codes []string, declaration string) {
+ t.Helper()
+ assert.DeepEqual(t, dependencyDiagnosticCodes(sys), codes)
+ assert.Equal(t, sys.readFileNoError(output), declaration)
+ cold := newTestSys(&tscInput{files: files}, false)
+ coldObserver := &dependencyObserver{TestSys: cold}
+ execute.CommandLine(t.Context(), cold, []string{"--build", "--force", "--pretty", "false"}, coldObserver)
+ assert.DeepEqual(t, dependencyDiagnosticCodes(sys), dependencyDiagnosticCodes(cold))
+ assert.Equal(t, sys.readFileNoError(output), cold.readFileNoError(output))
+ assert.Equal(t, sys.readFileNoError(dependencyProject+"out/index.js"), cold.readFileNoError(dependencyProject+"out/index.js"))
+ assert.DeepEqual(t, observer.owners, coldObserver.owners)
+ }
+ for _, target := range []string{first, second} {
+ sys.removeNoError(logical)
+ delete(files, logical)
+ eventPath := logical
+ if mode != "file" {
+ sys.removeNoError(parent)
+ eventPath = parent
+ }
+ cycle(fswatch.Event{Kind: fswatch.EventDelete, Path: eventPath})
+ check([]string{"2307"}, "export declare const result: any;\nexport declare const other: 1;\nexport declare const extra: 2;\n")
+ assert.Equal(t, observer.programs, 1)
+ assert.Equal(t, writes.writes[output], 1)
+ assert.Equal(t, writes.writes[dependencyProject+"out/index.js"], 1)
+ assert.Equal(t, writes.writes[dependencyProject+"out/tsconfig.tsbuildinfo"], 1)
+ sys.writeFileNoError(parent+"/placeholder", "")
+ sys.removeNoError(parent + "/placeholder")
+ sys.mapFs().AddSymlink(strings.TrimPrefix(logical, "/"), strings.TrimPrefix(target, "/"))
+ files[logical] = vfstest.Symlink(target)
+ cycle(fswatch.Event{Kind: fswatch.EventUpdate, Path: eventPath})
+ value := "1"
+ if target == second {
+ value = "2"
+ }
+ check([]string{}, "export declare const result: "+value+";\nexport declare const other: 1;\nexport declare const extra: 2;\n")
+ assert.Equal(t, observer.programs, 1)
+ assert.Equal(t, writes.writes[output], 1)
+ assert.Equal(t, writes.writes[dependencyProject+"out/index.js"], 1)
+ assert.Equal(t, writes.writes[dependencyProject+"out/tsconfig.tsbuildinfo"], 1)
+ for range 2 {
+ cycle(fswatch.Event{Kind: fswatch.EventUpdate, Path: logical}, fswatch.Event{Kind: fswatch.EventUpdate, Path: first}, fswatch.Event{Kind: fswatch.EventUpdate, Path: second})
+ assert.DeepEqual(t, dependencyDiagnosticCodes(sys), []string{})
+ assert.Equal(t, observer.programs, 0)
+ assert.Equal(t, len(writes.writes), 0)
+ }
+ }
+ sys.removeNoError(logical)
+ sys.removeNoError(parent)
+ cycle(fswatch.Event{Kind: fswatch.EventDelete, Path: parent})
+ root := `import { value } from "../../dependencies/first/types.js"; export const result = value;`
+ sys.writeFileNoError(dependencyProject+"index.ts", root)
+ files[dependencyProject+"index.ts"] = root
+ delete(files, logical)
+ cycle(fswatch.Event{Kind: fswatch.EventUpdate, Path: dependencyProject + "index.ts"})
+ check([]string{}, "export declare const result: 1;\n")
+ assert.Assert(t, !isWatched(sys, dependencyProject+"node_modules"))
+ sys.writeFileNoError(parent+"/placeholder", "")
+ sys.removeNoError(parent + "/placeholder")
+ sys.mapFs().AddSymlink(strings.TrimPrefix(logical, "/"), strings.TrimPrefix(first, "/"))
+ cycle(fswatch.Event{Kind: fswatch.EventUpdate, Path: parent})
+ assert.Equal(t, observer.programs, 0)
+ assert.Equal(t, len(writes.writes), 0)
+ })
+ }
+ }
+ }
+ }
+}
+
+func TestBuildWatchMissingAliasRecovery(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ for _, preserve := range []bool{false, true} {
+ for _, prebuild := range []bool{false, true} {
+ t.Run(fmt.Sprintf("incremental=%v/preserve=%v/prebuild=%v", incremental, preserve, prebuild), func(t *testing.T) {
+ t.Parallel()
+ files, _, _ := configurationAliasFiles(incremental, preserve, false)
+ const logical = dependencyProject + "node_modules/widget/index.d.ts"
+ target := files[logical]
+ delete(files, logical)
+ sys := newTestSys(&tscInput{files: files}, false)
+ if prebuild {
+ r := execute.CommandLine(t.Context(), sys, []string{"--build"}, sys)
+ assert.Assert(t, int(r.Status) != 0)
+ }
+ sys.clearOutput()
+ writes := &dependencyWrites{FS: sys.fs.FS, writes: make(map[string]int)}
+ sys.fs.FS = writes
+ observer := &dependencyObserver{TestSys: sys}
+ r := execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose", "--pretty", "false"}, observer)
+ assert.Assert(t, int(r.Status) != 0)
+ assert.DeepEqual(t, dependencyDiagnosticCodes(sys), []string{"2307"})
+ sys.writeFileNoError(dependencyProject+"node_modules/widget/placeholder", "")
+ sys.removeNoError(dependencyProject + "node_modules/widget/placeholder")
+ sys.mapFs().AddSymlink(strings.TrimPrefix(logical, "/"), "home/src/dependencies/first/types.d.ts")
+ files[logical] = target
+ sys.clearOutput()
+ observer.programs = 0
+ writes.writes = make(map[string]int)
+ dependencyEvent(sys, r.Watcher, fswatch.EventUpdate, dependencyProject+"node_modules/widget")
+ assert.DeepEqual(t, dependencyDiagnosticCodes(sys), []string{})
+ assert.Equal(t, observer.programs, 1)
+ assert.Equal(t, writes.writes[dependencyProject+"out/index.d.ts"], 1)
+ cold := newTestSys(&tscInput{files: files}, false)
+ coldObserver := &dependencyObserver{TestSys: cold}
+ result := execute.CommandLine(t.Context(), cold, []string{"--build", "--force", "--pretty", "false"}, coldObserver)
+ assert.Equal(t, int(result.Status), 0)
+ for _, name := range []string{"index.js", "index.d.ts"} {
+ assert.Equal(t, sys.readFileNoError(dependencyProject+"out/"+name), cold.readFileNoError(dependencyProject+"out/"+name))
+ }
+ assert.DeepEqual(t, observer.owners, coldObserver.owners)
+ })
+ }
+ }
+ }
+}
+
+func TestBuildWatchOrdinaryHintPrecision(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ for _, prebuild := range []bool{false, true} {
+ for _, order := range []string{"manifest", "root", "unrelated", "root-manifest", "manifest-root", "directory-unrelated"} {
+ t.Run(fmt.Sprintf("incremental=%v/prebuild=%v/%s", incremental, prebuild, order), func(t *testing.T) {
+ t.Parallel()
+ files := FileMap{
+ dependencyProject + "tsconfig.json": fmt.Sprintf(`{"compilerOptions":{"outDir":"out","declaration":true,"incremental":%v,"module":"nodenext","target":"es2022","types":[]},"files":["index.ts"]}`, incremental),
+ dependencyProject + "package.json": `{"type":"module"}`,
+ dependencyProject + "index.ts": `import {value} from "./other.js"; export const result=value;`,
+ dependencyProject + "other.d.ts": `export const value: 42;`,
+ dependencyProject + "unrelated.json": `{"unused":true}`,
+ }
+ sys := newTestSys(&tscInput{files: files}, false)
+ if prebuild {
+ r := execute.CommandLine(t.Context(), sys, []string{"--build"}, sys)
+ assert.Equal(t, int(r.Status), 0)
+ }
+ writes := &dependencyWrites{FS: sys.fs.FS, writes: make(map[string]int)}
+ sys.fs.FS = writes
+ observer := &dependencyObserver{TestSys: sys}
+ r := execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose", "--pretty", "false"}, observer)
+ assert.Equal(t, int(r.Status), 0)
+ events := []fswatch.Event{}
+ paths := map[string]string{
+ "root": dependencyProject + "index.ts",
+ "manifest": dependencyProject + "package.json",
+ "unrelated": dependencyProject + "unrelated.json",
+ "directory": strings.TrimSuffix(dependencyProject, "/"),
+ }
+ for name := range strings.SplitSeq(order, "-") {
+ events = append(events, fswatch.Event{Kind: fswatch.EventUpdate, Path: paths[name]})
+ }
+ if order == "unrelated" {
+ events = append(events, fswatch.Event{Kind: fswatch.EventUpdate, Path: dependencyProject + "index.ts"})
+ }
+ cycle := func() {
+ sys.clearOutput()
+ observer.programs = 0
+ writes.writes = make(map[string]int)
+ sys.mockWatchBackend.SendEvents(events)
+ r.Watcher.DoCycle()
+ }
+ for range 2 {
+ cycle()
+ assert.DeepEqual(t, dependencyDiagnosticCodes(sys), []string{})
+ assert.Equal(t, sys.readFileNoError(dependencyProject+"out/index.d.ts"), "export declare const result: 42;\n")
+ assert.Equal(t, observer.programs, 0, sys.getOutput(false))
+ assert.Equal(t, len(writes.writes), 0)
+ if order == "directory-unrelated" {
+ assert.Equal(t, sys.getOutput(false), "")
+ }
+ }
+ if order == "root-manifest" || order == "manifest-root" {
+ for _, edit := range []string{"root", "manifest", "both"} {
+ if edit != "manifest" {
+ files[dependencyProject+"index.ts"] = `import {value} from "./other.js"; export const ` + edit + `=value;`
+ sys.writeFileNoError(dependencyProject+"index.ts", files[dependencyProject+"index.ts"].(string))
+ }
+ if edit != "root" {
+ moduleType := "commonjs"
+ if edit == "both" {
+ moduleType = "module"
+ }
+ files[dependencyProject+"package.json"] = `{"type":"` + moduleType + `"}`
+ sys.writeFileNoError(dependencyProject+"package.json", files[dependencyProject+"package.json"].(string))
+ }
+ cycle()
+ assert.Equal(t, observer.programs, 1)
+ assert.Assert(t, len(writes.writes) > 0)
+ assert.DeepEqual(t, dependencyDiagnosticCodes(sys), []string{})
+ cold := newTestSys(&tscInput{files: files}, false)
+ coldObserver := &dependencyObserver{TestSys: cold}
+ execute.CommandLine(t.Context(), cold, []string{"--build", "--force", "--pretty", "false"}, coldObserver)
+ assert.DeepEqual(t, dependencyDiagnosticCodes(cold), []string{})
+ for _, name := range []string{"index.js", "index.d.ts"} {
+ assert.Equal(t, sys.readFileNoError(dependencyProject+"out/"+name), cold.readFileNoError(dependencyProject+"out/"+name))
+ }
+ assert.DeepEqual(t, observer.owners, coldObserver.owners)
+ cycle()
+ assert.Equal(t, observer.programs, 0)
+ assert.Equal(t, len(writes.writes), 0)
+ }
+ }
+ })
+ }
+ }
+ }
+}
+
+func TestBuildDependencyAliasBuildReuse(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ t.Run(fmt.Sprintf("incremental=%v", incremental), func(t *testing.T) {
+ t.Parallel()
+ files, _, _ := configurationAliasFiles(incremental, false, false)
+ files[dependencyProject+"node_modules/extra/index.d.ts"] = vfstest.Symlink("/home/src/dependencies/extra/types.d.ts")
+ files["/home/src/dependencies/extra/types.d.ts"] = `export const extra: 3;`
+ sys := newTestSys(&tscInput{files: files}, false)
+ command := tsoptions.ParseBuildCommandLine([]string{"--build", "--verbose"}, sys.FS(), sys.GetCurrentDirectory())
+ orchestrator := build.NewOrchestrator(build.Options{Sys: sys, Command: command})
+ run := func(projectsBuilt int) {
+ t.Helper()
+ sys.clearOutput()
+ result := orchestrator.Build(t.Context(), "")
+ assert.Equal(t, int(result.Result.Status), 0, sys.getOutput(false))
+ assert.Equal(t, result.Statistics.ProjectsBuilt, projectsBuilt, sys.getOutput(false))
+ }
+ run(1)
+ run(0)
+ sys.writeFileNoError(dependencyProject+"index.ts", files[dependencyProject+"index.ts"].(string)+`
+ import { extra as additional } from "extra"; export const added = additional;`)
+ run(1)
+ for range 2 {
+ run(0)
+ }
+ })
+ }
+}
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js
index e0c852b91a649..945fa1ee96f90 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js
@@ -253,6 +253,9 @@ export {};
Watch Registrations::
Directory watches::
/home/src/tslibs/TS/Lib
+ /user/username/projects/myproject/node_modules
+ /user/username/projects/myproject/node_modules/pkg2/build
+ /user/username/projects/myproject/packages
/user/username/projects/myproject/packages/pkg1 (recursive)
/user/username/projects/myproject/packages/pkg2 (recursive)
packages/pkg2/tsconfig.json::
@@ -364,6 +367,9 @@ Resolving real path for '/user/username/projects/myproject/node_modules/pkg2/bui
Watch Registrations::
Directory watches::
/home/src/tslibs/TS/Lib
+ /user/username/projects/myproject/node_modules
+ /user/username/projects/myproject/node_modules/pkg2/build
+ /user/username/projects/myproject/packages
/user/username/projects/myproject/packages/pkg1 (recursive)
/user/username/projects/myproject/packages/pkg2 (recursive)
packages/pkg2/tsconfig.json::
@@ -469,6 +475,9 @@ File '/user/username/projects/myproject/packages/pkg2/const.ts' exists - use it
Watch Registrations::
Directory watches::
/home/src/tslibs/TS/Lib
+ /user/username/projects/myproject/node_modules
+ /user/username/projects/myproject/node_modules/pkg2/build
+ /user/username/projects/myproject/packages
/user/username/projects/myproject/packages/pkg1 (recursive)
/user/username/projects/myproject/packages/pkg2 (recursive)
packages/pkg2/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-package-json-lookups-from-existing-buildinfo.js b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-package-json-lookups-from-existing-buildinfo.js
index e6c690c77fa47..0880a54288ad8 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-package-json-lookups-from-existing-buildinfo.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-package-json-lookups-from-existing-buildinfo.js
@@ -52,12 +52,36 @@ Output::
[[90mHH:MM:SS AM[0m] Found 0 errors. Watching for file changes.
+//// [/home/src/tslibs/TS/Lib/lib.es2026.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; };
Watch Registrations::
Directory watches::
/user/username/projects/myproject
/user/username/projects/myproject/node_modules
/user/username/projects/myproject/node_modules/pkg2
+ /user/username/projects/myproject/packages
/user/username/projects/myproject/packages/pkg1 (recursive)
@@ -122,29 +146,6 @@ Directory '/node_modules' does not exist, skipping all lookups in it.
[[90mHH:MM:SS AM[0m] Found 1 error. Watching for file changes.
-//// [/home/src/tslibs/TS/Lib/lib.es2026.full.d.ts] *Lib*
-///
-interface Boolean {}
-interface Function {}
-interface CallableFunction {}
-interface NewableFunction {}
-interface IArguments {}
-interface Number { toExponential: any; }
-interface Object {}
-interface RegExp {}
-interface String { charAt: any; }
-interface Array { length: number; [n: number]: T; }
-interface ReadonlyArray {}
-interface SymbolConstructor {
- (desc?: string | number): symbol;
- for(name: string): symbol;
- readonly toStringTag: symbol;
-}
-declare var Symbol: SymbolConstructor;
-interface Symbol {
- readonly [Symbol.toStringTag]: string;
-}
-declare const console: { log(msg: any): void; };
//// [/user/username/projects/myproject/packages/pkg1/zzbuild/index.js] *rewrite with same content*
//// [/user/username/projects/myproject/packages/pkg1/zzbuild/tsconfig.tsbuildinfo] *modified*
{"version":"FakeTSVersion","root":["../index.ts"],"missingPackageJsons":["../../../node_modules/pkg2/package.json"],"semanticErrors":true,"nonIncrementalFileNames":[]}
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js
index 1be569026b5e6..a7e7d56513ebe 100644
--- a/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js
@@ -235,6 +235,8 @@ export {};
Watch Registrations::
Directory watches::
/home/src/tslibs/TS/Lib
+ /user/username/projects/myproject/node_modules/pkg2/build
+ /user/username/projects/myproject/packages
/user/username/projects/myproject/packages/pkg1 (recursive)
/user/username/projects/myproject/packages/pkg2 (recursive)
packages/pkg2/tsconfig.json::
@@ -345,6 +347,9 @@ exports.theNum = 42;
Watch Registrations::
Directory watches::
/home/src/tslibs/TS/Lib
+ /user/username/projects/myproject/node_modules
+ /user/username/projects/myproject/node_modules/pkg2/build
+ /user/username/projects/myproject/packages
/user/username/projects/myproject/packages/pkg1 (recursive)
/user/username/projects/myproject/packages/pkg2 (recursive)
packages/pkg1/tsconfig.json::
@@ -433,6 +438,8 @@ export const theNum = 42;
Watch Registrations::
Directory watches::
/home/src/tslibs/TS/Lib
+ /user/username/projects/myproject/node_modules/pkg2/build
+ /user/username/projects/myproject/packages
/user/username/projects/myproject/packages/pkg1 (recursive)
/user/username/projects/myproject/packages/pkg2 (recursive)
packages/pkg1/tsconfig.json::
@@ -534,6 +541,9 @@ exports.theNum = 42;
Watch Registrations::
Directory watches::
/home/src/tslibs/TS/Lib
+ /user/username/projects/myproject/node_modules
+ /user/username/projects/myproject/node_modules/pkg2/build
+ /user/username/projects/myproject/packages
/user/username/projects/myproject/packages/pkg1 (recursive)
/user/username/projects/myproject/packages/pkg2 (recursive)
packages/pkg1/tsconfig.json::
@@ -722,6 +732,9 @@ export type { TheNum } from './const.cjs';
Watch Registrations::
Directory watches::
/home/src/tslibs/TS/Lib
+ /user/username/projects/myproject/node_modules
+ /user/username/projects/myproject/node_modules/pkg2/build
+ /user/username/projects/myproject/packages
/user/username/projects/myproject/packages/pkg1 (recursive)
/user/username/projects/myproject/packages/pkg2 (recursive)
packages/pkg2/tsconfig.json::
From b121a2509340ab8f673d922021933d1e16f05014 Mon Sep 17 00:00:00 2001
From: John Favret <64748847+johnfav03@users.noreply.github.com>
Date: Thu, 29 Oct 2026 13:42:59 -0500
Subject: [PATCH 3/3] restore precise build-watch dependencies from build info
---
tsc/internal/execute/build/buildtask.go | 78 ++++++-
tsc/internal/execute/build/orchestrator.go | 80 ++++++-
.../execute/build/watchDependencies.go | 92 +++++++-
tsc/internal/execute/incremental/buildInfo.go | 59 ++++-
.../incremental/buildinfo_path_test.go | 18 +-
.../incremental/snapshottobuildinfo.go | 77 +++++++
.../tsctests/build_watch_dependencies_test.go | 49 +++++
.../tsctests/build_watch_precision_test.go | 207 ++++++++++++++++++
.../execute/tsctests/readablebuildinfo.go | 2 +-
...eSourceOfProjectReferenceRedirect.baseline | 8 +-
...rceOfProjectReferenceRedirectEdit.baseline | 8 +-
...OfProjectReferenceRedirectEditEnd.baseline | 8 +-
...clarationMapsRenameWithSourceMaps.baseline | 8 +-
...ationMapsRenameWithSourceMapsEdit.baseline | 8 +-
...onMapsRenameWithSourceMapsEditEnd.baseline | 8 +-
...psRenameWithSourceMapsNotSolution.baseline | 8 +-
...nameWithSourceMapsNotSolutionEdit.baseline | 8 +-
...eWithSourceMapsNotSolutionEditEnd.baseline | 8 +-
...erencingFileFromReferencedProject.baseline | 8 +-
...fReferencedProjectDeclarationMaps.baseline | 8 +-
...ReferencingDefaultProjectDirectly.baseline | 4 +-
...ferencingDefaultProjectIndirectly.baseline | 12 +-
...roughDisableReferencedProjectLoad.baseline | 12 +-
...ectLoadInOneButWithoutItInAnother.baseline | 12 +-
...ReferencingDefaultProjectDirectly.baseline | 4 +-
.../tsbuild/clean/tsx-with-dts-emit.js | 4 +-
.../different-options-with-incremental.js | 44 ++--
.../tsbuild/commandLine/different-options.js | 32 +--
...ndline-with-declaration-and-incremental.js | 24 +-
...y-false-on-commandline-with-declaration.js | 8 +-
...mitDeclarationOnly-false-on-commandline.js | 24 +-
...ndline-with-declaration-and-incremental.js | 52 ++---
...ionOnly-on-commandline-with-declaration.js | 8 +-
.../emitDeclarationOnly-on-commandline.js | 52 ++---
...nfig-json-can-be-imported-as-json-input.js | 4 +-
.../reports-syntax-errors-in-config-file.js | 12 +-
.../when-tsconfig-extends-the-missing-file.js | 8 +-
...t-mapper-identity-change-forces-rebuild.js | 8 +-
...ild-to-report-mapper-option-diagnostics.js | 4 +-
...-dts-generation-errors-with-incremental.js | 4 +-
.../reports-dts-generation-errors.js | 4 +-
...ugh-triple-slash-but-uses-no-references.js | 4 +-
...file-is-referenced-through-triple-slash.js | 12 +-
...d-inferred-type-from-referenced-project.js | 8 +-
...rough-triple-slash-from-another-project.js | 8 +-
...ferenced-project-type-via-types-subpath.js | 8 +-
...s-not-in-rootDir-at-the-import-location.js | 12 +-
.../in-circular-is-set-in-the-reference.js | 20 +-
...ng-setup-correctly-and-reports-no-error.js | 12 +-
...when-global-scope-dependency-is-updated.js | 8 +-
...update-batch-has-no-global-scope-change.js | 8 +-
...te-batch-includes-a-global-scope-change.js | 8 +-
...absolute-non-root-dependency-is-updated.js | 8 +-
...n-dependency-in-node_modules-is-updated.js | 16 +-
...directs-to-a-different-declaration-file.js | 8 +-
...issing-dependency-package-json-is-added.js | 8 +-
...-emitDeclarationOnly-and-declarationMap.js | 8 +-
...import-project-with-emitDeclarationOnly.js | 8 +-
...mports-project-with-emitDeclarationOnly.js | 12 +-
.../tsbuild/extends/configDir-template.js | 4 +-
.../extends/resolves-the-symlink-path.js | 4 +-
...nce-and-both-extend-config-with-include.js | 8 +-
...th-projects-extends-config-with-include.js | 8 +-
.../deleted-file-without-composite.js | 8 +-
.../fileDelete/detects-deleted-file.js | 12 +-
.../reverse-mapped-declaration-consumption.js | 12 +-
...-references-another-project-in-monorepo.js | 12 +-
...-transitive-module-with-isolatedModules.js | 12 +-
.../inferred-type-from-transitive-module.js | 12 +-
...hange-in-signature-with-isolatedModules.js | 20 +-
...based-projects-and-emits-them-correctly.js | 12 +-
...ved-json-files-and-emits-them-correctly.js | 12 +-
...s-merged-and-contains-late-bound-member.js | 12 +-
.../with-config-with-libReplacement.js | 16 +-
.../tsbuild/libraryResolution/with-config.js | 16 +-
...iffers-between-projects-for-shared-file.js | 8 +-
...olution-from-d.ts-of-referenced-project.js | 8 +-
...project-correctly-with-preserveSymlinks.js | 8 +-
...-file-from-referenced-project-correctly.js | 8 +-
...ared-resolution-should-not-report-error.js | 8 +-
...t-resolution-options-referenced-project.js | 8 +-
.../when-resolution-is-not-shared.js | 8 +-
...fiers-across-projects-resolve-correctly.js | 8 +-
...zed-module-specifiers-resolve-correctly.js | 12 +-
.../noCheck/dts-errors-with-incremental.js | 44 ++--
.../reference/tsbuild/noCheck/dts-errors.js | 44 ++--
.../semantic-errors-with-incremental.js | 44 ++--
.../tsbuild/noCheck/semantic-errors.js | 36 +--
.../noCheck/syntax-errors-with-incremental.js | 44 ++--
.../tsbuild/noCheck/syntax-errors.js | 44 ++--
.../tsbuild/noEmit/changes-composite.js | 24 +-
.../noEmit/changes-incremental-declaration.js | 24 +-
.../tsbuild/noEmit/changes-incremental.js | 24 +-
.../changes-with-initial-noEmit-composite.js | 20 +-
...-initial-noEmit-incremental-declaration.js | 20 +-
...changes-with-initial-noEmit-incremental.js | 20 +-
...ble-changes-with-incremental-as-modules.js | 24 +-
...aration-enable-changes-with-incremental.js | 24 +-
...tion-enable-changes-with-multiple-files.js | 32 +--
...-errors-with-declaration-enable-changes.js | 20 +-
.../dts-errors-with-incremental-as-modules.js | 20 +-
.../noEmit/dts-errors-with-incremental.js | 20 +-
...dts-enabled-with-incremental-as-modules.js | 20 +-
...rs-without-dts-enabled-with-incremental.js | 20 +-
.../noEmit/dts-errors-without-dts-enabled.js | 4 +-
.../reference/tsbuild/noEmit/dts-errors.js | 12 +-
...ntic-errors-with-incremental-as-modules.js | 20 +-
.../semantic-errors-with-incremental.js | 20 +-
.../tsbuild/noEmit/semantic-errors.js | 12 +-
...ntax-errors-with-incremental-as-modules.js | 20 +-
.../noEmit/syntax-errors-with-incremental.js | 20 +-
.../reference/tsbuild/noEmit/syntax-errors.js | 12 +-
...rrors-with-declaration-with-incremental.js | 8 +-
.../dts-errors-with-declaration.js | 8 +-
.../dts-errors-with-incremental.js | 8 +-
.../tsbuild/noEmitOnError/dts-errors.js | 4 +-
...rrors-with-declaration-with-incremental.js | 8 +-
.../semantic-errors-with-declaration.js | 8 +-
.../semantic-errors-with-incremental.js | 8 +-
.../tsbuild/noEmitOnError/semantic-errors.js | 8 +-
...rrors-with-declaration-with-incremental.js | 8 +-
.../syntax-errors-with-declaration.js | 8 +-
.../syntax-errors-with-incremental.js | 8 +-
.../tsbuild/noEmitOnError/syntax-errors.js | 8 +-
...otDir-is-not-specified-and-is-composite.js | 4 +-
.../when-rootDir-is-not-specified.js | 4 +-
...iles-belong-to-rootDir-and-is-composite.js | 4 +-
...ied-but-not-all-files-belong-to-rootDir.js | 4 +-
.../outputPaths/when-rootDir-is-specified.js | 4 +-
...info-has-fewer-fileInfos-than-fileNames.js | 4 +-
...e-from-project-reference-with-composite.js | 12 +-
...n-root-is-source-from-project-reference.js | 16 +-
...n-file-belongs-to-multiple-sub-projects.js | 12 +-
.../builds-correctly.js | 8 +-
...nfo-file-because-no-rootDir-in-the-base.js | 4 +-
...dinfo-file-without-incremental-with-tsc.js | 4 +-
...me-tsbuildinfo-file-without-incremental.js | 4 +-
...reports-error-for-same-tsbuildinfo-file.js | 4 +-
...eports-no-error-when-tsbuildinfo-differ.js | 8 +-
...rojects-in-a-solution-with---builders-3.js | 108 ++++-----
...hen-there-are-23-projects-in-a-solution.js | 108 ++++-----
...rojects-in-a-solution-with---builders-1.js | 28 +--
...when-there-are-3-projects-in-a-solution.js | 28 +--
...rojects-in-a-solution-with---builders-2.js | 36 +--
...when-there-are-5-projects-in-a-solution.js | 36 +--
...rojects-in-a-solution-with---builders-3.js | 48 ++--
...when-there-are-8-projects-in-a-solution.js | 48 ++--
...iles-containing-json-file-non-composite.js | 4 +-
.../files-containing-json-file.js | 4 +-
...ting-json-module-from-project-reference.js | 8 +-
.../include-and-files-non-composite.js | 4 +-
.../resolveJsonModule/include-and-files.js | 4 +-
...file-name-matches-ts-file-non-composite.js | 4 +-
...r-include-and-file-name-matches-ts-file.js | 4 +-
...-along-with-other-include-non-composite.js | 4 +-
...nclude-of-json-along-with-other-include.js | 4 +-
.../include-only-non-composite.js | 4 +-
...-with-json-not-in-rootDir-non-composite.js | 4 +-
.../include-only-with-json-not-in-rootDir.js | 4 +-
...t-outside-configDirectory-non-composite.js | 4 +-
...out-rootDir-but-outside-configDirectory.js | 4 +-
...clude-only-without-outDir-non-composite.js | 4 +-
.../include-only-without-outDir.js | 4 +-
.../tsbuild/resolveJsonModule/include-only.js | 4 +-
.../sourcemap-non-composite.js | 4 +-
.../tsbuild/resolveJsonModule/sourcemap.js | 4 +-
.../without-outDir-non-composite.js | 4 +-
.../resolveJsonModule/without-outDir.js | 4 +-
...nsecutive-and-non-consecutive-are-mixed.js | 8 +-
.../roots/when-files-are-not-consecutive.js | 8 +-
...hen-multiple-root-files-are-consecutive.js | 8 +-
...-referenced-project-and-shared-is-first.js | 24 +-
...en-root-file-is-from-referenced-project.js | 24 +-
.../when-two-root-files-are-consecutive.js | 8 +-
.../always-builds-under-with-force-option.js | 12 +-
...rectly-when-declarationDir-is-specified.js | 12 +-
...ilds-correctly-when-outDir-is-specified.js | 12 +-
...composite-or-doesnt-have-any-references.js | 4 +-
...s-even-if-upstream-projects-have-errors.js | 12 +-
.../can-detect-when-and-what-to-rebuild.js | 24 +-
.../reference/tsbuild/sample/explainFiles.js | 28 +--
...it-would-skip-builds-during-a-dry-build.js | 12 +-
.../tsbuild/sample/listEmittedFiles.js | 28 +--
.../reference/tsbuild/sample/listFiles.js | 28 +--
...-in-tsbuildinfo-doesnt-match-ts-version.js | 24 +-
...uilds-from-start-if-force-option-is-set.js | 12 +-
...uilds-when-extended-config-file-changes.js | 16 +-
.../sample/removes-all-files-it-built.js | 12 +-
...ror-if-input-file-is-missing-with-force.js | 12 +-
.../reports-error-if-input-file-is-missing.js | 12 +-
.../reference/tsbuild/sample/sample.js | 36 +--
...rrors-when-test-does-not-reference-core.js | 16 +-
...ects-have-errors-with-stopBuildOnErrors.js | 16 +-
.../tsbuild/sample/tsbuildinfo-has-error.js | 8 +-
.../sample/when-declaration-option-changes.js | 8 +-
.../sample/when-declarationMap-changes.js | 20 +-
.../when-esModuleInterop-option-changes.js | 16 +-
...ot-change-but-its-modified-time-changes.js | 12 +-
.../when-logic-specifies-tsBuildInfoFile.js | 12 +-
.../sample/when-module-option-changes.js | 8 +-
.../sample/when-target-option-changes.js | 8 +-
...es-is-empty-and-references-are-provided.js | 4 +-
...ter-initial-build-doesnt-build-anything.js | 12 +-
.../when-solution-is-referenced-indirectly.js | 16 +-
.../transitiveReferences/builds-correctly.js | 12 +-
...de-resolution-with-external-module-name.js | 12 +-
.../reports-syntax-errors-in-config-file.js | 12 +-
.../demo/updates-with-bad-reference.js | 16 +-
.../demo/updates-with-circular-reference.js | 12 +-
...es-absolute-non-root-dependency-updates.js | 8 +-
.../extends/configDir-template.js | 4 +-
.../with-config-with-libReplacement.js | 16 +-
.../libraryResolution/with-config.js | 16 +-
...for-changes-to-package-json-main-fields.js | 16 +-
...de-watches-missing-package-json-lookups.js | 12 +-
...ge-json-lookups-from-existing-buildinfo.js | 54 ++---
...se-different-module-resolution-settings.js | 12 +-
...t-correctly-with-cts-and-mts-extensions.js | 28 +--
...n-no-files-are-emitted-with-incremental.js | 8 +-
...when-watching-when-no-files-are-emitted.js | 4 +-
.../dts-errors-with-incremental-as-modules.js | 20 +-
.../noEmit/dts-errors-with-incremental.js | 20 +-
...dts-enabled-with-incremental-as-modules.js | 20 +-
...rs-without-dts-enabled-with-incremental.js | 20 +-
.../noEmit/dts-errors-without-dts-enabled.js | 4 +-
.../tsbuildWatch/noEmit/dts-errors.js | 12 +-
...ntic-errors-with-incremental-as-modules.js | 20 +-
.../semantic-errors-with-incremental.js | 20 +-
.../tsbuildWatch/noEmit/semantic-errors.js | 12 +-
...ntax-errors-with-incremental-as-modules.js | 20 +-
.../noEmit/syntax-errors-with-incremental.js | 20 +-
.../tsbuildWatch/noEmit/syntax-errors.js | 12 +-
...Error-with-declaration-with-incremental.js | 24 +-
.../noEmitOnError-with-declaration.js | 24 +-
.../noEmitOnError-with-incremental.js | 24 +-
.../noEmitOnError/noEmitOnError.js | 16 +-
...ceError-when-file-with-no-error-changes.js | 12 +-
...ing-errors-only-changed-file-is-emitted.js | 12 +-
...tErrors-when-file-with-no-error-changes.js | 8 +-
...ixing-error-files-all-files-are-emitted.js | 8 +-
.../programUpdates/tsbuildinfo-has-error.js | 4 +-
...e-down-stream-project-and-then-fixes-it.js | 24 +-
...project-with-extended-config-is-removed.js | 8 +-
...hen-noUnusedParameters-changes-to-false.js | 8 +-
.../works-with-extended-source-files.js | 20 +-
...rojects-in-a-solution-with---builders-3.js | 108 ++++-----
...hen-there-are-23-projects-in-a-solution.js | 108 ++++-----
...rojects-in-a-solution-with---builders-1.js | 28 +--
...when-there-are-3-projects-in-a-solution.js | 28 +--
...rojects-in-a-solution-with---builders-2.js | 36 +--
...when-there-are-5-projects-in-a-solution.js | 36 +--
...rojects-in-a-solution-with---builders-3.js | 48 ++--
...when-there-are-8-projects-in-a-solution.js | 48 ++--
.../reexport/Reports-errors-correctly.js | 24 +-
...-referenced-project-and-shared-is-first.js | 24 +-
...en-root-file-is-from-referenced-project.js | 24 +-
...equent-updates-with-circular-references.js | 20 +-
...le-is-added,-and-its-subsequent-updates.js | 20 +-
...errors-message-with-circular-references.js | 48 ++--
...hanges-and-reports-found-errors-message.js | 48 ++--
.../incremental-updates-in-verbose-mode.js | 24 +-
...ncing-projects-with-circular-references.js | 16 +-
...not-start-build-of-referencing-projects.js | 16 +-
...rs-when-preserveWatchOutput-is-not-used.js | 24 +-
...veWatchOutput-is-passed-on-command-line.js | 24 +-
...BuildOnErrors-is-passed-on-command-line.js | 20 +-
...e-of-program-emit-with-outDir-specified.js | 8 +-
...r-recompilation-because-of-program-emit.js | 8 +-
...rrors-when-test-does-not-reference-core.js | 16 +-
...ects-have-errors-with-stopBuildOnErrors.js | 16 +-
...tches-config-files-that-are-not-present.js | 16 +-
.../reports-dts-generation-errors.js | 4 +-
272 files changed, 2775 insertions(+), 2153 deletions(-)
diff --git a/tsc/internal/execute/build/buildtask.go b/tsc/internal/execute/build/buildtask.go
index 30fab009926e6..8368b4e56762a 100644
--- a/tsc/internal/execute/build/buildtask.go
+++ b/tsc/internal/execute/build/buildtask.go
@@ -16,6 +16,7 @@ import (
"github.com/microsoft/TypeScript/tsc/internal/diagnostics"
"github.com/microsoft/TypeScript/tsc/internal/execute/incremental"
"github.com/microsoft/TypeScript/tsc/internal/execute/tsc"
+ "github.com/microsoft/TypeScript/tsc/internal/fswatch"
"github.com/microsoft/TypeScript/tsc/internal/tsoptions"
"github.com/microsoft/TypeScript/tsc/internal/tspath"
)
@@ -150,7 +151,9 @@ func (t *BuildTask) buildProject(orchestrator *Orchestrator, path tspath.PathKey
// Wait on upstream tasks to complete
t.waitOnUpstream()
if t.pending.Load() {
- t.status = t.getUpToDateStatus(orchestrator, path)
+ if t.status == nil {
+ t.status = t.getUpToDateStatus(orchestrator, path)
+ }
t.reportUpToDateStatus(orchestrator)
if !t.handleStatusThatDoesntRequireBuild(orchestrator) {
t.compileAndEmit(orchestrator, path)
@@ -222,7 +225,7 @@ func (t *BuildTask) updateDownstream(orchestrator *Orchestrator, path tspath.Pat
}
}
-func (t *BuildTask) captureCurrentWatchDependencies(orchestrator *Orchestrator, contentMapperProject contentmapper.Project) {
+func (t *BuildTask) captureCurrentWatchDependencies(orchestrator *Orchestrator, contentMapperProject contentmapper.Project) *compiler.Program {
host := &compilerHost{
host: orchestrator.host,
trace: func(*diagnostics.Message, ...any) {},
@@ -231,6 +234,7 @@ func (t *BuildTask) captureCurrentWatchDependencies(orchestrator *Orchestrator,
host.trackDependencies()
program := compiler.NewProgram(compiler.ProgramOptions{Config: t.resolved, Host: host})
t.captureWatchDependencies(orchestrator, program, host.watchFS)
+ return program
}
func (t *BuildTask) compileAndEmit(orchestrator *Orchestrator, path tspath.PathKey) {
@@ -368,9 +372,6 @@ func (t *BuildTask) handleStatusThatDoesntRequireBuild(orchestrator *Orchestrato
}
func (t *BuildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tspath.PathKey) *upToDateStatus {
- if t.status != nil {
- return t.status
- }
// Config file not found
if t.resolved == nil {
return &upToDateStatus{kind: upToDateStatusTypeConfigFileNotFound}
@@ -406,7 +407,6 @@ func (t *BuildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tsp
if !buildInfo.IsValidVersion() {
return &upToDateStatus{kind: upToDateStatusTypeTsVersionOutputOfDate, data: buildInfo.Version}
}
-
// If a configured content mapper's identity has changed, files it produced may be stale.
contentMapperProject, err := t.getContentMapperProject(orchestrator)
contentMapperIdentities, identityErr := incremental.ContentMapperIdentities(contentMapperProject)
@@ -654,7 +654,10 @@ func (t *BuildTask) getUpToDateStatus(orchestrator *Orchestrator, configPath tsp
}
if orchestrator.opts.Command.CompilerOptions.Watch.IsTrue() {
- if t.watchDependencies == nil || t.watchDependenciesDirty {
+ if t.watchDependencies == nil {
+ t.watchDependencies = watchDependenciesFromBuildInfo(orchestrator, buildInfo, getBuildInfoDirectory())
+ }
+ if (!t.watchDependencies.complete && t.watchDependencies.watchDirectories == nil) || t.watchDependenciesDirty {
t.captureCurrentWatchDependencies(orchestrator, contentMapperProject)
}
if input := t.watchDependencies.changedInputAlias(orchestrator, nil); input != "" {
@@ -711,6 +714,67 @@ func isContentMapperVirtualFilePath(inputPath tspath.PathKey, roots *incremental
return err == nil
}
+func (t *BuildTask) buildInfoUnclassifiedEvents(
+ orchestrator *Orchestrator,
+ buildInfo *incremental.BuildInfo,
+ buildInfoDirectory tspath.RootedDirectoryPath,
+ paths map[tspath.PathKey]fswatch.EventKind,
+) map[tspath.PathKey]fswatch.EventKind {
+ if buildInfo == nil {
+ return nil
+ }
+ knownFiles := make(map[tspath.PathKey]struct{})
+ directories := &collections.Set[tspath.PathKey]{}
+ addFile := func(file tspath.RootedFilePath) {
+ knownFiles[orchestrator.caseSensitivity.PathKey(file.AsPath())] = struct{}{}
+ directories.Add(orchestrator.caseSensitivity.PathKey(file.Directory().AsPath()))
+ realPath := orchestrator.host.FS().Realpath(file.AsPath())
+ knownFiles[orchestrator.caseSensitivity.PathKey(realPath)] = struct{}{}
+ directories.Add(orchestrator.caseSensitivity.PathKey(realPath.Directory().AsPath()))
+ }
+ addFile(t.config)
+ for _, file := range t.resolved.FileNames() {
+ addFile(file)
+ }
+ for _, fileName := range buildInfo.FileNames {
+ if !incremental.IsBuildInfoFileNameDefaultLibrary(fileName) {
+ addFile(incremental.ResolveBuildInfoFileName(fileName, buildInfoDirectory, orchestrator.host.DefaultLibraryPath()))
+ }
+ }
+ for file := range buildInfo.GetNonIncrementalFileNames(buildInfoDirectory) {
+ addFile(file)
+ }
+ for file, realPath := range buildInfo.GetInputAliases(buildInfoDirectory) {
+ addFile(file)
+ addFile(realPath)
+ }
+ for file := range buildInfo.GetPackageJsons(buildInfoDirectory) {
+ addFile(file)
+ }
+ for file := range buildInfo.GetMissingPackageJsons(buildInfoDirectory) {
+ addFile(file)
+ }
+ for dir := range buildInfo.GetWatchDirectories(buildInfoDirectory) {
+ directories.Add(orchestrator.caseSensitivity.PathKey(dir.AsPath()))
+ }
+ var result map[tspath.PathKey]fswatch.EventKind
+ for path, kind := range paths {
+ if _, known := knownFiles[path]; known {
+ continue
+ }
+ for dirPath := range directories.Keys() {
+ if path.ContainsPath(dirPath) || dirPath.ContainsPath(path) {
+ if result == nil {
+ result = make(map[tspath.PathKey]fswatch.EventKind)
+ }
+ result[path] = kind
+ break
+ }
+ }
+ }
+ return result
+}
+
func (t *BuildTask) reportUpToDateStatus(orchestrator *Orchestrator) {
if !orchestrator.opts.Command.BuildOptions.Verbose.IsTrue() {
return
diff --git a/tsc/internal/execute/build/orchestrator.go b/tsc/internal/execute/build/orchestrator.go
index 0abda9d53331c..33d6739789389 100644
--- a/tsc/internal/execute/build/orchestrator.go
+++ b/tsc/internal/execute/build/orchestrator.go
@@ -522,7 +522,8 @@ func (o *Orchestrator) resetCaches() {
o.host.configTimes = collections.SyncMap[tspath.PathKey, time.Duration]{}
}
-func (o *Orchestrator) checkTasksForEventChanges(changedPaths map[tspath.RootedPath]fswatch.EventKind, needsConfigUpdate, needsUpdate *atomic.Bool) {
+func (o *Orchestrator) checkTasksForEventChanges(changedPaths map[tspath.RootedPath]fswatch.EventKind, needsConfigUpdate, needsUpdate *atomic.Bool) bool {
+ needsWatchUpdate := false
normalizedPaths := make(map[tspath.PathKey]fswatch.EventKind, len(changedPaths))
for eventPath, kind := range changedPaths {
normalizedPaths[o.caseSensitivity.PathKey(eventPath)] = kind
@@ -636,6 +637,41 @@ func (o *Orchestrator) checkTasksForEventChanges(changedPaths map[tspath.RootedP
}
}
input, changed, aliasChanged := task.watchDependencies.changed(o, normalizedPaths, roots, handled)
+ if input == "" && task.watchDependencies != nil && !task.watchDependencies.complete && bi != nil {
+ dependencyPaths := task.buildInfoUnclassifiedEvents(o, bi.buildInfo, bi.fileName.Directory(), normalizedPaths)
+ for path := range dependencyPaths {
+ if roots.Has(path) || handled.Has(path) {
+ delete(dependencyPaths, path)
+ }
+ }
+ if len(dependencyPaths) != 0 {
+ contentMapperProject, err := task.getContentMapperProject(o)
+ if err != nil {
+ task.resetStatus()
+ needsUpdate.Store(true)
+ } else {
+ previous := task.watchDependencies
+ program := task.captureCurrentWatchDependencies(o, contentMapperProject)
+ needsWatchUpdate = true
+ if affected, affectedChanged := task.watchDependencies.affectedInput(dependencyPaths, &previous.inputPaths); affectedChanged {
+ input = affected
+ // Broad directory notifications can also cover unchanged consumed inputs.
+ changed = changed || input != "" || needsUpdate.Load() ||
+ task.getUpToDateStatus(o, path).kind != upToDateStatusTypeUpToDate
+ }
+ if task.inputAliasChanged {
+ input = task.changedInput
+ changed = true
+ aliasChanged = true
+ }
+ // Enumeration changes can introduce diagnostics without adding a consumed input.
+ if len(program.GetProgramDiagnostics()) != 0 {
+ input = task.config.AsPath()
+ changed = true
+ }
+ }
+ }
+ }
if !changed && task.watchDependencies != nil && bi != nil {
// Directory notifications can replace consumed children without naming them.
for inputPath, inputFile := range task.watchDependencies.lookups {
@@ -699,6 +735,7 @@ func (o *Orchestrator) checkTasksForEventChanges(changedPaths map[tspath.RootedP
}
}
}
+ return needsWatchUpdate
}
func (o *Orchestrator) packageJsonLookupChanged(packageJson tspath.RootedFilePath, changedPaths map[tspath.PathKey]fswatch.EventKind, handled *collections.Set[tspath.PathKey]) bool {
@@ -792,6 +829,15 @@ func (o *Orchestrator) computeDesiredWatches() map[tspath.RootedDirectoryPath]bo
for fileName := range bi.buildInfo.GetNonIncrementalFileNames(buildInfoDir) {
o.addProgramFileWatchDir(desiredDirs, o.host.FS().Realpath(fileName.AsPath()).Directory())
}
+ for fileName, realPath := range bi.buildInfo.GetInputAliases(buildInfoDir) {
+ o.addProgramFileWatchDir(desiredDirs, fileName.Directory())
+ o.addProgramFileWatchDir(desiredDirs, realPath.Directory())
+ }
+ for dir := range bi.buildInfo.GetWatchDirectories(buildInfoDir) {
+ if !desiredDirs.Covered(dir) {
+ desiredDirs.Set(dir, false)
+ }
+ }
for packageJson := range bi.buildInfo.GetPackageJsons(buildInfoDir) {
o.addPackageJsonWatchDirs(desiredDirs, packageJson)
}
@@ -812,6 +858,15 @@ func (o *Orchestrator) addDependencyWatchDirs(desiredDirs *watchmanager.DirWatch
if dependencies == nil {
return
}
+ if !dependencies.complete {
+ o.addKnownDependencyWatchDirs(desiredDirs, dependencies)
+ for _, dir := range dependencies.watchDirectories {
+ if !desiredDirs.Covered(dir) {
+ desiredDirs.Set(dir, false)
+ }
+ }
+ return
+ }
o.addKnownDependencyWatchDirs(desiredDirs, dependencies)
o.addResidualDependencyWatchDirs(desiredDirs, configDir, dependencies)
}
@@ -864,6 +919,22 @@ func (o *Orchestrator) addResidualDependencyWatchDirs(desiredDirs *watchmanager.
}
}
+func (o *Orchestrator) persistedDependencyWatchDirs(configDir tspath.RootedDirectoryPath, dependencies *watchDependencies) []tspath.RootedDirectoryPath {
+ dirs := watchmanager.NewDirWatchSet(o.caseSensitivity)
+ dirs.Set(configDir, false)
+ o.addKnownDependencyWatchDirs(dirs, dependencies)
+ known := maps.Clone(dirs.Dirs())
+ o.addResidualDependencyWatchDirs(dirs, configDir, dependencies)
+ result := make([]tspath.RootedDirectoryPath, 0, len(dirs.Dirs()))
+ for dir := range dirs.Dirs() {
+ if _, ok := known[dir]; !ok {
+ result = append(result, dir)
+ }
+ }
+ slices.Sort(result)
+ return result
+}
+
func (o *Orchestrator) addWatchDir(desiredDirs *watchmanager.DirWatchSet, dir tspath.RootedDirectoryPath) {
if !desiredDirs.Covered(dir) && watchmanager.CanWatchDirectory(dir) {
desiredDirs.Set(dir, false)
@@ -949,6 +1020,7 @@ func (o *Orchestrator) doCycle(changedPaths map[tspath.RootedPath]fswatch.EventK
var needsConfigUpdate atomic.Bool
var needsUpdate atomic.Bool
+ needsWatchUpdate := false
if overflow {
// Overflow: reset all tasks to force a full rebuild.
@@ -964,10 +1036,14 @@ func (o *Orchestrator) doCycle(changedPaths map[tspath.RootedPath]fswatch.EventK
needsUpdate.Store(true)
} else {
// Event-driven: check only tasks affected by changed paths
- o.checkTasksForEventChanges(changedPaths, &needsConfigUpdate, &needsUpdate)
+ needsWatchUpdate = o.checkTasksForEventChanges(changedPaths, &needsConfigUpdate, &needsUpdate)
}
if !needsUpdate.Load() {
+ if needsWatchUpdate {
+ o.updateWatch()
+ o.reconcileWatches()
+ }
o.resetCaches()
return false
}
diff --git a/tsc/internal/execute/build/watchDependencies.go b/tsc/internal/execute/build/watchDependencies.go
index b301058b128f3..185b380377fbd 100644
--- a/tsc/internal/execute/build/watchDependencies.go
+++ b/tsc/internal/execute/build/watchDependencies.go
@@ -7,6 +7,7 @@ import (
"github.com/microsoft/TypeScript/tsc/internal/collections"
"github.com/microsoft/TypeScript/tsc/internal/compiler"
"github.com/microsoft/TypeScript/tsc/internal/core"
+ "github.com/microsoft/TypeScript/tsc/internal/execute/incremental"
"github.com/microsoft/TypeScript/tsc/internal/fswatch"
"github.com/microsoft/TypeScript/tsc/internal/module"
"github.com/microsoft/TypeScript/tsc/internal/tsoptions"
@@ -17,9 +18,10 @@ import (
type dependencyTrackingFS struct {
trackingvfs.FS
- directories collections.SyncSet[tspath.RootedDirectoryPath]
- enumerations collections.SyncMap[tspath.RootedDirectoryPath, []string]
- realpaths collections.SyncMap[tspath.RootedPath, tspath.RootedPath]
+ directories collections.SyncSet[tspath.RootedDirectoryPath]
+ enumerations collections.SyncMap[tspath.RootedDirectoryPath, []string]
+ realpaths collections.SyncMap[tspath.RootedPath, tspath.RootedPath]
+ watchDirectories []tspath.RootedDirectoryPath
}
func (f *dependencyTrackingFS) Realpath(path tspath.RootedPath) tspath.RootedPath {
@@ -62,6 +64,49 @@ type watchDependencies struct {
relativeDirectories collections.Set[tspath.RootedDirectoryPath]
enumerations map[tspath.PathKey]directoryDependency
referenceSources collections.Set[tspath.PathKey]
+ watchDirectories []tspath.RootedDirectoryPath
+ complete bool
+}
+
+func watchDependenciesFromBuildInfo(o *Orchestrator, buildInfo *incremental.BuildInfo, buildInfoDirectory tspath.RootedDirectoryPath) *watchDependencies {
+ dependencies := &watchDependencies{
+ inputs: make(map[tspath.PathKey]tspath.RootedFilePath),
+ inputAliases: make(map[tspath.PathKey]inputAlias),
+ lookups: make(map[tspath.PathKey]tspath.RootedPath),
+ enumerations: make(map[tspath.PathKey]directoryDependency),
+ }
+ addInput := func(file tspath.RootedFilePath) {
+ path := o.caseSensitivity.PathKey(file.AsPath())
+ dependencies.inputs[path] = file
+ dependencies.inputPaths.Add(path)
+ dependencies.inputPaths.Add(o.caseSensitivity.PathKey(o.host.FS().Realpath(file.AsPath())))
+ }
+ for _, file := range buildInfo.FileNames {
+ if !incremental.IsBuildInfoFileNameDefaultLibrary(file) {
+ addInput(incremental.ResolveBuildInfoFileName(file, buildInfoDirectory, o.host.DefaultLibraryPath()))
+ }
+ }
+ for _, root := range buildInfo.Root {
+ if root.NonIncremental != "" {
+ addInput(incremental.ResolveBuildInfoFileName(root.NonIncremental, buildInfoDirectory, ""))
+ }
+ }
+ for file := range buildInfo.GetNonIncrementalFileNames(buildInfoDirectory) {
+ addInput(file)
+ }
+ for file, realPath := range buildInfo.GetInputAliases(buildInfoDirectory) {
+ path := o.caseSensitivity.PathKey(file.AsPath())
+ realPathKey := o.caseSensitivity.PathKey(realPath.AsPath())
+ dependencies.inputAliases[path] = inputAlias{file: file, realPath: realPathKey}
+ dependencies.inputPaths.Add(path)
+ dependencies.inputPaths.Add(realPathKey)
+ dependencies.lookups[path] = file.AsPath()
+ dependencies.lookups[realPathKey] = realPath.AsPath()
+ }
+ dependencies.watchDirectories = core.Map(buildInfo.WatchDirectories, func(path incremental.BuildInfoPath) tspath.RootedDirectoryPath {
+ return buildInfoDirectory.ResolveDirectory(path.AsString())
+ })
+ return dependencies
}
func (d *watchDependencies) addInputAlias(o *Orchestrator, path, realPath tspath.RootedPath) {
@@ -176,9 +221,24 @@ func (t *BuildTask) captureWatchDependencies(o *Orchestrator, program *compiler.
}
t.watchDependencies = dependencies
t.watchDependenciesDirty = false
+ dependencies.complete = true
+ fs.watchDirectories = o.persistedDependencyWatchDirs(t.config.Directory(), dependencies)
return true
}
+func (f *dependencyTrackingFS) BuildInfoInputAliases() map[tspath.RootedPath]tspath.RootedPath {
+ aliases := make(map[tspath.RootedPath]tspath.RootedPath)
+ f.realpaths.Range(func(path, realPath tspath.RootedPath) bool {
+ aliases[path] = realPath
+ return true
+ })
+ return aliases
+}
+
+func (f *dependencyTrackingFS) BuildInfoWatchDirectories() []tspath.RootedDirectoryPath {
+ return slices.Clone(f.watchDirectories)
+}
+
func (d *watchDependencies) changedInputAlias(o *Orchestrator, paths map[tspath.PathKey]fswatch.EventKind) tspath.RootedPath {
if d == nil {
return ""
@@ -253,3 +313,29 @@ func (d *watchDependencies) changed(o *Orchestrator, paths map[tspath.PathKey]fs
}
return "", inputChanged, false
}
+
+func (d *watchDependencies) affectedInput(paths map[tspath.PathKey]fswatch.EventKind, knownInputs *collections.Set[tspath.PathKey]) (input tspath.RootedPath, changed bool) {
+ for _, inputPath := range slices.Sorted(maps.Keys(d.inputPaths.Keys())) {
+ for eventPath := range paths {
+ if eventPath.ContainsPath(inputPath) || inputPath.ContainsPath(eventPath) {
+ if input := d.lookups[inputPath]; input != "" {
+ if !knownInputs.Has(inputPath) {
+ return input, true
+ }
+ changed = true
+ }
+ }
+ }
+ }
+ for _, aliasPath := range slices.Sorted(maps.Keys(d.inputAliases)) {
+ for eventPath := range paths {
+ if eventPath.ContainsPath(aliasPath) || aliasPath.ContainsPath(eventPath) {
+ if !knownInputs.Has(aliasPath) {
+ return d.inputAliases[aliasPath].file.AsPath(), true
+ }
+ changed = true
+ }
+ }
+ }
+ return "", changed
+}
diff --git a/tsc/internal/execute/incremental/buildInfo.go b/tsc/internal/execute/incremental/buildInfo.go
index 4cca63c6b1e7b..710f7d4540622 100644
--- a/tsc/internal/execute/incremental/buildInfo.go
+++ b/tsc/internal/execute/incremental/buildInfo.go
@@ -470,16 +470,40 @@ func (b *BuildInfoResolvedRoot) UnmarshalJSON(data []byte) error {
return nil
}
+type BuildInfoInputAlias struct {
+ Path BuildInfoPath
+ RealPath BuildInfoPath
+}
+
+func (b *BuildInfoInputAlias) MarshalJSON() ([]byte, error) {
+ return json.Marshal([2]BuildInfoPath{b.Path, b.RealPath})
+}
+
+func (b *BuildInfoInputAlias) UnmarshalJSON(data []byte) error {
+ var pathAndRealPath [2]BuildInfoPath
+ if err := json.Unmarshal(data, &pathAndRealPath); err != nil {
+ return fmt.Errorf("invalid BuildInfoInputAlias: %s", data)
+ }
+ *b = BuildInfoInputAlias{
+ Path: pathAndRealPath[0],
+ RealPath: pathAndRealPath[1],
+ }
+ return nil
+}
+
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"`
- PackageJsons []BuildInfoPath `json:"packageJsons,omitzero"`
- MissingPackageJsons []BuildInfoPath `json:"missingPackageJsons,omitzero"`
- ContentMapperIdentities []string `json:"contentMapperIdentities,omitzero"`
+ Errors bool `json:"errors,omitzero"`
+ CheckPending bool `json:"checkPending,omitzero"`
+ Root []*BuildInfoRoot `json:"root,omitzero"`
+ PackageJsons []BuildInfoPath `json:"packageJsons,omitzero"`
+ MissingPackageJsons []BuildInfoPath `json:"missingPackageJsons,omitzero"`
+ ContentMapperIdentities []string `json:"contentMapperIdentities,omitzero"`
+ InputAliases []*BuildInfoInputAlias `json:"inputAliases,omitzero"`
+ // A nil fallback inventory predates dependency tracking; an empty inventory is complete.
+ WatchDirectories []BuildInfoPath `json:"watchDirectories,omitzero"`
// IncrementalProgram info
FileNames []BuildInfoPath `json:"fileNames,omitzero"`
@@ -601,6 +625,29 @@ func (b *BuildInfo) GetNonIncrementalFileNames(buildInfoDirectory tspath.RootedD
return getBuildInfoFileNames(b.NonIncrementalFileNames, buildInfoDirectory)
}
+func (b *BuildInfo) GetInputAliases(buildInfoDirectory tspath.RootedDirectoryPath) iter.Seq2[tspath.RootedFilePath, tspath.RootedFilePath] {
+ return func(yield func(tspath.RootedFilePath, tspath.RootedFilePath) bool) {
+ for _, alias := range b.InputAliases {
+ if !yield(
+ ResolveBuildInfoFileName(alias.Path, buildInfoDirectory, ""),
+ ResolveBuildInfoFileName(alias.RealPath, buildInfoDirectory, ""),
+ ) {
+ return
+ }
+ }
+ }
+}
+
+func (b *BuildInfo) GetWatchDirectories(buildInfoDirectory tspath.RootedDirectoryPath) iter.Seq[tspath.RootedDirectoryPath] {
+ return func(yield func(tspath.RootedDirectoryPath) bool) {
+ for _, path := range b.WatchDirectories {
+ if !yield(buildInfoDirectory.ResolveDirectory(path.AsString())) {
+ return
+ }
+ }
+ }
+}
+
func getBuildInfoFileNames(paths []BuildInfoPath, buildInfoDirectory tspath.RootedDirectoryPath) iter.Seq[tspath.RootedFilePath] {
return func(yield func(tspath.RootedFilePath) bool) {
for _, path := range paths {
diff --git a/tsc/internal/execute/incremental/buildinfo_path_test.go b/tsc/internal/execute/incremental/buildinfo_path_test.go
index 976fc939402aa..90efff6e25ae2 100644
--- a/tsc/internal/execute/incremental/buildinfo_path_test.go
+++ b/tsc/internal/execute/incremental/buildinfo_path_test.go
@@ -24,6 +24,8 @@ func TestBuildInfoPathJSONRoundTrip(t *testing.T) {
Root: []*BuildInfoRoot{{NonIncremental: "./src/root.ts"}},
PackageJsons: []BuildInfoPath{"./package.json"},
MissingPackageJsons: []BuildInfoPath{"../package.json"},
+ InputAliases: []*BuildInfoInputAlias{{Path: "./node_modules/pkg/index.d.ts", RealPath: "../pkg/index.d.ts"}},
+ WatchDirectories: []BuildInfoPath{"../generated"},
FileNames: []BuildInfoPath{"./src/root.ts", "lib.es5.d.ts"},
LatestChangedDtsFile: "./dist/root.d.ts",
}
@@ -33,7 +35,7 @@ func TestBuildInfoPathJSONRoundTrip(t *testing.T) {
assert.Equal(
t,
string(data),
- `{"root":["./src/root.ts"],"packageJsons":["./package.json"],"missingPackageJsons":["../package.json"],"fileNames":["./src/root.ts","lib.es5.d.ts"],"latestChangedDtsFile":"./dist/root.d.ts"}`,
+ `{"root":["./src/root.ts"],"packageJsons":["./package.json"],"missingPackageJsons":["../package.json"],"inputAliases":[["./node_modules/pkg/index.d.ts","../pkg/index.d.ts"]],"watchDirectories":["../generated"],"fileNames":["./src/root.ts","lib.es5.d.ts"],"latestChangedDtsFile":"./dist/root.d.ts"}`,
)
var roundTripped BuildInfo
@@ -41,6 +43,8 @@ func TestBuildInfoPathJSONRoundTrip(t *testing.T) {
assert.DeepEqual(t, roundTripped.Root, buildInfo.Root)
assert.DeepEqual(t, roundTripped.PackageJsons, buildInfo.PackageJsons)
assert.DeepEqual(t, roundTripped.MissingPackageJsons, buildInfo.MissingPackageJsons)
+ assert.DeepEqual(t, roundTripped.InputAliases, buildInfo.InputAliases)
+ assert.DeepEqual(t, roundTripped.WatchDirectories, buildInfo.WatchDirectories)
assert.DeepEqual(t, roundTripped.FileNames, buildInfo.FileNames)
assert.Equal(t, roundTripped.LatestChangedDtsFile, buildInfo.LatestChangedDtsFile)
}
@@ -440,6 +444,7 @@ func TestGlobalDeletionPreservesSkippedLibraryDiagnostics(t *testing.T) {
t.Fatalf("global removal marked skipped library %s changed", file.FileName())
}
}
+
if diagnostics := current.GetSemanticDiagnostics(t.Context(), nil); len(diagnostics) != 0 {
t.Fatalf("skipped library produced diagnostics: %v", diagnostics)
}
@@ -475,3 +480,14 @@ func TestNonIncrementalBuildInfoEmptyInventory(t *testing.T) {
assert.NilError(t, json.Unmarshal([]byte(`{}`), &legacy))
assert.Assert(t, legacy.NonIncrementalFileNames == nil)
}
+
+func TestBuildInfoEmptyWatchDirectories(t *testing.T) {
+ t.Parallel()
+ info := &BuildInfo{WatchDirectories: []BuildInfoPath{}}
+ data, err := json.Marshal(info)
+ assert.NilError(t, err)
+ assert.Equal(t, string(data), `{"watchDirectories":[]}`)
+ var restored BuildInfo
+ assert.NilError(t, json.Unmarshal(data, &restored))
+ assert.Assert(t, restored.WatchDirectories != nil)
+}
diff --git a/tsc/internal/execute/incremental/snapshottobuildinfo.go b/tsc/internal/execute/incremental/snapshottobuildinfo.go
index f4c9581e1fc9b..6371962e28813 100644
--- a/tsc/internal/execute/incremental/snapshottobuildinfo.go
+++ b/tsc/internal/execute/incremental/snapshottobuildinfo.go
@@ -10,6 +10,7 @@ import (
"github.com/microsoft/TypeScript/tsc/internal/collections"
"github.com/microsoft/TypeScript/tsc/internal/compiler"
"github.com/microsoft/TypeScript/tsc/internal/core"
+ "github.com/microsoft/TypeScript/tsc/internal/module"
"github.com/microsoft/TypeScript/tsc/internal/tsoptions"
"github.com/microsoft/TypeScript/tsc/internal/tspath"
)
@@ -64,6 +65,8 @@ func snapshotToBuildInfo(snapshot *snapshot, program *compiler.Program, buildInf
}
slices.Sort(buildInfo.NonIncrementalFileNames)
}
+ to.setInputAliases()
+ to.setWatchDirectories()
buildInfo.Errors = snapshot.hasErrors.IsTrue()
buildInfo.SemanticErrors = snapshot.hasSemanticErrors
buildInfo.CheckPending = snapshot.checkPending
@@ -71,6 +74,80 @@ func snapshotToBuildInfo(snapshot *snapshot, program *compiler.Program, buildInf
return buildInfo, nil
}
+type buildInfoInputAliasesProvider interface {
+ BuildInfoInputAliases() map[tspath.RootedPath]tspath.RootedPath
+}
+
+type buildInfoWatchDirectoriesProvider interface {
+ BuildInfoWatchDirectories() []tspath.RootedDirectoryPath
+}
+
+func (t *toBuildInfo) setInputAliases() {
+ aliases := make(map[tspath.RootedPath]tspath.RootedPath)
+ if provider, ok := t.program.Host().FS().(buildInfoInputAliasesProvider); ok {
+ maps.Copy(aliases, provider.BuildInfoInputAliases())
+ }
+ inputPaths := collections.NewSetWithSizeHint[tspath.PathKey](len(t.program.GetSourceFiles()) * 2)
+ for _, file := range t.program.GetSourceFiles() {
+ inputPaths.Add(file.PathKey())
+ realPath := t.program.Host().FS().Realpath(file.FileName().AsPath())
+ inputPaths.Add(t.caseSensitivity.PathKey(realPath))
+ if file.FileName().AsPath() != realPath {
+ aliases[file.FileName().AsPath()] = realPath
+ }
+ t.program.ForEachResolvedModule(func(resolution *module.ResolvedModule, _ string, _ core.ResolutionMode, _ tspath.PathKey) {
+ if resolution != nil && resolution.OriginalPath != "" {
+ aliases[resolution.OriginalPath.AsPath()] = resolution.ResolvedFileName.AsPath()
+ }
+ }, file)
+ t.program.ForEachResolvedTypeReferenceDirective(func(resolution *module.ResolvedTypeReferenceDirective, _ string, _ core.ResolutionMode, _ tspath.PathKey) {
+ if resolution != nil && resolution.OriginalPath != "" {
+ aliases[resolution.OriginalPath.AsPath()] = resolution.ResolvedFileName.AsPath()
+ }
+ }, file)
+ }
+ var referenceSources collections.Set[tspath.PathKey]
+ t.program.RangeResolvedProjectReference(func(_ tspath.PathKey, config, _ *tsoptions.ParsedCommandLine, _ int) bool {
+ if config == nil {
+ return true
+ }
+ for _, file := range config.FileNames() {
+ referenceSources.Add(t.caseSensitivity.PathKey(file.AsPath()))
+ referenceSources.Add(t.caseSensitivity.PathKey(t.program.Host().FS().Realpath(file.AsPath())))
+ }
+ return true
+ })
+ for path, realPath := range aliases {
+ pathKey := t.caseSensitivity.PathKey(path)
+ realPathKey := t.caseSensitivity.PathKey(realPath)
+ if pathKey == realPathKey || !inputPaths.Has(realPathKey) || referenceSources.Has(pathKey) || referenceSources.Has(realPathKey) {
+ continue
+ }
+ t.buildInfo.InputAliases = append(t.buildInfo.InputAliases, &BuildInfoInputAlias{
+ Path: t.fileNameRelativeToBuildInfo(tspath.RootedFilePathFromPath(path)),
+ RealPath: t.fileNameRelativeToBuildInfo(tspath.RootedFilePathFromPath(realPath)),
+ })
+ }
+ slices.SortFunc(t.buildInfo.InputAliases, func(left, right *BuildInfoInputAlias) int {
+ if result := strings.Compare(left.Path.AsString(), right.Path.AsString()); result != 0 {
+ return result
+ }
+ return strings.Compare(left.RealPath.AsString(), right.RealPath.AsString())
+ })
+}
+
+func (t *toBuildInfo) setWatchDirectories() {
+ provider, ok := t.program.Host().FS().(buildInfoWatchDirectoriesProvider)
+ if !ok {
+ return
+ }
+ t.buildInfo.WatchDirectories = []BuildInfoPath{}
+ for _, dir := range provider.BuildInfoWatchDirectories() {
+ t.buildInfo.WatchDirectories = append(t.buildInfo.WatchDirectories, BuildInfoPath(t.relativeToBuildInfo(dir.AsPath())))
+ }
+ slices.Sort(t.buildInfo.WatchDirectories)
+}
+
type toBuildInfo struct {
snapshot *snapshot
program *compiler.Program
diff --git a/tsc/internal/execute/tsctests/build_watch_dependencies_test.go b/tsc/internal/execute/tsctests/build_watch_dependencies_test.go
index a8fc6ab0fb373..9e6740529c38d 100644
--- a/tsc/internal/execute/tsctests/build_watch_dependencies_test.go
+++ b/tsc/internal/execute/tsctests/build_watch_dependencies_test.go
@@ -918,6 +918,55 @@ func TestBuildWatchConfigurationAliasRecovery(t *testing.T) {
}
}
+func TestBuildWatchAutomaticDependencyTypes(t *testing.T) {
+ t.Parallel()
+ for _, prebuild := range []bool{false, true} {
+ for _, metadata := range []bool{false, true} {
+ t.Run(fmt.Sprintf("prebuild=%v/metadata=%v", prebuild, metadata), func(t *testing.T) {
+ t.Parallel()
+ files := dependencyFiles()
+ files[dependencyProject+"tsconfig.json"] = `{"compilerOptions":{"outDir":"out","incremental":true,"moduleDetection":"legacy","types":["*"]},"files":["index.ts"]}`
+ files[dependencyProject+"index.ts"] = `const required: number = 42;`
+ files[dependencyProject+"node_modules/@types/note.txt"] = "unrelated"
+ sys, watcher := startDependencyWatch(t, files, []string{"--build", "--watch", "--verbose", "--pretty", "false"}, prebuild, "")
+ const directory = dependencyProject + "node_modules/@types/visible"
+ sys.writeFileNoError(directory+"/note.txt", "")
+ if metadata {
+ sys.writeFileNoError(directory+"/package.json", `{"typings":null}`)
+ sys.writeFileNoError(directory+"/index.d.ts", `declare const required: string;`)
+ }
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{{Kind: fswatch.EventUpdate, Path: directory}})
+ watcher.DoCycle()
+ if metadata {
+ assert.DeepEqual(t, dependencyDiagnosticCodes(sys), []string{})
+ assert.Assert(t, isWatched(sys, directory), "discovery must install metadata watches even when no compilation is needed")
+ if prebuild {
+ assert.Equal(t, sys.getOutput(false), "", "discovery alone must not start a build")
+ }
+ sys.clearOutput()
+ sys.writeFileNoError(directory+"/package.json", `{"typings":"index.d.ts"}`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, directory+"/package.json")
+ } else {
+ assert.DeepEqual(t, dependencyDiagnosticCodes(sys), []string{"2688"})
+ sys.clearOutput()
+ sys.writeFileNoError(directory+"/index.d.ts", `declare const required: string;`)
+ dependencyEvent(sys, watcher, fswatch.EventUpdate, directory+"/index.d.ts")
+ }
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "Cannot redeclare"), "%s", sys.getOutput(false))
+ sys.clearOutput()
+ sys.removeNoError(directory + "/index.d.ts")
+ sys.removeNoError(directory + "/note.txt")
+ if metadata {
+ sys.removeNoError(directory + "/package.json")
+ }
+ sys.removeNoError(directory)
+ dependencyEvent(sys, watcher, fswatch.EventDelete, directory)
+ checkDependencySuccess(t, sys)
+ })
+ }
+ }
+}
+
func TestBuildWatchLegacyDependencyInventory(t *testing.T) {
t.Parallel()
for _, kind := range []string{"delete", "change", "unchanged", "empty"} {
diff --git a/tsc/internal/execute/tsctests/build_watch_precision_test.go b/tsc/internal/execute/tsctests/build_watch_precision_test.go
index b55641e2fb0c0..07e2f5eef6d74 100644
--- a/tsc/internal/execute/tsctests/build_watch_precision_test.go
+++ b/tsc/internal/execute/tsctests/build_watch_precision_test.go
@@ -12,6 +12,7 @@ import (
"github.com/microsoft/TypeScript/tsc/internal/execute/build"
"github.com/microsoft/TypeScript/tsc/internal/execute/incremental"
"github.com/microsoft/TypeScript/tsc/internal/fswatch"
+ "github.com/microsoft/TypeScript/tsc/internal/json"
"github.com/microsoft/TypeScript/tsc/internal/tsoptions"
"github.com/microsoft/TypeScript/tsc/internal/tspath"
"github.com/microsoft/TypeScript/tsc/internal/vfs"
@@ -29,6 +30,19 @@ type dependencyWrites struct {
afterWrite func(tspath.RootedFilePath)
}
+type dependencyReads struct {
+ vfs.FS
+ mu sync.Mutex
+ reads map[tspath.RootedFilePath]int
+}
+
+func (f *dependencyReads) ReadFile(path tspath.RootedFilePath) (string, bool) {
+ f.mu.Lock()
+ f.reads[path]++
+ f.mu.Unlock()
+ return f.FS.ReadFile(path)
+}
+
func (f *dependencyWrites) FileExists(path tspath.RootedFilePath) bool {
exists := f.FS.FileExists(path)
f.mu.Lock()
@@ -57,6 +71,199 @@ func (f *dependencyWrites) WriteFile(path tspath.RootedFilePath, text string) er
return err
}
+func TestBuildWatchDetectsOfflineAliasRetarget(t *testing.T) {
+ t.Parallel()
+ for _, incremental := range []bool{false, true} {
+ for _, preserve := range []bool{false, true} {
+ t.Run(fmt.Sprintf("incremental=%v/preserve=%v", incremental, preserve), func(t *testing.T) {
+ t.Parallel()
+ files, _, _ := configurationAliasFiles(incremental, preserve, false)
+ const logical = dependencyProject + "node_modules/widget/index.d.ts"
+ const second = "/home/src/dependencies/second/types.d.ts"
+ const output = dependencyProject + "out/index.d.ts"
+ sys := newTestSys(&tscInput{files: files}, false)
+ result := execute.CommandLine(t.Context(), sys, []string{"--build", "--pretty", "false"}, sys)
+ assert.Equal(t, int(result.Status), 0)
+ checkDependencyOutput(t, sys, output, "result: 1;")
+
+ sys.mapFs().AddSymlink(strings.TrimPrefix(logical, "/"), strings.TrimPrefix(second, "/"))
+ files[logical] = vfstest.Symlink(second)
+ sys.clearOutput()
+ observer := &dependencyObserver{TestSys: sys}
+ result = execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose", "--pretty", "false"}, observer)
+ assert.Equal(t, int(result.Status), 0)
+ assert.Equal(t, observer.programs, 1)
+ checkDependencyOutput(t, sys, output, "result: 2;")
+ })
+ }
+ }
+}
+
+func TestBuildWatchIncrementalStartupUsesBuildInfo(t *testing.T) {
+ t.Parallel()
+ files, _, _ := configurationAliasFiles(true, false, false)
+ const logical = dependencyProject + "node_modules/widget/index.d.ts"
+ const first = "/home/src/dependencies/first/types.d.ts"
+ const second = "/home/src/dependencies/second/types.d.ts"
+ root := tspath.RootedFilePath(dependencyProject + "index.ts")
+ sys := newTestSys(&tscInput{files: files}, false)
+ result := execute.CommandLine(t.Context(), sys, []string{"--build", "--pretty", "false"}, sys)
+ assert.Equal(t, int(result.Status), 0)
+ var buildInfo incremental.BuildInfo
+ assert.NilError(t, json.Unmarshal([]byte(sys.readFileNoError(dependencyProject+"out/tsconfig.tsbuildinfo")), &buildInfo))
+ watchDirectories := slices.Collect(buildInfo.GetWatchDirectories(tspath.RootedDirectoryPath(dependencyProject + "out")))
+ assert.Assert(t, !slices.Contains(watchDirectories, tspath.RootedDirectoryPath("/home/src/dependencies/first")))
+ assert.Assert(t, !slices.Contains(watchDirectories, tspath.RootedDirectoryPath("/home/src/dependencies/second")))
+
+ reads := &dependencyReads{FS: sys.fs.FS, reads: make(map[tspath.RootedFilePath]int)}
+ sys.fs.FS = reads
+ sys.clearOutput()
+ observer := &dependencyObserver{TestSys: sys}
+ result = execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose", "--pretty", "false"}, observer)
+ assert.Equal(t, int(result.Status), 0)
+ assert.Equal(t, observer.programs, 0)
+ for _, path := range []tspath.RootedFilePath{root, logical, first, second} {
+ assert.Equal(t, reads.reads[path], 0, "unexpected source read for %s", path)
+ }
+}
+
+func TestBuildWatchEmptyInventoryStartup(t *testing.T) {
+ t.Parallel()
+ for _, mode := range []string{"plain", "incremental", "composite"} {
+ t.Run(mode, func(t *testing.T) {
+ t.Parallel()
+ files := FileMap{
+ dependencyProject + "tsconfig.json": fmt.Sprintf(`{"compilerOptions":{"outDir":"out","module":"commonjs","types":[],"libReplacement":false,"incremental":%v,"composite":%v},"files":["index.ts"]}`, mode != "plain", mode == "composite"),
+ dependencyProject + "index.ts": `export const result = 1;`,
+ }
+ sys := newTestSys(&tscInput{files: files}, false)
+ result := execute.CommandLine(t.Context(), sys, []string{"--build"}, sys)
+ assert.Equal(t, int(result.Status), 0)
+ var info incremental.BuildInfo
+ assert.NilError(t, json.Unmarshal([]byte(sys.readFileNoError(dependencyProject+"out/tsconfig.tsbuildinfo")), &info))
+ assert.Assert(t, info.WatchDirectories != nil && len(info.WatchDirectories) == 0)
+ reads := &dependencyReads{FS: sys.fs.FS, reads: make(map[tspath.RootedFilePath]int)}
+ sys.fs.FS = reads
+ sys.clearOutput()
+ observer := &dependencyObserver{TestSys: sys}
+ result = execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose"}, observer)
+ assert.Equal(t, int(result.Status), 0)
+ assert.Assert(t, strings.Contains(sys.getOutput(false), "is up to date"))
+ assert.Equal(t, observer.programs, 0)
+ assert.Equal(t, reads.reads[dependencyProject+"index.ts"], 0, "current empty inventories must not parse sources on restart")
+ })
+ }
+}
+
+func TestBuildWatchDependencyResolutionHints(t *testing.T) {
+ t.Parallel()
+ for _, incrementalOption := range []bool{false, true} {
+ for _, prebuild := range []bool{false, true} {
+ for _, hint := range []string{"none", "input", "alias", "config", "local", "descendant"} {
+ t.Run(fmt.Sprintf("incremental=%v/prebuild=%v/%s", incrementalOption, prebuild, hint), func(t *testing.T) {
+ t.Parallel()
+ files := FileMap{
+ dependencyProject + "tsconfig.json": fmt.Sprintf(`{
+ "compilerOptions":{"outDir":"out","rootDir":"..","declaration":true,"incremental":%v,"types":[],"libReplacement":false,"module":"commonjs",
+ "paths":{"pkg":["./watch/generated/deep/index.d.ts","../fallback/index.d.ts"]}},
+ "files":["index.ts"],"include":["watch/**/entry.ts"]}`, incrementalOption),
+ dependencyProject + "index.ts": `import { value } from "./other"; import { fallback } from "pkg"; import { fixed } from "widget";
+ export const result = value; export const alternative = fallback; export const unchanged = fixed;`,
+ dependencyProject + "other.d.ts": `export const value: 1;`,
+ dependencyProject + "node_modules/widget/index.d.ts": vfstest.Symlink("/home/src/dependencies/fixed/index.d.ts"),
+ "/home/src/dependencies/fixed/index.d.ts": `export const fixed: 10;`,
+ "/home/src/workspaces/fallback/index.d.ts": `export const fallback: 11;`,
+ dependencyProject + "watch/generated/placeholder": "",
+ }
+ sys := newTestSys(&tscInput{files: files}, false)
+ if prebuild {
+ result := execute.CommandLine(t.Context(), sys, []string{"--build"}, sys)
+ assert.Equal(t, int(result.Status), 0, sys.getOutput(false))
+ var info incremental.BuildInfo
+ const infoDirectory = dependencyProject + "out/project"
+ assert.NilError(t, json.Unmarshal([]byte(sys.readFileNoError(infoDirectory+"/tsconfig.tsbuildinfo")), &info))
+ assert.DeepEqual(t, slices.Collect(info.GetWatchDirectories(tspath.RootedDirectoryPath(infoDirectory))), []tspath.RootedDirectoryPath{
+ dependencyProject + "node_modules",
+ dependencyProject + "watch/generated",
+ dependencyProject + "watch/generated/deep",
+ })
+ }
+ reads := &dependencyReads{FS: sys.fs.FS, reads: make(map[tspath.RootedFilePath]int)}
+ sys.fs.FS = reads
+ observer := &dependencyObserver{TestSys: sys}
+ result := execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose", "--pretty", "false"}, observer)
+ assert.Equal(t, int(result.Status), 0)
+ if prebuild {
+ assert.Equal(t, observer.programs, 0)
+ assert.Equal(t, reads.reads[dependencyProject+"index.ts"], 0)
+ }
+ assert.Assert(t, isWatched(sys, dependencyProject+"watch"))
+
+ sys.clearOutput()
+ const generated = dependencyProject + "watch/generated/deep"
+ events := []fswatch.Event{{Kind: fswatch.EventUpdate, Path: generated}}
+ expected := "alternative: 12;"
+ if hint == "local" {
+ sys.writeFileNoError(dependencyProject+"other.ts", `export const value = 2 as const;`)
+ events[0].Path = dependencyProject + "other.ts"
+ expected = "result: 2;"
+ } else {
+ sys.writeFileNoError(generated+"/index.d.ts", `export const fallback: 12;`)
+ hints := map[string]string{
+ "input": "/home/src/workspaces/fallback/index.d.ts",
+ "alias": dependencyProject + "node_modules/widget/index.d.ts",
+ "config": dependencyProject + "tsconfig.json",
+ }
+ if path := hints[hint]; path != "" {
+ events = append(events, fswatch.Event{Kind: fswatch.EventUpdate, Path: path})
+ }
+ if hint == "descendant" {
+ sys.writeFileNoError(generated+"/note.txt", "unrelated")
+ events = append(events, fswatch.Event{Kind: fswatch.EventUpdate, Path: generated + "/note.txt"})
+ }
+ }
+ sys.mockWatchBackend.SendEvents(events)
+ result.Watcher.DoCycle()
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, dependencyProject+"out/project/index.d.ts", expected)
+ })
+ }
+ }
+ }
+}
+
+func TestBuildWatchIncrementalStartupDetectsLogicalAliasSibling(t *testing.T) {
+ t.Parallel()
+ for _, preserve := range []bool{false, true} {
+ t.Run(fmt.Sprintf("preserve=%v", preserve), func(t *testing.T) {
+ t.Parallel()
+ files, _, _ := configurationAliasFiles(true, preserve, false)
+ const logicalDirectory = dependencyProject + "node_modules/widget"
+ const sibling = logicalDirectory + "/index.ts"
+ const output = dependencyProject + "out/index.d.ts"
+ sys := newTestSys(&tscInput{files: files}, false)
+ result := execute.CommandLine(t.Context(), sys, []string{"--build", "--pretty", "false"}, sys)
+ assert.Equal(t, int(result.Status), 0)
+ checkDependencyOutput(t, sys, output, "result: 1;")
+
+ sys.clearOutput()
+ observer := &dependencyObserver{TestSys: sys}
+ result = execute.CommandLine(t.Context(), sys, []string{"--build", "--watch", "--verbose", "--pretty", "false"}, observer)
+ assert.Equal(t, int(result.Status), 0)
+ assert.Equal(t, observer.programs, 0)
+ assert.Assert(t, isWatched(sys, logicalDirectory))
+
+ files[sibling] = `export const value = 3;`
+ sys.writeFileNoError(sibling, files[sibling].(string))
+ sys.clearOutput()
+ sys.mockWatchBackend.SendEvents([]fswatch.Event{{Kind: fswatch.EventUpdate, Path: sibling}})
+ result.Watcher.DoCycle()
+ checkDependencySuccess(t, sys)
+ checkDependencyOutput(t, sys, output, "result = 3;")
+ })
+ }
+}
+
func TestBuildWatchCoalescesAliasChangesDuringEmit(t *testing.T) {
t.Parallel()
for _, preserve := range []bool{false, true} {
diff --git a/tsc/internal/execute/tsctests/readablebuildinfo.go b/tsc/internal/execute/tsctests/readablebuildinfo.go
index ad0cbd75eb762..af9189c7d513a 100644
--- a/tsc/internal/execute/tsctests/readablebuildinfo.go
+++ b/tsc/internal/execute/tsctests/readablebuildinfo.go
@@ -37,7 +37,7 @@ type readableBuildInfo struct {
EmitSignatures []*readableBuildInfoEmitSignature `json:"emitSignatures,omitzero"`
ResolvedRoot []*readableBuildInfoResolvedRoot `json:"resolvedRoot,omitzero"`
Size int `json:"size,omitzero"` // Size of the build info file
-
+ // NonIncrementalProgram info
// NonIncrementalProgram info
SemanticErrors bool `json:"semanticErrors,omitzero"`
}
diff --git a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithDisableSourceOfProjectReferenceRedirect.baseline b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithDisableSourceOfProjectReferenceRedirect.baseline
index ae0a38b1747e8..e7089a1eee4dd 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithDisableSourceOfProjectReferenceRedirect.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithDisableSourceOfProjectReferenceRedirect.baseline
@@ -31,7 +31,7 @@ export function fn5() { }
}
}
//// [/myproject/dependency/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
//// [/myproject/dependency/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -78,7 +78,7 @@ export function fn5() { }
"declarationMap": true
},
"latestChangedDtsFile": "../decls/FnS.d.ts",
- "size": 1435
+ "size": 1457
}
//// [/myproject/main/main.d.ts] *new*
export {};
@@ -117,7 +117,7 @@ fn5();
"references": [{ "path": "../dependency" }]
}
//// [/myproject/main/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
+{"version":"FakeTSVersion","root":[3],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
//// [/myproject/main/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -180,7 +180,7 @@ fn5();
]
},
"latestChangedDtsFile": "./main.d.ts",
- "size": 1527
+ "size": 1549
}
//// [/myproject/tsconfig.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithDisableSourceOfProjectReferenceRedirectEdit.baseline b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithDisableSourceOfProjectReferenceRedirectEdit.baseline
index 38a74d79d7436..e82119027460a 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithDisableSourceOfProjectReferenceRedirectEdit.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithDisableSourceOfProjectReferenceRedirectEdit.baseline
@@ -31,7 +31,7 @@ export function fn5() { }
}
}
//// [/myproject/dependency/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
//// [/myproject/dependency/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -78,7 +78,7 @@ export function fn5() { }
"declarationMap": true
},
"latestChangedDtsFile": "../decls/FnS.d.ts",
- "size": 1435
+ "size": 1457
}
//// [/myproject/main/main.d.ts] *new*
export {};
@@ -117,7 +117,7 @@ fn5();
"references": [{ "path": "../dependency" }]
}
//// [/myproject/main/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
+{"version":"FakeTSVersion","root":[3],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
//// [/myproject/main/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -180,7 +180,7 @@ fn5();
]
},
"latestChangedDtsFile": "./main.d.ts",
- "size": 1527
+ "size": 1549
}
//// [/myproject/tsconfig.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithDisableSourceOfProjectReferenceRedirectEditEnd.baseline b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithDisableSourceOfProjectReferenceRedirectEditEnd.baseline
index b421d6bff3b38..ec360e88f040f 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithDisableSourceOfProjectReferenceRedirectEditEnd.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithDisableSourceOfProjectReferenceRedirectEditEnd.baseline
@@ -31,7 +31,7 @@ export function fn5() { }
}
}
//// [/myproject/dependency/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
//// [/myproject/dependency/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -78,7 +78,7 @@ export function fn5() { }
"declarationMap": true
},
"latestChangedDtsFile": "../decls/FnS.d.ts",
- "size": 1435
+ "size": 1457
}
//// [/myproject/main/main.d.ts] *new*
export {};
@@ -117,7 +117,7 @@ fn5();
"references": [{ "path": "../dependency" }]
}
//// [/myproject/main/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
+{"version":"FakeTSVersion","root":[3],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
//// [/myproject/main/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -180,7 +180,7 @@ fn5();
]
},
"latestChangedDtsFile": "./main.d.ts",
- "size": 1527
+ "size": 1549
}
//// [/myproject/tsconfig.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMaps.baseline b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMaps.baseline
index 3ee427c76ca97..1655815e08fea 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMaps.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMaps.baseline
@@ -31,7 +31,7 @@ export function fn5() { }
}
}
//// [/myproject/dependency/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
//// [/myproject/dependency/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -78,7 +78,7 @@ export function fn5() { }
"declarationMap": true
},
"latestChangedDtsFile": "../decls/FnS.d.ts",
- "size": 1435
+ "size": 1457
}
//// [/myproject/main/main.d.ts] *new*
export {};
@@ -117,7 +117,7 @@ fn5();
}
//// [/myproject/main/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
+{"version":"FakeTSVersion","root":[3],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
//// [/myproject/main/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -180,7 +180,7 @@ fn5();
]
},
"latestChangedDtsFile": "./main.d.ts",
- "size": 1527
+ "size": 1549
}
//// [/myproject/tsconfig.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsEdit.baseline b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsEdit.baseline
index d6ed813c2cf5f..f6026fe173b3f 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsEdit.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsEdit.baseline
@@ -31,7 +31,7 @@ export function fn5() { }
}
}
//// [/myproject/dependency/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
//// [/myproject/dependency/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -78,7 +78,7 @@ export function fn5() { }
"declarationMap": true
},
"latestChangedDtsFile": "../decls/FnS.d.ts",
- "size": 1435
+ "size": 1457
}
//// [/myproject/main/main.d.ts] *new*
export {};
@@ -117,7 +117,7 @@ fn5();
}
//// [/myproject/main/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
+{"version":"FakeTSVersion","root":[3],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
//// [/myproject/main/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -180,7 +180,7 @@ fn5();
]
},
"latestChangedDtsFile": "./main.d.ts",
- "size": 1527
+ "size": 1549
}
//// [/myproject/tsconfig.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsEditEnd.baseline b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsEditEnd.baseline
index 468fcbfc59ca8..3417994cc0c95 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsEditEnd.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsEditEnd.baseline
@@ -31,7 +31,7 @@ export function fn5() { }
}
}
//// [/myproject/dependency/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
//// [/myproject/dependency/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -78,7 +78,7 @@ export function fn5() { }
"declarationMap": true
},
"latestChangedDtsFile": "../decls/FnS.d.ts",
- "size": 1435
+ "size": 1457
}
//// [/myproject/main/main.d.ts] *new*
export {};
@@ -117,7 +117,7 @@ fn5();
}
//// [/myproject/main/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
+{"version":"FakeTSVersion","root":[3],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
//// [/myproject/main/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -180,7 +180,7 @@ fn5();
]
},
"latestChangedDtsFile": "./main.d.ts",
- "size": 1527
+ "size": 1549
}
//// [/myproject/tsconfig.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsNotSolution.baseline b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsNotSolution.baseline
index e6fc31ef1bd73..b11d2299b77e7 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsNotSolution.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsNotSolution.baseline
@@ -31,7 +31,7 @@ export function fn5() { }
}
}
//// [/myproject/dependency/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
//// [/myproject/dependency/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -78,7 +78,7 @@ export function fn5() { }
"declarationMap": true
},
"latestChangedDtsFile": "../decls/FnS.d.ts",
- "size": 1435
+ "size": 1457
}
//// [/myproject/main/main.d.ts] *new*
export {};
@@ -117,7 +117,7 @@ fn5();
}
//// [/myproject/main/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
+{"version":"FakeTSVersion","root":[3],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
//// [/myproject/main/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -180,7 +180,7 @@ fn5();
]
},
"latestChangedDtsFile": "./main.d.ts",
- "size": 1527
+ "size": 1549
}
//// [/myproject/tsconfig.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsNotSolutionEdit.baseline b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsNotSolutionEdit.baseline
index 5100b33126200..4b6fdb9143d86 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsNotSolutionEdit.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsNotSolutionEdit.baseline
@@ -31,7 +31,7 @@ export function fn5() { }
}
}
//// [/myproject/dependency/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
//// [/myproject/dependency/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -78,7 +78,7 @@ export function fn5() { }
"declarationMap": true
},
"latestChangedDtsFile": "../decls/FnS.d.ts",
- "size": 1435
+ "size": 1457
}
//// [/myproject/main/main.d.ts] *new*
export {};
@@ -117,7 +117,7 @@ fn5();
}
//// [/myproject/main/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
+{"version":"FakeTSVersion","root":[3],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
//// [/myproject/main/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -180,7 +180,7 @@ fn5();
]
},
"latestChangedDtsFile": "./main.d.ts",
- "size": 1527
+ "size": 1549
}
//// [/myproject/tsconfig.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsNotSolutionEditEnd.baseline b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsNotSolutionEditEnd.baseline
index 0eb4e7f4fc0d3..c04bf78ed10c3 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsNotSolutionEditEnd.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/declarationMapsRenameWithSourceMapsNotSolutionEditEnd.baseline
@@ -31,7 +31,7 @@ export function fn5() { }
}
}
//// [/myproject/dependency/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","./FnS.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"dabc23167a661a3e71744cf63ff5adcc-export function fn1() { }\nexport function fn2() { }\nexport function fn3() { }\nexport function fn4() { }\nexport function fn5() { }\n","signature":"bf56b5172c2fd500384b437b7700d594-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n","impliedNodeFormat":1}],"options":{"composite":true,"declarationDir":"../decls","declarationMap":true},"latestChangedDtsFile":"../decls/FnS.d.ts"}
//// [/myproject/dependency/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -78,7 +78,7 @@ export function fn5() { }
"declarationMap": true
},
"latestChangedDtsFile": "../decls/FnS.d.ts",
- "size": 1435
+ "size": 1457
}
//// [/myproject/main/main.d.ts] *new*
export {};
@@ -117,7 +117,7 @@ fn5();
}
//// [/myproject/main/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
+{"version":"FakeTSVersion","root":[3],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../decls/FnS.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},"ccbe7f3de9ff1ded77b994bef4cf9dce-export declare function fn1(): void;\nexport declare function fn2(): void;\nexport declare function fn3(): void;\nexport declare function fn4(): void;\nexport declare function fn5(): void;\n//# sourceMappingURL=FnS.d.ts.map",{"version":"72620bcff3a257f2c990b3f030e1b8e3-import {\n\tfn1,\n\tfn2,\n\tfn3,\n\tfn4,\n\tfn5\n} from \"../decls/FnS\";\n\nfn1();\nfn2();\nfn3();\nfn4();\nfn5();","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./main.d.ts"}
//// [/myproject/main/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -180,7 +180,7 @@ fn5();
]
},
"latestChangedDtsFile": "./main.d.ts",
- "size": 1527
+ "size": 1549
}
//// [/myproject/tsconfig.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsProjectWithOwnFilesReferencingFileFromReferencedProject.baseline b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsProjectWithOwnFilesReferencingFileFromReferencedProject.baseline
index e93ffd3fb0155..81912821eb141 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsProjectWithOwnFilesReferencingFileFromReferencedProject.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsProjectWithOwnFilesReferencingFileFromReferencedProject.baseline
@@ -43,7 +43,7 @@ import { foo } from './helpers/functions';
export { foo };
//// [/myproject/target/tsconfig-src.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","../src/helpers/functions.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":"bf6a9d57f087ab0066015134975ea2b2-export function foo() { return 1; }","signature":"029742dfbcde5b1dfd06f9129660afb3-export declare function foo(): number;\n","impliedNodeFormat":1},{"version":"29b72d75211ebc765497b1845400b55d-import { foo } from './helpers/functions';\nexport { foo };","signature":"e7ab16a2673b38216aba41fa1cf9516c-import { foo } from './helpers/functions';\nexport { foo };\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/main.d.ts"}
+{"version":"FakeTSVersion","root":[[2,3]],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../src/helpers/functions.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":"bf6a9d57f087ab0066015134975ea2b2-export function foo() { return 1; }","signature":"029742dfbcde5b1dfd06f9129660afb3-export declare function foo(): number;\n","impliedNodeFormat":1},{"version":"29b72d75211ebc765497b1845400b55d-import { foo } from './helpers/functions';\nexport { foo };","signature":"e7ab16a2673b38216aba41fa1cf9516c-import { foo } from './helpers/functions';\nexport { foo };\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/main.d.ts"}
//// [/myproject/target/tsconfig-src.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -116,7 +116,7 @@ export { foo };
]
},
"latestChangedDtsFile": "./src/main.d.ts",
- "size": 1491
+ "size": 1513
}
//// [/myproject/tsconfig-src.json] *new*
{
@@ -133,7 +133,7 @@ export { foo };
"references": [{ "path": "./tsconfig-src.json" }]
}
//// [/myproject/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./own/main.ts"],"nonIncrementalFileNames":["./target/src/helpers/functions.d.ts","./target/src/main.d.ts"]}
+{"version":"FakeTSVersion","root":["./own/main.ts"],"watchDirectories":[],"nonIncrementalFileNames":["./target/src/helpers/functions.d.ts","./target/src/main.d.ts"]}
//// [/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -145,7 +145,7 @@ export { foo };
"original": "./own/main.ts"
}
],
- "size": 143
+ "size": 165
}
diff --git a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsRootOfReferencedProjectDeclarationMaps.baseline b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsRootOfReferencedProjectDeclarationMaps.baseline
index 9db5ec4677880..38789b6dce969 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsRootOfReferencedProjectDeclarationMaps.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsRootOfReferencedProjectDeclarationMaps.baseline
@@ -20,7 +20,7 @@ function testEvaluateKeyboardEvent() {
}
//// [/out/src.tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.es2026.full.d.ts","./input/keyboard.d.ts","../src/terminal.ts","./input/keyboard.test.d.ts","../src/common/input/keyboard.ts","../src/common/input/keyboard.test.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"362bf1943c7d2a927f25978d1f24d61f-export declare function evaluateKeyboardEvent(): void;\n//# sourceMappingURL=keyboard.d.ts.map",{"version":"ff8262b3768be0c0049523b4b8a7b4f7-import { evaluateKeyboardEvent } from 'common/input/keyboard';\nfunction foo() {\n\treturn evaluateKeyboardEvent();\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"aaff3960e003a07ef50db935cb91a696-export {};\n//# sourceMappingURL=keyboard.test.d.ts.map"],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./","tsBuildInfoFile":"./src.tsconfig.tsbuildinfo"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./terminal.d.ts","resolvedRoot":[[2,5],[4,6]]}
+{"version":"FakeTSVersion","root":[[2,4]],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","./input/keyboard.d.ts","../src/terminal.ts","./input/keyboard.test.d.ts","../src/common/input/keyboard.ts","../src/common/input/keyboard.test.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"362bf1943c7d2a927f25978d1f24d61f-export declare function evaluateKeyboardEvent(): void;\n//# sourceMappingURL=keyboard.d.ts.map",{"version":"ff8262b3768be0c0049523b4b8a7b4f7-import { evaluateKeyboardEvent } from 'common/input/keyboard';\nfunction foo() {\n\treturn evaluateKeyboardEvent();\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"aaff3960e003a07ef50db935cb91a696-export {};\n//# sourceMappingURL=keyboard.test.d.ts.map"],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./","tsBuildInfoFile":"./src.tsconfig.tsbuildinfo"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./terminal.d.ts","resolvedRoot":[[2,5],[4,6]]}
//// [/out/src.tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -109,7 +109,7 @@ function testEvaluateKeyboardEvent() {
"../src/common/input/keyboard.test.ts"
]
],
- "size": 1705
+ "size": 1727
}
//// [/out/terminal.d.ts] *new*
export {};
@@ -123,7 +123,7 @@ function foo() {
}
//// [/out/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","../src/common/input/keyboard.ts","../src/common/input/keyboard.test.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6e37abb18685aa8e2642ab0218eef699-function bar() { return \"just a random function so .d.ts location doesnt match\"; }\nexport function evaluateKeyboardEvent() { }","signature":"569df1f274cf52f322c6e7a2f4e891fe-export declare function evaluateKeyboardEvent(): void;\n","impliedNodeFormat":1},{"version":"e844013c2f8764710bfebda24351c0d3-import { evaluateKeyboardEvent } from 'common/input/keyboard';\nfunction testEvaluateKeyboardEvent() {\n\treturn evaluateKeyboardEvent();\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./input/keyboard.test.d.ts"}
+{"version":"FakeTSVersion","root":[[2,3]],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../src/common/input/keyboard.ts","../src/common/input/keyboard.test.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6e37abb18685aa8e2642ab0218eef699-function bar() { return \"just a random function so .d.ts location doesnt match\"; }\nexport function evaluateKeyboardEvent() { }","signature":"569df1f274cf52f322c6e7a2f4e891fe-export declare function evaluateKeyboardEvent(): void;\n","impliedNodeFormat":1},{"version":"e844013c2f8764710bfebda24351c0d3-import { evaluateKeyboardEvent } from 'common/input/keyboard';\nfunction testEvaluateKeyboardEvent() {\n\treturn evaluateKeyboardEvent();\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./input/keyboard.test.d.ts"}
//// [/out/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -196,7 +196,7 @@ function foo() {
]
},
"latestChangedDtsFile": "./input/keyboard.test.d.ts",
- "size": 1670
+ "size": 1692
}
//// [/src/common/input/keyboard.test.ts] *new*
import { evaluateKeyboardEvent } from 'common/input/keyboard';
diff --git a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectDirectly.baseline b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectDirectly.baseline
index 4360f8ecfbfa6..57e85964e1128 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectDirectly.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectDirectly.baseline
@@ -34,7 +34,7 @@ import { foo } from './helpers/functions';
export { foo };
//// [/myproject/target/tsconfig-src.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","../src/helpers/functions.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":"bf6a9d57f087ab0066015134975ea2b2-export function foo() { return 1; }","signature":"029742dfbcde5b1dfd06f9129660afb3-export declare function foo(): number;\n","impliedNodeFormat":1},{"version":"29b72d75211ebc765497b1845400b55d-import { foo } from './helpers/functions';\nexport { foo };","signature":"e7ab16a2673b38216aba41fa1cf9516c-import { foo } from './helpers/functions';\nexport { foo };\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/main.d.ts"}
+{"version":"FakeTSVersion","root":[[2,3]],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../src/helpers/functions.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":"bf6a9d57f087ab0066015134975ea2b2-export function foo() { return 1; }","signature":"029742dfbcde5b1dfd06f9129660afb3-export declare function foo(): number;\n","impliedNodeFormat":1},{"version":"29b72d75211ebc765497b1845400b55d-import { foo } from './helpers/functions';\nexport { foo };","signature":"e7ab16a2673b38216aba41fa1cf9516c-import { foo } from './helpers/functions';\nexport { foo };\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/main.d.ts"}
//// [/myproject/target/tsconfig-src.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -107,7 +107,7 @@ export { foo };
]
},
"latestChangedDtsFile": "./src/main.d.ts",
- "size": 1491
+ "size": 1513
}
//// [/myproject/tsconfig-src.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectly.baseline b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectly.baseline
index 4401c26c4e333..ff9838cc69a7d 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectly.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectly.baseline
@@ -49,7 +49,7 @@ import { foo } from './helpers/functions';
export { foo };
//// [/myproject/target/tsconfig-indirect1.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","../indirect1/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":"265b044bf7f805e401e883488ec6cb29-export const indirect = 1;","signature":"bf177928c61dd707122e7eeb99aa0ef0-export declare const indirect = 1;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./indirect1/main.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../indirect1/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":"265b044bf7f805e401e883488ec6cb29-export const indirect = 1;","signature":"bf177928c61dd707122e7eeb99aa0ef0-export declare const indirect = 1;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./indirect1/main.d.ts"}
//// [/myproject/target/tsconfig-indirect1.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -95,10 +95,10 @@ export { foo };
"outDir": "./"
},
"latestChangedDtsFile": "./indirect1/main.d.ts",
- "size": 1152
+ "size": 1174
}
//// [/myproject/target/tsconfig-indirect2.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","../indirect2/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":"265b044bf7f805e401e883488ec6cb29-export const indirect = 1;","signature":"bf177928c61dd707122e7eeb99aa0ef0-export declare const indirect = 1;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./indirect2/main.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../indirect2/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":"265b044bf7f805e401e883488ec6cb29-export const indirect = 1;","signature":"bf177928c61dd707122e7eeb99aa0ef0-export declare const indirect = 1;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./indirect2/main.d.ts"}
//// [/myproject/target/tsconfig-indirect2.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -144,10 +144,10 @@ export { foo };
"outDir": "./"
},
"latestChangedDtsFile": "./indirect2/main.d.ts",
- "size": 1152
+ "size": 1174
}
//// [/myproject/target/tsconfig-src.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","../src/helpers/functions.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":"bf6a9d57f087ab0066015134975ea2b2-export function foo() { return 1; }","signature":"029742dfbcde5b1dfd06f9129660afb3-export declare function foo(): number;\n","impliedNodeFormat":1},{"version":"29b72d75211ebc765497b1845400b55d-import { foo } from './helpers/functions';\nexport { foo };","signature":"e7ab16a2673b38216aba41fa1cf9516c-import { foo } from './helpers/functions';\nexport { foo };\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/main.d.ts"}
+{"version":"FakeTSVersion","root":[[2,3]],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../src/helpers/functions.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":"bf6a9d57f087ab0066015134975ea2b2-export function foo() { return 1; }","signature":"029742dfbcde5b1dfd06f9129660afb3-export declare function foo(): number;\n","impliedNodeFormat":1},{"version":"29b72d75211ebc765497b1845400b55d-import { foo } from './helpers/functions';\nexport { foo };","signature":"e7ab16a2673b38216aba41fa1cf9516c-import { foo } from './helpers/functions';\nexport { foo };\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/main.d.ts"}
//// [/myproject/target/tsconfig-src.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -220,7 +220,7 @@ export { foo };
]
},
"latestChangedDtsFile": "./src/main.d.ts",
- "size": 1491
+ "size": 1513
}
//// [/myproject/tsconfig-indirect1.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoad.baseline b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoad.baseline
index 61f2cde206d8b..8b22c62b2c551 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoad.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoad.baseline
@@ -49,7 +49,7 @@ import { foo } from './helpers/functions';
export { foo };
//// [/myproject/target/tsconfig-indirect1.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","../indirect1/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":"265b044bf7f805e401e883488ec6cb29-export const indirect = 1;","signature":"bf177928c61dd707122e7eeb99aa0ef0-export declare const indirect = 1;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./indirect1/main.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../indirect1/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":"265b044bf7f805e401e883488ec6cb29-export const indirect = 1;","signature":"bf177928c61dd707122e7eeb99aa0ef0-export declare const indirect = 1;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./indirect1/main.d.ts"}
//// [/myproject/target/tsconfig-indirect1.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -95,10 +95,10 @@ export { foo };
"outDir": "./"
},
"latestChangedDtsFile": "./indirect1/main.d.ts",
- "size": 1152
+ "size": 1174
}
//// [/myproject/target/tsconfig-indirect2.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","../indirect2/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":"265b044bf7f805e401e883488ec6cb29-export const indirect = 1;","signature":"bf177928c61dd707122e7eeb99aa0ef0-export declare const indirect = 1;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./indirect2/main.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../indirect2/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":"265b044bf7f805e401e883488ec6cb29-export const indirect = 1;","signature":"bf177928c61dd707122e7eeb99aa0ef0-export declare const indirect = 1;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./indirect2/main.d.ts"}
//// [/myproject/target/tsconfig-indirect2.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -144,10 +144,10 @@ export { foo };
"outDir": "./"
},
"latestChangedDtsFile": "./indirect2/main.d.ts",
- "size": 1152
+ "size": 1174
}
//// [/myproject/target/tsconfig-src.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","../src/helpers/functions.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":"bf6a9d57f087ab0066015134975ea2b2-export function foo() { return 1; }","signature":"029742dfbcde5b1dfd06f9129660afb3-export declare function foo(): number;\n","impliedNodeFormat":1},{"version":"29b72d75211ebc765497b1845400b55d-import { foo } from './helpers/functions';\nexport { foo };","signature":"e7ab16a2673b38216aba41fa1cf9516c-import { foo } from './helpers/functions';\nexport { foo };\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/main.d.ts"}
+{"version":"FakeTSVersion","root":[[2,3]],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../src/helpers/functions.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":"bf6a9d57f087ab0066015134975ea2b2-export function foo() { return 1; }","signature":"029742dfbcde5b1dfd06f9129660afb3-export declare function foo(): number;\n","impliedNodeFormat":1},{"version":"29b72d75211ebc765497b1845400b55d-import { foo } from './helpers/functions';\nexport { foo };","signature":"e7ab16a2673b38216aba41fa1cf9516c-import { foo } from './helpers/functions';\nexport { foo };\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/main.d.ts"}
//// [/myproject/target/tsconfig-src.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -220,7 +220,7 @@ export { foo };
]
},
"latestChangedDtsFile": "./src/main.d.ts",
- "size": 1491
+ "size": 1513
}
//// [/myproject/tsconfig-indirect1.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoadInOneButWithoutItInAnother.baseline b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoadInOneButWithoutItInAnother.baseline
index 40ed01ac186ed..1bafcbaaee099 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoadInOneButWithoutItInAnother.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionReferencingDefaultProjectIndirectlyThroughDisableReferencedProjectLoadInOneButWithoutItInAnother.baseline
@@ -49,7 +49,7 @@ import { foo } from './helpers/functions';
export { foo };
//// [/myproject/target/tsconfig-indirect1.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","../indirect1/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":"265b044bf7f805e401e883488ec6cb29-export const indirect = 1;","signature":"bf177928c61dd707122e7eeb99aa0ef0-export declare const indirect = 1;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./indirect1/main.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../indirect1/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":"265b044bf7f805e401e883488ec6cb29-export const indirect = 1;","signature":"bf177928c61dd707122e7eeb99aa0ef0-export declare const indirect = 1;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./indirect1/main.d.ts"}
//// [/myproject/target/tsconfig-indirect1.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -95,10 +95,10 @@ export { foo };
"outDir": "./"
},
"latestChangedDtsFile": "./indirect1/main.d.ts",
- "size": 1152
+ "size": 1174
}
//// [/myproject/target/tsconfig-indirect2.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","../indirect2/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":"265b044bf7f805e401e883488ec6cb29-export const indirect = 1;","signature":"bf177928c61dd707122e7eeb99aa0ef0-export declare const indirect = 1;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./indirect2/main.d.ts"}
+{"version":"FakeTSVersion","root":[2],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../indirect2/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":"265b044bf7f805e401e883488ec6cb29-export const indirect = 1;","signature":"bf177928c61dd707122e7eeb99aa0ef0-export declare const indirect = 1;\n","impliedNodeFormat":1}],"options":{"composite":true,"outDir":"./"},"latestChangedDtsFile":"./indirect2/main.d.ts"}
//// [/myproject/target/tsconfig-indirect2.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -144,10 +144,10 @@ export { foo };
"outDir": "./"
},
"latestChangedDtsFile": "./indirect2/main.d.ts",
- "size": 1152
+ "size": 1174
}
//// [/myproject/target/tsconfig-src.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","../src/helpers/functions.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":"bf6a9d57f087ab0066015134975ea2b2-export function foo() { return 1; }","signature":"029742dfbcde5b1dfd06f9129660afb3-export declare function foo(): number;\n","impliedNodeFormat":1},{"version":"29b72d75211ebc765497b1845400b55d-import { foo } from './helpers/functions';\nexport { foo };","signature":"e7ab16a2673b38216aba41fa1cf9516c-import { foo } from './helpers/functions';\nexport { foo };\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/main.d.ts"}
+{"version":"FakeTSVersion","root":[[2,3]],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../src/helpers/functions.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":"bf6a9d57f087ab0066015134975ea2b2-export function foo() { return 1; }","signature":"029742dfbcde5b1dfd06f9129660afb3-export declare function foo(): number;\n","impliedNodeFormat":1},{"version":"29b72d75211ebc765497b1845400b55d-import { foo } from './helpers/functions';\nexport { foo };","signature":"e7ab16a2673b38216aba41fa1cf9516c-import { foo } from './helpers/functions';\nexport { foo };\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/main.d.ts"}
//// [/myproject/target/tsconfig-src.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -220,7 +220,7 @@ export { foo };
]
},
"latestChangedDtsFile": "./src/main.d.ts",
- "size": 1491
+ "size": 1513
}
//// [/myproject/tsconfig-indirect1.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionWithDisableReferencedProjectLoadReferencingDefaultProjectDirectly.baseline b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionWithDisableReferencedProjectLoadReferencingDefaultProjectDirectly.baseline
index 6f52c6630adf3..7db65b8bfa492 100644
--- a/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionWithDisableReferencedProjectLoadReferencingDefaultProjectDirectly.baseline
+++ b/tsc/testdata/baselines/reference/fourslash/state/findAllRefsSolutionWithDisableReferencedProjectLoadReferencingDefaultProjectDirectly.baseline
@@ -34,7 +34,7 @@ import { foo } from './helpers/functions';
export { foo };
//// [/myproject/target/tsconfig-src.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","../src/helpers/functions.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":"bf6a9d57f087ab0066015134975ea2b2-export function foo() { return 1; }","signature":"029742dfbcde5b1dfd06f9129660afb3-export declare function foo(): number;\n","impliedNodeFormat":1},{"version":"29b72d75211ebc765497b1845400b55d-import { foo } from './helpers/functions';\nexport { foo };","signature":"e7ab16a2673b38216aba41fa1cf9516c-import { foo } from './helpers/functions';\nexport { foo };\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/main.d.ts"}
+{"version":"FakeTSVersion","root":[[2,3]],"watchDirectories":[],"fileNames":["lib.es2026.full.d.ts","../src/helpers/functions.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":"bf6a9d57f087ab0066015134975ea2b2-export function foo() { return 1; }","signature":"029742dfbcde5b1dfd06f9129660afb3-export declare function foo(): number;\n","impliedNodeFormat":1},{"version":"29b72d75211ebc765497b1845400b55d-import { foo } from './helpers/functions';\nexport { foo };","signature":"e7ab16a2673b38216aba41fa1cf9516c-import { foo } from './helpers/functions';\nexport { foo };\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"composite":true,"declarationMap":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/main.d.ts"}
//// [/myproject/target/tsconfig-src.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -107,7 +107,7 @@ export { foo };
]
},
"latestChangedDtsFile": "./src/main.d.ts",
- "size": 1491
+ "size": 1513
}
//// [/myproject/tsconfig-src.json] *new*
{
diff --git a/tsc/testdata/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js b/tsc/testdata/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js
index 44f7e0af6ffa8..62fee897a224a 100644
--- a/tsc/testdata/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js
+++ b/tsc/testdata/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js
@@ -53,7 +53,7 @@ export declare const x = 10;
export const x = 10;
//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["./src/main.tsx"],"nonIncrementalFileNames":[]}
+{"version":"FakeTSVersion","root":["./src/main.tsx"],"watchDirectories":[".."],"nonIncrementalFileNames":[]}
//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
@@ -65,7 +65,7 @@ export const x = 10;
"original": "./src/main.tsx"
}
],
- "size": 82
+ "size": 108
}
project/tsconfig.json::
diff --git a/tsc/testdata/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js b/tsc/testdata/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js
index 523fbf54946d1..f75ac15f4b3c2 100644
--- a/tsc/testdata/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js
+++ b/tsc/testdata/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js
@@ -66,7 +66,7 @@ import { b } from "./b";
export const d = b;
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.es2026.full.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]],"watchDirectories":[],"fileNames":["lib.es2026.full.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",
@@ -145,7 +145,7 @@ export const d = b;
"./b.ts"
]
},
- "size": 1263
+ "size": 1285
}
tsconfig.json::
@@ -195,7 +195,7 @@ export const d = b;
//// [/home/src/workspaces/project/d.js.map] *new*
{"version":3,"file":"d.js","sources":["d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAAA,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC"}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.es2026.full.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]],"watchDirectories":[],"fileNames":["lib.es2026.full.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",
@@ -277,7 +277,7 @@ export const d = b;
"./b.ts"
]
},
- "size": 1292
+ "size": 1314
}
tsconfig.json::
@@ -314,7 +314,7 @@ import { b } from "./b";
export const d = b;
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.es2026.full.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]],"watchDirectories":[],"fileNames":["lib.es2026.full.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",
@@ -393,7 +393,7 @@ export const d = b;
"./b.ts"
]
},
- "size": 1263
+ "size": 1285
}
tsconfig.json::
@@ -426,7 +426,7 @@ export declare const c = 10;
export declare const d = 10;
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.es2026.full.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]],"watchDirectories":[],"fileNames":["lib.es2026.full.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",
@@ -528,7 +528,7 @@ export declare const d = 10;
"./b.ts"
]
},
- "size": 1742
+ "size": 1764
}
tsconfig.json::
@@ -573,7 +573,7 @@ export declare const d = 10;
//// [/home/src/workspaces/project/d.d.ts.map] *new*
{"version":3,"file":"d.d.ts","sources":["d.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.es2026.full.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]],"watchDirectories":[],"fileNames":["lib.es2026.full.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",
@@ -676,7 +676,7 @@ export declare const d = 10;
"./b.ts"
]
},
- "size": 1764
+ "size": 1786
}
tsconfig.json::
@@ -716,7 +716,7 @@ export const a = 10;
const aLocal = 100;
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.es2026.full.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]],"watchDirectories":[],"fileNames":["lib.es2026.full.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",
@@ -815,7 +815,7 @@ const aLocal = 100;
"./b.ts"
]
},
- "size": 1712
+ "size": 1734
}
tsconfig.json::
@@ -846,7 +846,7 @@ 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","root":[[2,5]],"fileNames":["lib.es2026.full.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]],"watchDirectories":[],"fileNames":["lib.es2026.full.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",
@@ -949,7 +949,7 @@ Output::
"./b.ts"
]
},
- "size": 1765
+ "size": 1787
}
tsconfig.json::
@@ -999,7 +999,7 @@ import { b } from "./b";
export const d = b;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZC5qcyIsInNvdXJjZXMiOlsiZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsQ0FBQyxFQUFFLE1BQU0sS0FBSyxDQUFDO0FBQUEsTUFBTSxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQyJ9
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.es2026.full.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]],"watchDirectories":[],"fileNames":["lib.es2026.full.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",
@@ -1101,7 +1101,7 @@ export const d = b;
"./b.ts"
]
},
- "size": 1747
+ "size": 1769
}
tsconfig.json::
@@ -1143,7 +1143,7 @@ export const d = 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":["lib.es2026.full.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]],"watchDirectories":[],"fileNames":["lib.es2026.full.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",
@@ -1245,7 +1245,7 @@ export const d = b;
"./b.ts"
]
},
- "size": 1741
+ "size": 1763
}
tsconfig.json::
@@ -1282,7 +1282,7 @@ import { b } from "./b";
export const d = b;
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
-{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.es2026.full.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]],"watchDirectories":[],"fileNames":["lib.es2026.full.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