diff --git a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts index 899f44fb11eb4..356b6d67f1f16 100644 --- a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts +++ b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts @@ -83,10 +83,7 @@ export interface TestServerHostCreationParameters { newLine?: string; windowsStyleRoot?: string; environmentVariables?: Map; - runWithoutRecursiveWatches?: boolean; runWithFallbackPolling?: boolean; - inodeWatching?: boolean; - fsWatchWithTimestamp?: boolean; osFlavor?: TestServerHostOsFlavor; } @@ -362,7 +359,7 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, importPlugin?: (root: string, moduleName: string) => Promise; public storeSignatureInfo = true; watchFile: HostWatchFile; - private inodeWatching: boolean | undefined; + private inodeWatching: boolean; private readonly inodes?: Map; watchDirectory: HostWatchDirectory; service?: server.ProjectService; @@ -376,17 +373,13 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, newLine, windowsStyleRoot, environmentVariables, - runWithoutRecursiveWatches, runWithFallbackPolling, - inodeWatching, - fsWatchWithTimestamp, osFlavor, }: TestServerHostCreationParameters = {}, ) { this.useCaseSensitiveFileNames = !!useCaseSensitiveFileNames; this.newLine = newLine || "\n"; this.osFlavor = osFlavor || TestServerHostOsFlavor.Windows; - if (this.osFlavor === TestServerHostOsFlavor.Linux) runWithoutRecursiveWatches = true; this.windowsStyleRoot = windowsStyleRoot; this.environmentVariables = environmentVariables; currentDirectory = currentDirectory || "/"; @@ -398,10 +391,8 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, this.runWithFallbackPolling = !!runWithFallbackPolling; const tscWatchFile = this.environmentVariables && this.environmentVariables.get("TSC_WATCHFILE"); const tscWatchDirectory = this.environmentVariables && this.environmentVariables.get("TSC_WATCHDIRECTORY"); - if (inodeWatching) { - this.inodeWatching = true; - this.inodes = new Map(); - } + this.inodeWatching = this.osFlavor !== TestServerHostOsFlavor.Windows; + if (this.inodeWatching) this.inodes = new Map(); const { watchFile, watchDirectory } = createSystemWatchFunctions({ // We dont have polling watch file @@ -415,13 +406,13 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, fileSystemEntryExists: this.fileSystemEntryExists.bind(this), useCaseSensitiveFileNames: this.useCaseSensitiveFileNames, getCurrentDirectory: this.getCurrentDirectory.bind(this), - fsSupportsRecursiveFsWatch: tscWatchDirectory ? false : !runWithoutRecursiveWatches, + fsSupportsRecursiveFsWatch: this.osFlavor !== TestServerHostOsFlavor.Linux, getAccessibleSortedChildDirectories: path => this.getDirectories(path), realpath: this.realpath.bind(this), tscWatchFile, tscWatchDirectory, - inodeWatching: !!this.inodeWatching, - fsWatchWithTimestamp, + inodeWatching: this.inodeWatching, + fsWatchWithTimestamp: this.osFlavor === TestServerHostOsFlavor.MacOs, sysLog: s => this.write(s + this.newLine), }); this.watchFile = watchFile; @@ -712,15 +703,20 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, cb: FsWatchCallback, ) { if (this.runWithFallbackPolling) throw new Error("Need to use fallback polling instead of file system native watching"); - const path = this.toPath(fileOrDirectory); - // Error if the path does not exist - if (this.inodeWatching && !this.inodes?.has(path)) throw new Error(); + let inode: number | undefined; + if (this.inodeWatching) { + const entry = this.getRealFileOrFolder(fileOrDirectory); + // Error if the path does not exist + if (!entry) throw new Error("Cannot watch missing file or folder"); + inode = this.inodes?.get(entry.path); + if (inode === undefined) throw new Error("inode not found"); + } const result = this.watchUtils.fsWatch( this.toNormalizedAbsolutePath(fileOrDirectory), recursive, { cb, - inode: this.inodes?.get(path), + inode, }, ) as FsWatchWorkerWatcher; result.on = noop; diff --git a/src/testRunner/unittests/tscWatch/watchEnvironment.ts b/src/testRunner/unittests/tscWatch/watchEnvironment.ts index 28ceb2e8e5c58..3cbe266763c1f 100644 --- a/src/testRunner/unittests/tscWatch/watchEnvironment.ts +++ b/src/testRunner/unittests/tscWatch/watchEnvironment.ts @@ -14,6 +14,7 @@ import { libFile, SymLink, TestServerHost, + TestServerHostOsFlavor, Tsc_WatchDirectory, Tsc_WatchFile, } from "../helpers/virtualFileSystemWithWatch"; @@ -162,7 +163,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po const files = [file, configFile, libFile]; const environmentVariables = new Map(); environmentVariables.set("TSC_WATCHDIRECTORY", tscWatchDirectory); - return createWatchedSystem(files, { environmentVariables }); + return createWatchedSystem(files, { osFlavor: TestServerHostOsFlavor.Linux, environmentVariables }); }, edits: [ { @@ -230,7 +231,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po const files = [libFile, file1, tsconfig, realA, realB, symLinkA, symLinkB, symLinkBInA, symLinkAInB]; const environmentVariables = new Map(); environmentVariables.set("TSC_WATCHDIRECTORY", Tsc_WatchDirectory.NonRecursiveWatchDirectory); - return createWatchedSystem(files, { environmentVariables, currentDirectory: cwd }); + return createWatchedSystem(files, { osFlavor: TestServerHostOsFlavor.Linux, environmentVariables, currentDirectory: cwd }); }, }); @@ -252,7 +253,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po content: `export const x = 10;`, }; const files = [libFile, file1, file2, configFile]; - return createWatchedSystem(files, { runWithoutRecursiveWatches: true }); + return createWatchedSystem(files, { osFlavor: TestServerHostOsFlavor.Linux }); }, edits: [ { @@ -330,7 +331,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po content: `export const x = 10;`, }; const files = [libFile, file1, file2, configFile]; - return createWatchedSystem(files, { runWithoutRecursiveWatches: true }); + return createWatchedSystem(files, { osFlavor: TestServerHostOsFlavor.Linux }); }, edits: [ noopChange, @@ -371,7 +372,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po content: `export const x = 10;`, }; const files = [libFile, file1, file2, configFile]; - return createWatchedSystem(files, { runWithoutRecursiveWatches: true }); + return createWatchedSystem(files, { osFlavor: TestServerHostOsFlavor.Linux }); }, edits: [ noopChange, @@ -427,7 +428,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po }), }; const files = [libFile, commonFile1, commonFile2, configFile]; - return createWatchedSystem(files, { runWithoutRecursiveWatches: true }); + return createWatchedSystem(files, { osFlavor: TestServerHostOsFlavor.Linux }); }, }); @@ -445,7 +446,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po }), }; const files = [libFile, commonFile1, commonFile2, configFile]; - return createWatchedSystem(files, { runWithoutRecursiveWatches: true, runWithFallbackPolling: true }); + return createWatchedSystem(files, { osFlavor: TestServerHostOsFlavor.Linux, runWithFallbackPolling: true }); }, }); @@ -464,7 +465,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po }); describe("exclude options", () => { - function sys(watchOptions: ts.WatchOptions, runWithoutRecursiveWatches?: boolean): TestServerHost { + function sys(watchOptions: ts.WatchOptions, osFlavor?: TestServerHostOsFlavor.Linux): TestServerHost { const configFile: File = { path: `/user/username/projects/myproject/tsconfig.json`, content: jsonToReadableText({ exclude: ["node_modules"], watchOptions }), @@ -490,7 +491,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po content: "export function temp(): string;", }; const files = [libFile, main, bar, foo, fooBar, temp, configFile]; - return createWatchedSystem(files, { currentDirectory: "/user/username/projects/myproject", runWithoutRecursiveWatches }); + return createWatchedSystem(files, { currentDirectory: "/user/username/projects/myproject", osFlavor }); } function verifyWorker(...additionalFlags: string[]) { @@ -526,7 +527,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po scenario, subScenario: `watchOptions/with excludeDirectories option with recursive directory watching${additionalFlags.join("")}`, commandLineArgs: ["-w", ...additionalFlags], - sys: () => sys({ excludeDirectories: ["**/temp"] }, /*runWithoutRecursiveWatches*/ true), + sys: () => sys({ excludeDirectories: ["**/temp"] }, TestServerHostOsFlavor.Linux), edits: [ { caption: "Directory watch updates because of main.js creation", @@ -599,7 +600,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po }, { currentDirectory: "/user/username/projects/myproject", - inodeWatching: true, + osFlavor: TestServerHostOsFlavor.MacOs, }, ), edits: [ @@ -630,7 +631,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po }, { currentDirectory: "/user/username/projects/myproject", - inodeWatching: true, + osFlavor: TestServerHostOsFlavor.MacOs, }, ), edits: [ @@ -664,7 +665,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po }, { currentDirectory: "/user/username/projects/myproject", - inodeWatching: true, + osFlavor: TestServerHostOsFlavor.MacOs, }, ), edits: [ @@ -690,10 +691,10 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po }); describe("with fsWatch with fsWatchWithTimestamp", () => { - function verify(fsWatchWithTimestamp: boolean, watchFile?: "useFsEventsOnParentDirectory") { + function verify(osFlavor: TestServerHostOsFlavor, watchFile?: "useFsEventsOnParentDirectory") { verifyTscWatch({ scenario, - subScenario: `fsWatch/fsWatchWithTimestamp ${fsWatchWithTimestamp}${watchFile ? ` ${watchFile}` : ""}`, + subScenario: `fsWatch/fsWatchWithTimestamp ${osFlavor === TestServerHostOsFlavor.MacOs}${watchFile ? ` ${watchFile}` : ""}`, commandLineArgs: ["-w", "--extendedDiagnostics", ...(watchFile ? ["--watchFile", watchFile] : [])], sys: () => createWatchedSystem( @@ -704,7 +705,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po }, { currentDirectory: "/user/username/projects/myproject", - fsWatchWithTimestamp, + osFlavor, }, ), edits: [ @@ -721,10 +722,10 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po ], }); } - verify(/*fsWatchWithTimestamp*/ true); - verify(/*fsWatchWithTimestamp*/ false); - verify(/*fsWatchWithTimestamp*/ true, "useFsEventsOnParentDirectory"); - verify(/*fsWatchWithTimestamp*/ false, "useFsEventsOnParentDirectory"); + verify(TestServerHostOsFlavor.MacOs); + verify(TestServerHostOsFlavor.Windows); + verify(TestServerHostOsFlavor.MacOs, "useFsEventsOnParentDirectory"); + verify(TestServerHostOsFlavor.Windows, "useFsEventsOnParentDirectory"); }); verifyTscWatch({ diff --git a/src/testRunner/unittests/tsserver/watchEnvironment.ts b/src/testRunner/unittests/tsserver/watchEnvironment.ts index 5511300f1ee7b..10c79c8706cc1 100644 --- a/src/testRunner/unittests/tsserver/watchEnvironment.ts +++ b/src/testRunner/unittests/tsserver/watchEnvironment.ts @@ -24,6 +24,7 @@ import { createServerHost, File, libFile, + TestServerHostOsFlavor, Tsc_WatchDirectory, } from "../helpers/virtualFileSystemWithWatch"; @@ -52,7 +53,7 @@ describe("unittests:: tsserver:: watchEnvironment:: tsserverProjectSystem watchD const files = [index, file1, configFile, libFile]; const environmentVariables = new Map(); environmentVariables.set("TSC_WATCHDIRECTORY", tscWatchDirectory); - const host = createServerHost(files, { environmentVariables }); + const host = createServerHost(files, { osFlavor: TestServerHostOsFlavor.Linux, environmentVariables }); const session = new TestSession(host); openFilesForSession([index], session); session.executeCommandSeq({ @@ -141,7 +142,10 @@ describe("unittests:: tsserver:: watchEnvironment:: recursiveWatchDirectory", () }; const environmentVariables = new Map(); environmentVariables.set("TSC_WATCHDIRECTORY", Tsc_WatchDirectory.NonRecursiveWatchDirectory); - const host = createServerHost([index, file1, configFile, libFile, nodeModulesExistingUnusedFile], { environmentVariables }); + const host = createServerHost( + [index, file1, configFile, libFile, nodeModulesExistingUnusedFile], + { osFlavor: TestServerHostOsFlavor.Linux, environmentVariables }, + ); const session = new TestSession(host); openFilesForSession([index], session); @@ -237,7 +241,7 @@ describe("unittests:: tsserver:: watchEnvironment:: handles watch compiler optio content: "{}", }; const files = [libFile, commonFile2, configFile]; - const host = createServerHost(files.concat(commonFile1), { runWithoutRecursiveWatches: true }); + const host = createServerHost(files.concat(commonFile1), { osFlavor: TestServerHostOsFlavor.Linux }); const session = new TestSession(host); session.executeCommandSeq({ command: ts.server.protocol.CommandTypes.Configure, @@ -257,7 +261,7 @@ describe("unittests:: tsserver:: watchEnvironment:: handles watch compiler optio content: "{}", }; const files = [libFile, commonFile2, configFile]; - const host = createServerHost(files.concat(commonFile1), { runWithoutRecursiveWatches: true, runWithFallbackPolling: true }); + const host = createServerHost(files.concat(commonFile1), { osFlavor: TestServerHostOsFlavor.Linux, runWithFallbackPolling: true }); const session = new TestSession(host); session.executeCommandSeq({ command: ts.server.protocol.CommandTypes.Configure, @@ -297,7 +301,7 @@ describe("unittests:: tsserver:: watchEnvironment:: handles watch compiler optio }), }; const files = [libFile, commonFile2, configFile]; - const host = createServerHost(files.concat(commonFile1), { runWithoutRecursiveWatches: true }); + const host = createServerHost(files.concat(commonFile1), { osFlavor: TestServerHostOsFlavor.Linux }); const session = new TestSession(host); openFilesForSession([{ file: commonFile1, projectRootPath: "/a/b" }], session); baselineTsserverLogs("watchEnvironment", `with watchDirectory option in configFile`, session); @@ -313,7 +317,7 @@ describe("unittests:: tsserver:: watchEnvironment:: handles watch compiler optio }), }; const files = [libFile, commonFile2, configFile]; - const host = createServerHost(files.concat(commonFile1), { runWithoutRecursiveWatches: true, runWithFallbackPolling: true }); + const host = createServerHost(files.concat(commonFile1), { osFlavor: TestServerHostOsFlavor.Linux, runWithFallbackPolling: true }); const session = new TestSession(host); session.executeCommandSeq({ command: ts.server.protocol.CommandTypes.Configure, @@ -515,7 +519,7 @@ describe("unittests:: tsserver:: watchEnvironment:: watching at workspaces codes path: "/workspaces/somerepo/node_modules/@types/random-seed/index.d.ts", content: `export function randomSeed(): string;`, }; - const host = createServerHost([config, main, randomSeed, libFile], { inodeWatching: true, runWithoutRecursiveWatches: true }); + const host = createServerHost([config, main, randomSeed, libFile], { osFlavor: TestServerHostOsFlavor.Linux }); const session = new TestSession(host); openFilesForSession([main], session); verifyGetErrRequest({ session, files: [main] }); diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true-useFsEventsOnParentDirectory.js b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true-useFsEventsOnParentDirectory.js index 9f8f174641f0c..9008161f049a3 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true-useFsEventsOnParentDirectory.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true-useFsEventsOnParentDirectory.js @@ -1,6 +1,6 @@ currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false Input:: -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -13,10 +13,10 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/user/username/projects/myproject/main.ts] +//// [/user/username/projects/myproject/main.ts] Inode:: 8 export const x = 10; -//// [/user/username/projects/myproject/tsconfig.json] +//// [/user/username/projects/myproject/tsconfig.json] Inode:: 9 { "files": [ "main.ts" @@ -44,7 +44,7 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node -//// [/user/username/projects/myproject/main.js] +//// [/user/username/projects/myproject/main.js] Inode:: 10 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.x = void 0; @@ -60,9 +60,9 @@ PolledWatches:: FsWatches:: /a/lib: *new* - {} + {"inode":2} /user/username/projects/myproject: *new* - {} + {"inode":7} Program root files: [ "/user/username/projects/myproject/main.ts" @@ -101,7 +101,7 @@ exitCode:: ExitStatus.undefined Change:: modify file contents Input:: -//// [/user/username/projects/myproject/main.ts] +//// [/user/username/projects/myproject/main.ts] Inode:: 8 export const x = 10;export const y = 10; @@ -129,7 +129,7 @@ CreatingProgramWith:: -//// [/user/username/projects/myproject/main.js] +//// [/user/username/projects/myproject/main.js] Inode:: 10 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.y = exports.x = void 0; diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true.js b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true.js index fbaae6e5114af..63594f096e753 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/fsWatchWithTimestamp-true.js @@ -1,6 +1,6 @@ currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false Input:: -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -13,10 +13,10 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/user/username/projects/myproject/main.ts] +//// [/user/username/projects/myproject/main.ts] Inode:: 8 export const x = 10; -//// [/user/username/projects/myproject/tsconfig.json] +//// [/user/username/projects/myproject/tsconfig.json] Inode:: 9 { "files": [ "main.ts" @@ -44,7 +44,7 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node -//// [/user/username/projects/myproject/main.js] +//// [/user/username/projects/myproject/main.js] Inode:: 10 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.x = void 0; @@ -60,11 +60,11 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":3} /user/username/projects/myproject/main.ts: *new* - {} + {"inode":8} /user/username/projects/myproject/tsconfig.json: *new* - {} + {"inode":9} Program root files: [ "/user/username/projects/myproject/main.ts" @@ -103,7 +103,7 @@ exitCode:: ExitStatus.undefined Change:: modify file contents Input:: -//// [/user/username/projects/myproject/main.ts] +//// [/user/username/projects/myproject/main.ts] Inode:: 8 export const x = 10;export const y = 10; @@ -131,7 +131,7 @@ CreatingProgramWith:: -//// [/user/username/projects/myproject/main.js] +//// [/user/username/projects/myproject/main.js] Inode:: 10 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.y = exports.x = void 0; diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode-when-rename-occurs-when-file-is-still-on-the-disk.js b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode-when-rename-occurs-when-file-is-still-on-the-disk.js index e86d5b13f3727..c3aed85d4fea9 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode-when-rename-occurs-when-file-is-still-on-the-disk.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/fsWatch/when-using-file-watching-thats-on-inode-when-rename-occurs-when-file-is-still-on-the-disk.js @@ -132,7 +132,7 @@ FsWatches:: /a/lib/lib.d.ts: {"inode":3} /user/username/projects/myproject/foo.ts: - {"inode":13} *new* + {} *new* /user/username/projects/myproject/main.ts: {"inode":8} /user/username/projects/myproject/tsconfig.json: @@ -239,7 +239,7 @@ FsWatches:: FsWatches *deleted*:: /user/username/projects/myproject/foo.ts: - {"inode":13} + {} Timeout callback:: count: 1 4: timerToUpdateProgram *new* diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-dynamic-polling-when-renaming-file-in-subfolder.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-dynamic-polling-when-renaming-file-in-subfolder.js index d443b126f804e..0115577c172d0 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-dynamic-polling-when-renaming-file-in-subfolder.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-dynamic-polling-when-renaming-file-in-subfolder.js @@ -1,16 +1,16 @@ currentDirectory:: / useCaseSensitiveFileNames: false Input:: -//// [/a/username/project/src/file1.ts] +//// [/a/username/project/src/file1.ts] Inode:: 5 -//// [/a/username/project/tsconfig.json] +//// [/a/username/project/tsconfig.json] Inode:: 6 { "watchOptions": { "synchronousWatchDirectory": true } } -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 8 /// interface Boolean {} interface Function {} @@ -33,17 +33,17 @@ Output:: -//// [/a/username/project/src/file1.js] +//// [/a/username/project/src/file1.js] Inode:: 9 FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":8} /a/username/project/src/file1.ts: *new* - {} + {"inode":5} /a/username/project/tsconfig.json: *new* - {} + {"inode":6} Timeout callback:: count: 1 1: pollPollingIntervalQueue *new* @@ -74,11 +74,29 @@ exitCode:: ExitStatus.undefined Change:: Rename file1 to file2 Input:: -//// [/a/username/project/src/file2.ts] +//// [/a/username/project/src/file2.ts] Inode:: 10 //// [/a/username/project/src/file1.ts] deleted +Output:: +sysLog:: /a/username/project/src/file1.ts:: Changing watcher to MissingFileSystemEntryWatcher + + +PolledWatches:: +/a/username/project/src/file1.ts: *new* + {"pollingInterval":250} + +FsWatches:: +/a/lib/lib.d.ts: + {"inode":8} +/a/username/project/tsconfig.json: + {"inode":6} + +FsWatches *deleted*:: +/a/username/project/src/file1.ts: + {"inode":5} + Timeout callback:: count: 2 1: pollPollingIntervalQueue 2: timerToUpdateProgram *new* @@ -109,21 +127,21 @@ Output:: -//// [/a/username/project/src/file2.js] +//// [/a/username/project/src/file2.js] Inode:: 11 + +PolledWatches *deleted*:: +/a/username/project/src/file1.ts: + {"pollingInterval":250} FsWatches:: /a/lib/lib.d.ts: - {} + {"inode":8} /a/username/project/src/file2.ts: *new* - {} + {"inode":10} /a/username/project/tsconfig.json: - {} - -FsWatches *deleted*:: -/a/username/project/src/file1.ts: - {} + {"inode":6} Timeout callback:: count: 3 6: timerToUpdateProgram *new* diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-watchDirectory-when-renaming-file-in-subfolder.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-watchDirectory-when-renaming-file-in-subfolder.js index fa98589773128..838d80a9d89ee 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-watchDirectory-when-renaming-file-in-subfolder.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-non-recursive-watchDirectory-when-renaming-file-in-subfolder.js @@ -1,16 +1,16 @@ currentDirectory:: / useCaseSensitiveFileNames: false Input:: -//// [/a/username/project/src/file1.ts] +//// [/a/username/project/src/file1.ts] Inode:: 5 -//// [/a/username/project/tsconfig.json] +//// [/a/username/project/tsconfig.json] Inode:: 6 { "watchOptions": { "synchronousWatchDirectory": true } } -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 8 /// interface Boolean {} interface Function {} @@ -33,7 +33,7 @@ Output:: -//// [/a/username/project/src/file1.js] +//// [/a/username/project/src/file1.js] Inode:: 9 @@ -43,15 +43,15 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":8} /a/username/project: *new* - {} + {"inode":3} /a/username/project/src: *new* - {} + {"inode":4} /a/username/project/src/file1.ts: *new* - {} + {"inode":5} /a/username/project/tsconfig.json: *new* - {} + {"inode":6} Program root files: [ "/a/username/project/src/file1.ts" @@ -79,11 +79,35 @@ exitCode:: ExitStatus.undefined Change:: Rename file1 to file2 Input:: -//// [/a/username/project/src/file2.ts] +//// [/a/username/project/src/file2.ts] Inode:: 10 //// [/a/username/project/src/file1.ts] deleted +Output:: +sysLog:: /a/username/project/src/file1.ts:: Changing watcher to MissingFileSystemEntryWatcher + + +PolledWatches:: +/a/username/project/node_modules/@types: + {"pollingInterval":500} +/a/username/project/src/file1.ts: *new* + {"pollingInterval":250} + +FsWatches:: +/a/lib/lib.d.ts: + {"inode":8} +/a/username/project: + {"inode":3} +/a/username/project/src: + {"inode":4} +/a/username/project/tsconfig.json: + {"inode":6} + +FsWatches *deleted*:: +/a/username/project/src/file1.ts: + {"inode":5} + Timeout callback:: count: 1 3: timerToUpdateProgram *new* @@ -99,7 +123,7 @@ Output:: -//// [/a/username/project/src/file2.js] +//// [/a/username/project/src/file2.js] Inode:: 11 @@ -107,21 +131,21 @@ PolledWatches:: /a/username/project/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/a/username/project/src/file1.ts: + {"pollingInterval":250} + FsWatches:: /a/lib/lib.d.ts: - {} + {"inode":8} /a/username/project: - {} + {"inode":3} /a/username/project/src: - {} + {"inode":4} /a/username/project/src/file2.ts: *new* - {} + {"inode":10} /a/username/project/tsconfig.json: - {} - -FsWatches *deleted*:: -/a/username/project/src/file1.ts: - {} + {"inode":6} Program root files: [ diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-watchFile-when-renaming-file-in-subfolder.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-watchFile-when-renaming-file-in-subfolder.js index e66a8f8d7375b..3a4bc98d81478 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-watchFile-when-renaming-file-in-subfolder.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/uses-watchFile-when-renaming-file-in-subfolder.js @@ -1,16 +1,16 @@ currentDirectory:: / useCaseSensitiveFileNames: false Input:: -//// [/a/username/project/src/file1.ts] +//// [/a/username/project/src/file1.ts] Inode:: 5 -//// [/a/username/project/tsconfig.json] +//// [/a/username/project/tsconfig.json] Inode:: 6 { "watchOptions": { "synchronousWatchDirectory": true } } -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 8 /// interface Boolean {} interface Function {} @@ -33,7 +33,7 @@ Output:: -//// [/a/username/project/src/file1.js] +//// [/a/username/project/src/file1.js] Inode:: 9 @@ -47,11 +47,11 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":8} /a/username/project/src/file1.ts: *new* - {} + {"inode":5} /a/username/project/tsconfig.json: *new* - {} + {"inode":6} Program root files: [ "/a/username/project/src/file1.ts" @@ -79,11 +79,35 @@ exitCode:: ExitStatus.undefined Change:: Rename file1 to file2 Input:: -//// [/a/username/project/src/file2.ts] +//// [/a/username/project/src/file2.ts] Inode:: 10 //// [/a/username/project/src/file1.ts] deleted +Output:: +sysLog:: /a/username/project/src/file1.ts:: Changing watcher to MissingFileSystemEntryWatcher + + +PolledWatches:: +/a/username/project: + {"pollingInterval":500} +/a/username/project/node_modules/@types: + {"pollingInterval":500} +/a/username/project/src: + {"pollingInterval":500} +/a/username/project/src/file1.ts: *new* + {"pollingInterval":250} + +FsWatches:: +/a/lib/lib.d.ts: + {"inode":8} +/a/username/project/tsconfig.json: + {"inode":6} + +FsWatches *deleted*:: +/a/username/project/src/file1.ts: + {"inode":5} + Timeout callback:: count: 1 2: timerToUpdateProgram *new* @@ -99,7 +123,7 @@ Output:: -//// [/a/username/project/src/file2.js] +//// [/a/username/project/src/file2.js] Inode:: 11 @@ -111,17 +135,17 @@ PolledWatches:: /a/username/project/src: {"pollingInterval":500} +PolledWatches *deleted*:: +/a/username/project/src/file1.ts: + {"pollingInterval":250} + FsWatches:: /a/lib/lib.d.ts: - {} + {"inode":8} /a/username/project/src/file2.ts: *new* - {} + {"inode":10} /a/username/project/tsconfig.json: - {} - -FsWatches *deleted*:: -/a/username/project/src/file1.ts: - {} + {"inode":6} Timeout callback:: count: 1 3: timerToUpdateProgram *new* diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders.js index 845fb354ef0a7..871290ae2a398 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/when-there-are-symlinks-to-folders-in-recursive-folders.js @@ -1,6 +1,6 @@ currentDirectory:: /home/user/projects/myproject useCaseSensitiveFileNames: false Input:: -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -13,22 +13,22 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/home/user/projects/myproject/src/file.ts] +//// [/home/user/projects/myproject/src/file.ts] Inode:: 9 import * as a from "a" -//// [/home/user/projects/myproject/tsconfig.json] +//// [/home/user/projects/myproject/tsconfig.json] Inode:: 10 { "compilerOptions": { "extendedDiagnostics": true, "traceResolution": true }} -//// [/home/user/projects/myproject/node_modules/reala/index.d.ts] +//// [/home/user/projects/myproject/node_modules/reala/index.d.ts] Inode:: 13 export {} -//// [/home/user/projects/myproject/node_modules/realb/index.d.ts] +//// [/home/user/projects/myproject/node_modules/realb/index.d.ts] Inode:: 15 export {} -//// [/home/user/projects/myproject/node_modules/a] symlink(/home/user/projects/myproject/node_modules/reala) -//// [/home/user/projects/myproject/node_modules/b] symlink(/home/user/projects/myproject/node_modules/realb) -//// [/home/user/projects/myproject/node_modules/reala/node_modules/b] symlink(/home/user/projects/myproject/node_modules/b) -//// [/home/user/projects/myproject/node_modules/realb/node_modules/a] symlink(/home/user/projects/myproject/node_modules/a) +//// [/home/user/projects/myproject/node_modules/a] symlink(/home/user/projects/myproject/node_modules/reala) Inode:: 16 +//// [/home/user/projects/myproject/node_modules/b] symlink(/home/user/projects/myproject/node_modules/realb) Inode:: 17 +//// [/home/user/projects/myproject/node_modules/reala/node_modules/b] symlink(/home/user/projects/myproject/node_modules/b) Inode:: 19 +//// [/home/user/projects/myproject/node_modules/realb/node_modules/a] symlink(/home/user/projects/myproject/node_modules/a) Inode:: 21 /a/lib/tsc.js --w Output:: @@ -71,7 +71,7 @@ DirectoryWatcher:: Added:: WatchInfo: /home/user/projects/myproject 1 undefined Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/user/projects/myproject 1 undefined Wild card directory -//// [/home/user/projects/myproject/src/file.js] +//// [/home/user/projects/myproject/src/file.js] Inode:: 22 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -85,27 +85,27 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":3} /home/user/projects/myproject: *new* - {} + {"inode":7} /home/user/projects/myproject/node_modules: *new* - {} + {"inode":11} /home/user/projects/myproject/node_modules/reala: *new* - {} + {"inode":12} /home/user/projects/myproject/node_modules/reala/index.d.ts: *new* - {} + {"inode":13} /home/user/projects/myproject/node_modules/reala/node_modules: *new* - {} + {"inode":18} /home/user/projects/myproject/node_modules/realb: *new* - {} + {"inode":14} /home/user/projects/myproject/node_modules/realb/node_modules: *new* - {} + {"inode":20} /home/user/projects/myproject/src: *new* - {} + {"inode":8} /home/user/projects/myproject/src/file.ts: *new* - {} + {"inode":9} /home/user/projects/myproject/tsconfig.json: *new* - {} + {"inode":10} Timeout callback:: count: 1 1: timerToUpdateChildWatches *new* diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-renaming-a-file.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-renaming-a-file.js index a1b1d9e9c46e8..06b05db0b5d67 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-renaming-a-file.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-renaming-a-file.js @@ -1,6 +1,6 @@ currentDirectory:: / useCaseSensitiveFileNames: false Input:: -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -13,13 +13,13 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/user/username/projects/myproject/src/file1.ts] +//// [/user/username/projects/myproject/src/file1.ts] Inode:: 9 import { x } from "./file2"; -//// [/user/username/projects/myproject/src/file2.ts] +//// [/user/username/projects/myproject/src/file2.ts] Inode:: 10 export const x = 10; -//// [/user/username/projects/myproject/tsconfig.json] +//// [/user/username/projects/myproject/tsconfig.json] Inode:: 11 { "compilerOptions": { "outDir": "dist" @@ -36,14 +36,14 @@ Output:: -//// [/user/username/projects/myproject/dist/file2.js] +//// [/user/username/projects/myproject/dist/file2.js] Inode:: 13 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.x = void 0; exports.x = 10; -//// [/user/username/projects/myproject/dist/file1.js] +//// [/user/username/projects/myproject/dist/file1.js] Inode:: 14 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -57,19 +57,19 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":3} /user/username/projects/myproject: *new* - {} + {"inode":7} /user/username/projects/myproject/dist: *new* - {} + {"inode":12} /user/username/projects/myproject/src: *new* - {} + {"inode":8} /user/username/projects/myproject/src/file1.ts: *new* - {} + {"inode":9} /user/username/projects/myproject/src/file2.ts: *new* - {} + {"inode":10} /user/username/projects/myproject/tsconfig.json: *new* - {} + {"inode":11} Program root files: [ "/user/username/projects/myproject/src/file1.ts", @@ -109,11 +109,41 @@ exitCode:: ExitStatus.undefined Change:: rename the file Input:: -//// [/user/username/projects/myproject/src/renamed.ts] +//// [/user/username/projects/myproject/src/renamed.ts] Inode:: 15 export const x = 10; //// [/user/username/projects/myproject/src/file2.ts] deleted +Output:: +sysLog:: /user/username/projects/myproject/src/file2.ts:: Changing watcher to MissingFileSystemEntryWatcher + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/src/file2.ts: *new* + {"pollingInterval":250} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {"inode":3} +/user/username/projects/myproject: + {"inode":7} +/user/username/projects/myproject/dist: + {"inode":12} +/user/username/projects/myproject/src: + {"inode":8} +/user/username/projects/myproject/src/file1.ts: + {"inode":9} +/user/username/projects/myproject/tsconfig.json: + {"inode":11} + +FsWatches *deleted*:: +/user/username/projects/myproject/src/file2.ts: + {"inode":10} + Timeout callback:: count: 2 1: timerToUpdateProgram *new* 3: timerToUpdateChildWatches *new* @@ -136,33 +166,33 @@ Output:: -//// [/user/username/projects/myproject/dist/file1.js] file written with same contents +//// [/user/username/projects/myproject/dist/file1.js] file written with same contents Inode:: 14 PolledWatches:: /user/username/projects/myproject/node_modules/@types: {"pollingInterval":500} -/user/username/projects/myproject/src/file2.ts: *new* - {"pollingInterval":500} +/user/username/projects/myproject/src/file2.ts: + {"pollingInterval":500} *new* /user/username/projects/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/user/username/projects/myproject/src/file2.ts: + {"pollingInterval":250} + FsWatches:: /a/lib/lib.d.ts: - {} + {"inode":3} /user/username/projects/myproject: - {} + {"inode":7} /user/username/projects/myproject/dist: - {} + {"inode":12} /user/username/projects/myproject/src: - {} + {"inode":8} /user/username/projects/myproject/src/file1.ts: - {} + {"inode":9} /user/username/projects/myproject/tsconfig.json: - {} - -FsWatches *deleted*:: -/user/username/projects/myproject/src/file2.ts: - {} + {"inode":11} Program root files: [ @@ -219,7 +249,7 @@ Output:: -//// [/user/username/projects/myproject/dist/renamed.js] +//// [/user/username/projects/myproject/dist/renamed.js] Inode:: 16 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.x = void 0; @@ -239,19 +269,19 @@ PolledWatches *deleted*:: FsWatches:: /a/lib/lib.d.ts: - {} + {"inode":3} /user/username/projects/myproject: - {} + {"inode":7} /user/username/projects/myproject/dist: - {} + {"inode":12} /user/username/projects/myproject/src: - {} + {"inode":8} /user/username/projects/myproject/src/file1.ts: - {} + {"inode":9} /user/username/projects/myproject/src/renamed.ts: *new* - {} + {"inode":15} /user/username/projects/myproject/tsconfig.json: - {} + {"inode":11} Timeout callback:: count: 1 7: timerToInvalidateFailedLookupResolutions *deleted* diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-with-outDir-and-declaration-enabled.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-with-outDir-and-declaration-enabled.js index c3b2e42d5d103..a1c7996e5f858 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-with-outDir-and-declaration-enabled.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory-with-outDir-and-declaration-enabled.js @@ -1,6 +1,6 @@ currentDirectory:: / useCaseSensitiveFileNames: false Input:: -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -13,13 +13,13 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/user/username/projects/myproject/src/file1.ts] +//// [/user/username/projects/myproject/src/file1.ts] Inode:: 9 import { x } from "file2"; -//// [/user/username/projects/myproject/node_modules/file2/index.d.ts] +//// [/user/username/projects/myproject/node_modules/file2/index.d.ts] Inode:: 12 export const x = 10; -//// [/user/username/projects/myproject/tsconfig.json] +//// [/user/username/projects/myproject/tsconfig.json] Inode:: 13 { "compilerOptions": { "outDir": "dist", @@ -37,12 +37,12 @@ Output:: -//// [/user/username/projects/myproject/dist/file1.js] +//// [/user/username/projects/myproject/dist/file1.js] Inode:: 15 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -//// [/user/username/projects/myproject/dist/file1.d.ts] +//// [/user/username/projects/myproject/dist/file1.d.ts] Inode:: 16 export {}; @@ -55,23 +55,23 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":3} /user/username/projects/myproject: *new* - {} + {"inode":7} /user/username/projects/myproject/dist: *new* - {} + {"inode":14} /user/username/projects/myproject/node_modules: *new* - {} + {"inode":10} /user/username/projects/myproject/node_modules/file2: *new* - {} + {"inode":11} /user/username/projects/myproject/node_modules/file2/index.d.ts: *new* - {} + {"inode":12} /user/username/projects/myproject/src: *new* - {} + {"inode":8} /user/username/projects/myproject/src/file1.ts: *new* - {} + {"inode":9} /user/username/projects/myproject/tsconfig.json: *new* - {} + {"inode":13} Program root files: [ "/user/username/projects/myproject/src/file1.ts" @@ -111,7 +111,7 @@ exitCode:: ExitStatus.undefined Change:: Add new file, should schedule and run timeout to update directory watcher Input:: -//// [/user/username/projects/myproject/src/file3.ts] +//// [/user/username/projects/myproject/src/file3.ts] Inode:: 17 export const y = 10; @@ -147,14 +147,14 @@ Output:: -//// [/user/username/projects/myproject/dist/file3.js] +//// [/user/username/projects/myproject/dist/file3.js] Inode:: 18 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.y = void 0; exports.y = 10; -//// [/user/username/projects/myproject/dist/file3.d.ts] +//// [/user/username/projects/myproject/dist/file3.d.ts] Inode:: 19 export declare const y = 10; @@ -167,25 +167,25 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: - {} + {"inode":3} /user/username/projects/myproject: - {} + {"inode":7} /user/username/projects/myproject/dist: - {} + {"inode":14} /user/username/projects/myproject/node_modules: - {} + {"inode":10} /user/username/projects/myproject/node_modules/file2: - {} + {"inode":11} /user/username/projects/myproject/node_modules/file2/index.d.ts: - {} + {"inode":12} /user/username/projects/myproject/src: - {} + {"inode":8} /user/username/projects/myproject/src/file1.ts: - {} + {"inode":9} /user/username/projects/myproject/src/file3.ts: *new* - {} + {"inode":17} /user/username/projects/myproject/tsconfig.json: - {} + {"inode":13} Timeout callback:: count: 1 5: timerToUpdateChildWatches *new* diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js index 528078e24b3cc..58f6befb99e5f 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchDirectories/with-non-synchronous-watch-directory.js @@ -1,6 +1,6 @@ currentDirectory:: / useCaseSensitiveFileNames: false Input:: -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -13,13 +13,13 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/user/username/projects/myproject/src/file1.ts] +//// [/user/username/projects/myproject/src/file1.ts] Inode:: 9 import { x } from "file2"; -//// [/user/username/projects/myproject/node_modules/file2/index.d.ts] +//// [/user/username/projects/myproject/node_modules/file2/index.d.ts] Inode:: 12 export const x = 10; -//// [/user/username/projects/myproject/tsconfig.json] +//// [/user/username/projects/myproject/tsconfig.json] Inode:: 13 {} @@ -32,7 +32,7 @@ Output:: -//// [/user/username/projects/myproject/src/file1.js] +//// [/user/username/projects/myproject/src/file1.js] Inode:: 14 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -46,21 +46,21 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":3} /user/username/projects/myproject: *new* - {} + {"inode":7} /user/username/projects/myproject/node_modules: *new* - {} + {"inode":10} /user/username/projects/myproject/node_modules/file2: *new* - {} + {"inode":11} /user/username/projects/myproject/node_modules/file2/index.d.ts: *new* - {} + {"inode":12} /user/username/projects/myproject/src: *new* - {} + {"inode":8} /user/username/projects/myproject/src/file1.ts: *new* - {} + {"inode":9} /user/username/projects/myproject/tsconfig.json: *new* - {} + {"inode":13} Timeout callback:: count: 1 1: timerToUpdateChildWatches *new* @@ -108,31 +108,41 @@ Change:: Remove directory node_modules Input:: //// [/user/username/projects/myproject/node_modules/file2/index.d.ts] deleted +Output:: +sysLog:: /user/username/projects/myproject/node_modules/file2/index.d.ts:: Changing watcher to MissingFileSystemEntryWatcher +sysLog:: /user/username/projects/myproject/node_modules/file2:: Changing watcher to MissingFileSystemEntryWatcher +sysLog:: /user/username/projects/myproject/node_modules:: Changing watcher to MissingFileSystemEntryWatcher + + PolledWatches:: +/user/username/projects/myproject/node_modules: *new* + {"pollingInterval":500} /user/username/projects/myproject/node_modules/@types: {"pollingInterval":500} +/user/username/projects/myproject/node_modules/file2/index.d.ts: *new* + {"pollingInterval":250} /user/username/projects/node_modules/@types: {"pollingInterval":500} FsWatches:: /a/lib/lib.d.ts: - {} + {"inode":3} /user/username/projects/myproject: - {} -/user/username/projects/myproject/node_modules: - {} -/user/username/projects/myproject/node_modules/file2/index.d.ts: - {} + {"inode":7} /user/username/projects/myproject/src: - {} + {"inode":8} /user/username/projects/myproject/src/file1.ts: - {} + {"inode":9} /user/username/projects/myproject/tsconfig.json: - {} + {"inode":13} FsWatches *deleted*:: +/user/username/projects/myproject/node_modules: + {"inode":10} /user/username/projects/myproject/node_modules/file2: - {} + {"inode":11} +/user/username/projects/myproject/node_modules/file2/index.d.ts: + {"inode":12} Timeout callback:: count: 3 7: timerToInvalidateFailedLookupResolutions *new* @@ -159,9 +169,11 @@ Output:: -//// [/user/username/projects/myproject/src/file1.js] file written with same contents +//// [/user/username/projects/myproject/src/file1.js] file written with same contents Inode:: 14 PolledWatches:: +/user/username/projects/myproject/node_modules: + {"pollingInterval":500} /user/username/projects/myproject/node_modules/@types: {"pollingInterval":500} /user/username/projects/node_modules: *new* @@ -169,23 +181,21 @@ PolledWatches:: /user/username/projects/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/file2/index.d.ts: + {"pollingInterval":250} + FsWatches:: /a/lib/lib.d.ts: - {} + {"inode":3} /user/username/projects/myproject: - {} -/user/username/projects/myproject/node_modules: - {} + {"inode":7} /user/username/projects/myproject/src: - {} + {"inode":8} /user/username/projects/myproject/src/file1.ts: - {} + {"inode":9} /user/username/projects/myproject/tsconfig.json: - {} - -FsWatches *deleted*:: -/user/username/projects/myproject/node_modules/file2/index.d.ts: - {} + {"inode":13} Timeout callback:: count: 1 7: timerToInvalidateFailedLookupResolutions *deleted* @@ -278,8 +288,39 @@ Change:: Start npm install Input:: +Output:: +sysLog:: /user/username/projects/myproject/node_modules:: Changing watcher to PresentFileSystemEntryWatcher +sysLog:: /user/username/projects/myproject/node_modules:: Changing watcher to PresentFileSystemEntryWatcher + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {"inode":3} +/user/username/projects/myproject: + {"inode":7} +/user/username/projects/myproject/node_modules: *new* + {"inode":15} +/user/username/projects/myproject/src: + {"inode":8} +/user/username/projects/myproject/src/file1.ts: + {"inode":9} +/user/username/projects/myproject/tsconfig.json: + {"inode":13} + Timeout callback:: count: 1 -15: timerToUpdateChildWatches *new* +16: timerToUpdateChildWatches *new* exitCode:: ExitStatus.undefined @@ -289,8 +330,8 @@ Change:: npm install folder creation of file2 Input:: Timeout callback:: count: 1 -15: timerToUpdateChildWatches *deleted* -16: timerToUpdateChildWatches *new* +16: timerToUpdateChildWatches *deleted* +17: timerToUpdateChildWatches *new* exitCode:: ExitStatus.undefined @@ -298,7 +339,7 @@ exitCode:: ExitStatus.undefined Change:: npm install index file in file2 Input:: -//// [/user/username/projects/myproject/node_modules/file2/index.d.ts] +//// [/user/username/projects/myproject/node_modules/file2/index.d.ts] Inode:: 17 export const x = 10; @@ -310,7 +351,7 @@ Change:: Updates the program Input:: Before running Timeout callback:: count: 1 -16: timerToUpdateChildWatches +17: timerToUpdateChildWatches After running Timeout callback:: count: 2 @@ -324,23 +365,23 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: - {} + {"inode":3} /user/username/projects/myproject: - {} + {"inode":7} /user/username/projects/myproject/node_modules: - {} + {"inode":15} /user/username/projects/myproject/node_modules/file2: *new* - {} + {"inode":16} /user/username/projects/myproject/src: - {} + {"inode":8} /user/username/projects/myproject/src/file1.ts: - {} + {"inode":9} /user/username/projects/myproject/tsconfig.json: - {} + {"inode":13} Timeout callback:: count: 2 -17: timerToInvalidateFailedLookupResolutions *new* -18: timerToUpdateProgram *new* +18: timerToInvalidateFailedLookupResolutions *new* +19: timerToUpdateProgram *new* exitCode:: ExitStatus.undefined @@ -350,14 +391,14 @@ Change:: Invalidates module resolution cache Input:: Before running Timeout callback:: count: 2 -17: timerToInvalidateFailedLookupResolutions -18: timerToUpdateProgram +18: timerToInvalidateFailedLookupResolutions +19: timerToUpdateProgram After running Timeout callback:: count: 1 Timeout callback:: count: 1 -18: timerToUpdateProgram *deleted* -19: timerToUpdateProgram *new* +19: timerToUpdateProgram *deleted* +20: timerToUpdateProgram *new* exitCode:: ExitStatus.undefined @@ -367,7 +408,7 @@ Change:: Pending updates Input:: Before running Timeout callback:: count: 1 -19: timerToUpdateProgram +20: timerToUpdateProgram After running Timeout callback:: count: 0 Output:: @@ -378,7 +419,7 @@ Output:: -//// [/user/username/projects/myproject/src/file1.js] file written with same contents +//// [/user/username/projects/myproject/src/file1.js] file written with same contents Inode:: 14 PolledWatches:: /user/username/projects/myproject/node_modules/@types: @@ -392,21 +433,21 @@ PolledWatches *deleted*:: FsWatches:: /a/lib/lib.d.ts: - {} + {"inode":3} /user/username/projects/myproject: - {} + {"inode":7} /user/username/projects/myproject/node_modules: - {} + {"inode":15} /user/username/projects/myproject/node_modules/file2: - {} + {"inode":16} /user/username/projects/myproject/node_modules/file2/index.d.ts: *new* - {} + {"inode":17} /user/username/projects/myproject/src: - {} + {"inode":8} /user/username/projects/myproject/src/file1.ts: - {} + {"inode":9} /user/username/projects/myproject/tsconfig.json: - {} + {"inode":13} Program root files: [ diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching-extendedDiagnostics.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching-extendedDiagnostics.js index 778ae8213551a..3221f7c15e89f 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching-extendedDiagnostics.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching-extendedDiagnostics.js @@ -1,6 +1,6 @@ currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false Input:: -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -13,22 +13,22 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/user/username/projects/myproject/src/main.ts] +//// [/user/username/projects/myproject/src/main.ts] Inode:: 9 import { foo } from "bar"; foo(); -//// [/user/username/projects/myproject/node_modules/bar/index.d.ts] +//// [/user/username/projects/myproject/node_modules/bar/index.d.ts] Inode:: 12 export { foo } from "./foo"; -//// [/user/username/projects/myproject/node_modules/bar/foo.d.ts] +//// [/user/username/projects/myproject/node_modules/bar/foo.d.ts] Inode:: 13 export function foo(): string; -//// [/user/username/projects/myproject/node_modules/bar/fooBar.d.ts] +//// [/user/username/projects/myproject/node_modules/bar/fooBar.d.ts] Inode:: 14 export function fooBar(): string; -//// [/user/username/projects/myproject/node_modules/bar/temp/index.d.ts] +//// [/user/username/projects/myproject/node_modules/bar/temp/index.d.ts] Inode:: 16 export function temp(): string; -//// [/user/username/projects/myproject/tsconfig.json] +//// [/user/username/projects/myproject/tsconfig.json] Inode:: 17 { "exclude": [ "node_modules" @@ -69,7 +69,7 @@ DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"excl Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"excludeDirectories":["/user/username/projects/myproject/**/temp"]} Wild card directory -//// [/user/username/projects/myproject/src/main.js] +//// [/user/username/projects/myproject/src/main.js] Inode:: 18 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var bar_1 = require("bar"); @@ -85,23 +85,23 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":3} /user/username/projects/myproject: *new* - {} + {"inode":7} /user/username/projects/myproject/node_modules: *new* - {} + {"inode":10} /user/username/projects/myproject/node_modules/bar: *new* - {} + {"inode":11} /user/username/projects/myproject/node_modules/bar/foo.d.ts: *new* - {} + {"inode":13} /user/username/projects/myproject/node_modules/bar/index.d.ts: *new* - {} + {"inode":12} /user/username/projects/myproject/src: *new* - {} + {"inode":8} /user/username/projects/myproject/src/main.ts: *new* - {} + {"inode":9} /user/username/projects/myproject/tsconfig.json: *new* - {} + {"inode":17} Timeout callback:: count: 1 1: timerToUpdateChildWatches *new* @@ -161,7 +161,7 @@ exitCode:: ExitStatus.undefined Change:: add new folder to temp Input:: -//// [/user/username/projects/myproject/node_modules/bar/temp/fooBar/index.d.ts] +//// [/user/username/projects/myproject/node_modules/bar/temp/fooBar/index.d.ts] Inode:: 20 export function temp(): string; diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching.js index 34d9ae46495e5..51809bf4798ed 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-excludeDirectories-option-with-recursive-directory-watching.js @@ -1,6 +1,6 @@ currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false Input:: -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -13,22 +13,22 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/user/username/projects/myproject/src/main.ts] +//// [/user/username/projects/myproject/src/main.ts] Inode:: 9 import { foo } from "bar"; foo(); -//// [/user/username/projects/myproject/node_modules/bar/index.d.ts] +//// [/user/username/projects/myproject/node_modules/bar/index.d.ts] Inode:: 12 export { foo } from "./foo"; -//// [/user/username/projects/myproject/node_modules/bar/foo.d.ts] +//// [/user/username/projects/myproject/node_modules/bar/foo.d.ts] Inode:: 13 export function foo(): string; -//// [/user/username/projects/myproject/node_modules/bar/fooBar.d.ts] +//// [/user/username/projects/myproject/node_modules/bar/fooBar.d.ts] Inode:: 14 export function fooBar(): string; -//// [/user/username/projects/myproject/node_modules/bar/temp/index.d.ts] +//// [/user/username/projects/myproject/node_modules/bar/temp/index.d.ts] Inode:: 16 export function temp(): string; -//// [/user/username/projects/myproject/tsconfig.json] +//// [/user/username/projects/myproject/tsconfig.json] Inode:: 17 { "exclude": [ "node_modules" @@ -50,7 +50,7 @@ Output:: -//// [/user/username/projects/myproject/src/main.js] +//// [/user/username/projects/myproject/src/main.js] Inode:: 18 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var bar_1 = require("bar"); @@ -66,23 +66,23 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":3} /user/username/projects/myproject: *new* - {} + {"inode":7} /user/username/projects/myproject/node_modules: *new* - {} + {"inode":10} /user/username/projects/myproject/node_modules/bar: *new* - {} + {"inode":11} /user/username/projects/myproject/node_modules/bar/foo.d.ts: *new* - {} + {"inode":13} /user/username/projects/myproject/node_modules/bar/index.d.ts: *new* - {} + {"inode":12} /user/username/projects/myproject/src: *new* - {} + {"inode":8} /user/username/projects/myproject/src/main.ts: *new* - {} + {"inode":9} /user/username/projects/myproject/tsconfig.json: *new* - {} + {"inode":17} Timeout callback:: count: 1 1: timerToUpdateChildWatches *new* @@ -130,7 +130,7 @@ exitCode:: ExitStatus.undefined Change:: add new folder to temp Input:: -//// [/user/username/projects/myproject/node_modules/bar/temp/fooBar/index.d.ts] +//// [/user/username/projects/myproject/node_modules/bar/temp/fooBar/index.d.ts] Inode:: 20 export function temp(): string; diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-fallbackPolling-option.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-fallbackPolling-option.js index 55174ef5b69ef..911761aba66c7 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-fallbackPolling-option.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-fallbackPolling-option.js @@ -1,6 +1,6 @@ currentDirectory:: / useCaseSensitiveFileNames: false Input:: -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -13,13 +13,13 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/a/b/commonFile1.ts] +//// [/a/b/commonFile1.ts] Inode:: 5 let x = 1 -//// [/a/b/commonFile2.ts] +//// [/a/b/commonFile2.ts] Inode:: 6 let y = 1 -//// [/a/b/tsconfig.json] +//// [/a/b/tsconfig.json] Inode:: 7 { "watchOptions": { "fallbackPolling": "PriorityInterval" @@ -41,11 +41,11 @@ sysLog:: /a/lib/lib.d.ts:: Changing to watchFile sysLog:: /a/b:: Changing to watchFile -//// [/a/b/commonFile1.js] +//// [/a/b/commonFile1.js] Inode:: 8 var x = 1; -//// [/a/b/commonFile2.js] +//// [/a/b/commonFile2.js] Inode:: 9 var y = 1; diff --git a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchDirectory-option.js b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchDirectory-option.js index 7238024237ee9..f172cd41ea9e0 100644 --- a/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchDirectory-option.js +++ b/tests/baselines/reference/tscWatch/watchEnvironment/watchOptions/with-watchDirectory-option.js @@ -1,6 +1,6 @@ currentDirectory:: / useCaseSensitiveFileNames: false Input:: -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -13,13 +13,13 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/a/b/commonFile1.ts] +//// [/a/b/commonFile1.ts] Inode:: 5 let x = 1 -//// [/a/b/commonFile2.ts] +//// [/a/b/commonFile2.ts] Inode:: 6 let y = 1 -//// [/a/b/tsconfig.json] +//// [/a/b/tsconfig.json] Inode:: 7 { "watchOptions": { "watchDirectory": "UseFsEvents" @@ -36,26 +36,26 @@ Output:: -//// [/a/b/commonFile1.js] +//// [/a/b/commonFile1.js] Inode:: 8 var x = 1; -//// [/a/b/commonFile2.js] +//// [/a/b/commonFile2.js] Inode:: 9 var y = 1; FsWatches:: /a/b: *new* - {} + {"inode":4} /a/b/commonFile1.ts: *new* - {} + {"inode":5} /a/b/commonFile2.ts: *new* - {} + {"inode":6} /a/b/tsconfig.json: *new* - {} + {"inode":7} /a/lib/lib.d.ts: *new* - {} + {"inode":3} Program root files: [ "/a/b/commonFile1.ts", diff --git a/tests/baselines/reference/tsserver/watchEnvironment/recursive-directory-does-not-watch-files-starting-with-dot-in-node_modules.js b/tests/baselines/reference/tsserver/watchEnvironment/recursive-directory-does-not-watch-files-starting-with-dot-in-node_modules.js index 63ebb2a7bd015..c61c9f69bbfa3 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/recursive-directory-does-not-watch-files-starting-with-dot-in-node_modules.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/recursive-directory-does-not-watch-files-starting-with-dot-in-node_modules.js @@ -1,16 +1,16 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist Before request -//// [/a/username/project/src/index.ts] +//// [/a/username/project/src/index.ts] Inode:: 5 import {} from "file" -//// [/a/username/project/src/file1.ts] +//// [/a/username/project/src/file1.ts] Inode:: 6 -//// [/a/username/project/tsconfig.json] +//// [/a/username/project/tsconfig.json] Inode:: 7 {} -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 9 /// interface Boolean {} interface Function {} @@ -23,7 +23,7 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/a/username/project/node_modules/someFile.d.ts] +//// [/a/username/project/node_modules/someFile.d.ts] Inode:: 11 @@ -166,17 +166,17 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":9} /a/username/project: *new* - {} + {"inode":3} /a/username/project/node_modules: *new* - {} + {"inode":10} /a/username/project/src: *new* - {} + {"inode":4} /a/username/project/src/file1.ts: *new* - {} + {"inode":6} /a/username/project/tsconfig.json: *new* - {} + {"inode":7} Projects:: /a/username/project/tsconfig.json (Configured) *new* @@ -198,26 +198,26 @@ ScriptInfos:: /a/username/project/tsconfig.json *default* After writing ignored file or folder -//// [/a/username/project/node_modules/.cache/someFile.d.ts] +//// [/a/username/project/node_modules/.cache/someFile.d.ts] Inode:: 13 After writing ignored file or folder -//// [/a/username/project/node_modules/.cacheFile.ts] +//// [/a/username/project/node_modules/.cacheFile.ts] Inode:: 14 After writing ignored file or folder -//// [/a/username/project/.git/someFile.d.ts] +//// [/a/username/project/.git/someFile.d.ts] Inode:: 16 After writing ignored file or folder -//// [/a/username/project/.gitCache.d.ts] +//// [/a/username/project/.gitCache.d.ts] Inode:: 17 After writing ignored file or folder -//// [/a/username/project/src/.#field.ts] +//// [/a/username/project/src/.#field.ts] Inode:: 18 diff --git a/tests/baselines/reference/tsserver/watchEnvironment/uses-dynamic-polling-when-file-is-added-to-subfolder.js b/tests/baselines/reference/tsserver/watchEnvironment/uses-dynamic-polling-when-file-is-added-to-subfolder.js index 9d1ba7d1f55ba..3ddc9a9567b41 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/uses-dynamic-polling-when-file-is-added-to-subfolder.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/uses-dynamic-polling-when-file-is-added-to-subfolder.js @@ -1,20 +1,20 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist Before request -//// [/a/username/project/src/index.ts] +//// [/a/username/project/src/index.ts] Inode:: 5 import {} from "./" -//// [/a/username/project/src/file1.ts] +//// [/a/username/project/src/file1.ts] Inode:: 6 -//// [/a/username/project/tsconfig.json] +//// [/a/username/project/tsconfig.json] Inode:: 7 { "watchOptions": { "synchronousWatchDirectory": true } } -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 9 /// interface Boolean {} interface Function {} @@ -167,11 +167,11 @@ After request FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":9} /a/username/project/src/file1.ts: *new* - {} + {"inode":6} /a/username/project/tsconfig.json: *new* - {} + {"inode":7} Timeout callback:: count: 1 1: pollPollingIntervalQueue *new* @@ -229,7 +229,7 @@ After request Before running Timeout callback:: count: 1 1: pollPollingIntervalQueue -//// [/a/username/project/src/file2.ts] +//// [/a/username/project/src/file2.ts] Inode:: 10 @@ -318,13 +318,13 @@ After request FsWatches:: /a/lib/lib.d.ts: - {} + {"inode":9} /a/username/project/src/file1.ts: - {} + {"inode":6} /a/username/project/src/file2.ts: *new* - {} + {"inode":10} /a/username/project/tsconfig.json: - {} + {"inode":7} Timeout callback:: count: 4 3: *ensureProjectForOpenFiles* *deleted* diff --git a/tests/baselines/reference/tsserver/watchEnvironment/uses-non-recursive-watchDirectory-when-file-is-added-to-subfolder.js b/tests/baselines/reference/tsserver/watchEnvironment/uses-non-recursive-watchDirectory-when-file-is-added-to-subfolder.js index 39a8069ff731d..91fc7788f6e44 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/uses-non-recursive-watchDirectory-when-file-is-added-to-subfolder.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/uses-non-recursive-watchDirectory-when-file-is-added-to-subfolder.js @@ -1,20 +1,20 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist Before request -//// [/a/username/project/src/index.ts] +//// [/a/username/project/src/index.ts] Inode:: 5 import {} from "./" -//// [/a/username/project/src/file1.ts] +//// [/a/username/project/src/file1.ts] Inode:: 6 -//// [/a/username/project/tsconfig.json] +//// [/a/username/project/tsconfig.json] Inode:: 7 { "watchOptions": { "synchronousWatchDirectory": true } } -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 9 /// interface Boolean {} interface Function {} @@ -171,15 +171,15 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":9} /a/username/project: *new* - {} + {"inode":3} /a/username/project/src: *new* - {} + {"inode":4} /a/username/project/src/file1.ts: *new* - {} + {"inode":6} /a/username/project/tsconfig.json: *new* - {} + {"inode":7} Projects:: /a/username/project/tsconfig.json (Configured) *new* @@ -243,7 +243,7 @@ Before running Timeout callback:: count: 3 1: /a/username/project/tsconfig.json 2: *ensureProjectForOpenFiles* 3: /a/username/project/tsconfig.jsonFailedLookupInvalidation -//// [/a/username/project/src/file2.ts] +//// [/a/username/project/src/file2.ts] Inode:: 10 @@ -318,17 +318,17 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: - {} + {"inode":9} /a/username/project: - {} + {"inode":3} /a/username/project/src: - {} + {"inode":4} /a/username/project/src/file1.ts: - {} + {"inode":6} /a/username/project/src/file2.ts: *new* - {} + {"inode":10} /a/username/project/tsconfig.json: - {} + {"inode":7} Timeout callback:: count: 0 3: /a/username/project/tsconfig.jsonFailedLookupInvalidation *deleted* diff --git a/tests/baselines/reference/tsserver/watchEnvironment/uses-watchFile-when-file-is-added-to-subfolder.js b/tests/baselines/reference/tsserver/watchEnvironment/uses-watchFile-when-file-is-added-to-subfolder.js index 1419bbc6a683c..7d6964a087fd6 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/uses-watchFile-when-file-is-added-to-subfolder.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/uses-watchFile-when-file-is-added-to-subfolder.js @@ -1,20 +1,20 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist Before request -//// [/a/username/project/src/index.ts] +//// [/a/username/project/src/index.ts] Inode:: 5 import {} from "./" -//// [/a/username/project/src/file1.ts] +//// [/a/username/project/src/file1.ts] Inode:: 6 -//// [/a/username/project/tsconfig.json] +//// [/a/username/project/tsconfig.json] Inode:: 7 { "watchOptions": { "synchronousWatchDirectory": true } } -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 9 /// interface Boolean {} interface Function {} @@ -175,11 +175,11 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: *new* - {} + {"inode":9} /a/username/project/src/file1.ts: *new* - {} + {"inode":6} /a/username/project/tsconfig.json: *new* - {} + {"inode":7} Projects:: /a/username/project/tsconfig.json (Configured) *new* @@ -243,7 +243,7 @@ Before running Timeout callback:: count: 3 1: /a/username/project/tsconfig.json 2: *ensureProjectForOpenFiles* 3: /a/username/project/tsconfig.jsonFailedLookupInvalidation -//// [/a/username/project/src/file2.ts] +//// [/a/username/project/src/file2.ts] Inode:: 10 @@ -294,13 +294,13 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: - {} + {"inode":9} /a/username/project/src/file1.ts: - {} + {"inode":6} /a/username/project/src/file2.ts: *new* - {} + {"inode":10} /a/username/project/tsconfig.json: - {} + {"inode":7} Timeout callback:: count: 1 2: *ensureProjectForOpenFiles* *deleted* diff --git a/tests/baselines/reference/tsserver/watchEnvironment/with-fallbackPolling-option-as-host-configuration.js b/tests/baselines/reference/tsserver/watchEnvironment/with-fallbackPolling-option-as-host-configuration.js index d8ecf3e64096a..22e8ed3a2de05 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/with-fallbackPolling-option-as-host-configuration.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/with-fallbackPolling-option-as-host-configuration.js @@ -1,7 +1,7 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist Before request -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -14,13 +14,13 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/a/b/commonFile2.ts] +//// [/a/b/commonFile2.ts] Inode:: 5 let y = 1 -//// [/a/b/tsconfig.json] +//// [/a/b/tsconfig.json] Inode:: 6 {} -//// [/a/b/commonFile1.ts] +//// [/a/b/commonFile1.ts] Inode:: 7 let x = 1 diff --git a/tests/baselines/reference/tsserver/watchEnvironment/with-fallbackPolling-option-in-configFile.js b/tests/baselines/reference/tsserver/watchEnvironment/with-fallbackPolling-option-in-configFile.js index 7ad998837444a..71069866d36d4 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/with-fallbackPolling-option-in-configFile.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/with-fallbackPolling-option-in-configFile.js @@ -1,7 +1,7 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist Before request -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -14,17 +14,17 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/a/b/commonFile2.ts] +//// [/a/b/commonFile2.ts] Inode:: 5 let y = 1 -//// [/a/b/tsconfig.json] +//// [/a/b/tsconfig.json] Inode:: 6 { "watchOptions": { "fallbackPolling": "PriorityInterval" } } -//// [/a/b/commonFile1.ts] +//// [/a/b/commonFile1.ts] Inode:: 7 let x = 1 diff --git a/tests/baselines/reference/tsserver/watchEnvironment/with-watchDirectory-option-as-host-configuration.js b/tests/baselines/reference/tsserver/watchEnvironment/with-watchDirectory-option-as-host-configuration.js index 75a9301f4f771..3b0977c1025b4 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/with-watchDirectory-option-as-host-configuration.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/with-watchDirectory-option-as-host-configuration.js @@ -1,7 +1,7 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist Before request -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -14,13 +14,13 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/a/b/commonFile2.ts] +//// [/a/b/commonFile2.ts] Inode:: 5 let y = 1 -//// [/a/b/tsconfig.json] +//// [/a/b/tsconfig.json] Inode:: 6 {} -//// [/a/b/commonFile1.ts] +//// [/a/b/commonFile1.ts] Inode:: 7 let x = 1 @@ -182,13 +182,13 @@ After request FsWatches:: /a/b: *new* - {} + {"inode":4} /a/b/commonFile2.ts: *new* - {} + {"inode":5} /a/b/tsconfig.json: *new* - {} + {"inode":6} /a/lib/lib.d.ts: *new* - {} + {"inode":3} Projects:: /a/b/tsconfig.json (Configured) *new* diff --git a/tests/baselines/reference/tsserver/watchEnvironment/with-watchDirectory-option-in-configFile.js b/tests/baselines/reference/tsserver/watchEnvironment/with-watchDirectory-option-in-configFile.js index 6538f64943997..a5ce7a6ef954e 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/with-watchDirectory-option-in-configFile.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/with-watchDirectory-option-in-configFile.js @@ -1,7 +1,7 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist Before request -//// [/a/lib/lib.d.ts] +//// [/a/lib/lib.d.ts] Inode:: 3 /// interface Boolean {} interface Function {} @@ -14,17 +14,17 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } -//// [/a/b/commonFile2.ts] +//// [/a/b/commonFile2.ts] Inode:: 5 let y = 1 -//// [/a/b/tsconfig.json] +//// [/a/b/tsconfig.json] Inode:: 6 { "watchOptions": { "watchDirectory": "UseFsEvents" } } -//// [/a/b/commonFile1.ts] +//// [/a/b/commonFile1.ts] Inode:: 7 let x = 1 @@ -163,13 +163,13 @@ After request FsWatches:: /a/b: *new* - {} + {"inode":4} /a/b/commonFile2.ts: *new* - {} + {"inode":5} /a/b/tsconfig.json: *new* - {} + {"inode":6} /a/lib/lib.d.ts: *new* - {} + {"inode":3} Projects:: /a/b/tsconfig.json (Configured) *new*