diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index d47ded5bd68b0..6a0d8d65ade76 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -846,7 +846,7 @@ namespace ts { /*@internal*/ export function resolveModule( pluginConfigEntry: PluginImport, - searchPaths: string[], + searchPaths: readonly string[], host: Pick, log: (message: string) => void, ): ImportPluginResult { @@ -945,9 +945,12 @@ namespace ts { sysLog(`Skipped loading watchFactory ${isString(options.watchFactory) ? options.watchFactory : JSON.stringify(options.watchFactory)} because it can be named with only package name`); return setUserWatchFactory(options, /*userWatchFactory*/ undefined); } - const searchPaths = [ - combinePaths(system.getExecutingFilePath(), "../../..") - ]; + const host = options.getHost?.(); + const searchPaths = host ? + host.searchPaths : + [ + combinePaths(system.getExecutingFilePath(), "../../..") + ]; sysLog(`Enabling watchFactory ${isString(options.watchFactory) ? options.watchFactory : JSON.stringify(options.watchFactory)} from candidate paths: ${searchPaths.join(",")}`); const { resolvedModule, errorLogs, pluginConfigEntry } = resolveModule( isString(options.watchFactory) ? { name: options.watchFactory } : options.watchFactory, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 34173682d4b6e..be8e1a752f7da 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -6679,6 +6679,10 @@ namespace ts { watchDirectory?(fileName: string, callback: DirectoryWatcherCallback, recursive: boolean, options: WatchOptions | undefined): FileWatcher; onConfigurationChanged?(config: any): void; } + /*@internal*/ + export interface WatchOptionsFactoryHost { + searchPaths: readonly string[]; + } export interface WatchOptions { watchFile?: WatchFileKind; watchDirectory?: WatchDirectoryKind; @@ -6690,6 +6694,7 @@ namespace ts { // All the internal properties are set as non enumerable and non configurable so that they arenot enumerated when checking if options have changed /* @internal */ getResolvedWatchFactory?(): UserWatchFactory | undefined; + /* @internal */ getHost?(): WatchOptionsFactoryHost; [option: string]: CompilerOptionsValue | undefined; } diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index da86c4ebaf61f..5752c88e67b75 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -1311,7 +1311,7 @@ namespace ts.server { * This is to watch whenever files are added or removed to the wildcard directories */ /*@internal*/ - private watchWildcardDirectory(directory: Path, flags: WatchDirectoryFlags, configFileName: NormalizedPath, config: ParsedConfig) { + private watchWildcardDirectory(directory: Path, flags: WatchDirectoryFlags, configFileName: NormalizedPath, canonicalConfigFilePath: NormalizedPath, config: ParsedConfig) { return this.watchFactory.watchDirectory( directory, fileOrDirectory => { @@ -1370,7 +1370,7 @@ namespace ts.server { }); }, flags, - this.getWatchOptionsFromProjectWatchOptions(config.parsedCommandLine!.watchOptions), + this.getWatchOptionsFromProjectWatchOptions(config.parsedCommandLine!.watchOptions, canonicalConfigFilePath), WatchType.WildcardDirectory, configFileName ); @@ -1684,7 +1684,7 @@ namespace ts.server { configFileName, (_fileName, eventKind) => this.onConfigFileChanged(canonicalConfigFilePath, eventKind), PollingInterval.High, - this.getWatchOptionsFromProjectWatchOptions(configFileExistenceInfo?.config?.parsedCommandLine?.watchOptions), + this.getWatchOptionsFromProjectWatchOptions(configFileExistenceInfo?.config?.parsedCommandLine?.watchOptions, canonicalConfigFilePath), WatchType.ConfigFile, forProject ); @@ -2236,9 +2236,9 @@ namespace ts.server { // If watch options different than older options when setting for the first time, update the config file watcher if (!oldCommandLine && !isJsonEqual( // Old options - this.getWatchOptionsFromProjectWatchOptions(/*projectOptions*/ undefined), + this.getWatchOptionsFromProjectWatchOptions(/*projectOptions*/ undefined, canonicalConfigFilePath), // New options - this.getWatchOptionsFromProjectWatchOptions(parsedCommandLine.watchOptions) + this.getWatchOptionsFromProjectWatchOptions(parsedCommandLine.watchOptions, canonicalConfigFilePath) )) { // Reset the config file watcher configFileExistenceInfo.watcher?.close(); @@ -2284,7 +2284,7 @@ namespace ts.server { config!.watchedDirectories ||= new Map(), new Map(getEntries(config!.parsedCommandLine!.wildcardDirectories!)), // Create new directory watcher - (directory, flags) => this.watchWildcardDirectory(directory as Path, flags, configFileName, config!), + (directory, flags) => this.watchWildcardDirectory(directory as Path, flags, configFileName, forProject.canonicalConfigFilePath, config!), ); } else { @@ -3044,6 +3044,9 @@ namespace ts.server { if (args.watchOptions) { const result = convertWatchOptions(args.watchOptions); this.hostConfiguration.watchOptions = result?.watchOptions; + if (this.hostConfiguration.watchOptions?.watchFactory) { + this.setWatchOptionsFactoryHost(this.hostConfiguration.watchOptions, /*canonicalConfigFilePath*/ undefined); + } this.projectWatchOptions.clear(); this.logger.info(`Host watch options changed to ${JSON.stringify(this.hostConfiguration.watchOptions)}, it will be take effect for next watches.`); if (result?.errors?.length) { @@ -3059,12 +3062,12 @@ namespace ts.server { } /*@internal*/ - getWatchOptions(project: Project) { - return this.getWatchOptionsFromProjectWatchOptions(project.getWatchOptions()); + getWatchOptions(project: Project): WatchOptions | undefined { + return this.getWatchOptionsFromProjectWatchOptions(project.getWatchOptions(), isConfiguredProject(project) ? project.canonicalConfigFilePath : undefined); } /*@internal*/ - private getWatchOptionsFromProjectWatchOptions(projectOptions: WatchOptions | undefined) { + private getWatchOptionsFromProjectWatchOptions(projectOptions: WatchOptions | undefined, canonicalConfigFilePath: NormalizedPath | undefined) { if (!projectOptions) return this.hostConfiguration.watchOptions; let options = this.projectWatchOptions.get(projectOptions); if (options) return options; @@ -3072,9 +3075,17 @@ namespace ts.server { { ...this.hostConfiguration.watchOptions, ...projectOptions } : projectOptions ); + this.setWatchOptionsFactoryHost(options, canonicalConfigFilePath); return options; } + /*@internal*/ + private setWatchOptionsFactoryHost(options: WatchOptions, canonicalConfigFilePath: NormalizedPath | undefined) { + setWatchOptionInternalProperty(options, "getHost", memoize(() => ({ + searchPaths: this.getProjectPluginSearchPaths(canonicalConfigFilePath) + }))); + } + /*@internal*/ clearWatchOptionsFromProjectWatchOptions(projectOptions: WatchOptions | undefined) { if (projectOptions) this.projectWatchOptions.delete(projectOptions); @@ -4097,6 +4108,27 @@ namespace ts.server { return false; } + /*@internal */ + getGlobalPluginSearchPaths() { + // Search any globally-specified probe paths, then our peer node_modules + return [ + ...this.pluginProbeLocations, + // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ + combinePaths(this.getExecutingFilePath(), "../../.."), + ]; + } + + /*@internal*/ + getProjectPluginSearchPaths(canonicalConfigFilePath: string | undefined) { + const searchPaths = this.getGlobalPluginSearchPaths(); + if (canonicalConfigFilePath && this.allowLocalPluginLoads) { + const local = getDirectoryPath(canonicalConfigFilePath); + this.logger.info(`Local plugin loading enabled; adding ${local} to search paths`); + searchPaths.unshift(local); + } + return searchPaths; + } + /*@internal*/ requestEnablePlugin(project: Project, pluginConfigEntry: PluginImport, searchPaths: string[]) { if (!this.host.importPlugin && !this.host.require) { diff --git a/src/server/project.ts b/src/server/project.ts index 194ae6e60bcf6..1d28560fc86f5 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -1604,13 +1604,8 @@ namespace ts.server { } /*@internal*/ - protected getGlobalPluginSearchPaths() { - // Search any globally-specified probe paths, then our peer node_modules - return [ - ...this.projectService.pluginProbeLocations, - // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ - combinePaths(this.projectService.getExecutingFilePath(), "../../.."), - ]; + protected getProjectPluginSearchPaths() { + return this.projectService.getProjectPluginSearchPaths(/*canonicalConfigFilePath*/ undefined); } protected enableGlobalPlugins(options: CompilerOptions): void { @@ -1623,7 +1618,7 @@ namespace ts.server { } // Enable global plugins with synthetic configuration entries - const searchPaths = this.getGlobalPluginSearchPaths(); + const searchPaths = this.projectService.getGlobalPluginSearchPaths(); for (const globalPluginName of this.projectService.globalPlugins) { // Skip empty names from odd commandline parses if (!globalPluginName) continue; @@ -2481,6 +2476,11 @@ namespace ts.server { return this.getCurrentProgram()?.forEachResolvedProjectReference(cb); } + /*@internal*/ + protected getProjectPluginSearchPaths() { + return this.projectService.getProjectPluginSearchPaths(this.canonicalConfigFilePath); + } + /*@internal*/ enablePluginsWithOptions(options: CompilerOptions): void { this.plugins.length = 0; @@ -2491,14 +2491,8 @@ namespace ts.server { return; } - const searchPaths = this.getGlobalPluginSearchPaths(); - if (this.projectService.allowLocalPluginLoads) { - const local = getDirectoryPath(this.canonicalConfigFilePath); - this.projectService.logger.info(`Local plugin loading enabled; adding ${local} to search paths`); - searchPaths.unshift(local); - } - // Enable tsconfig-specified plugins + const searchPaths = this.getProjectPluginSearchPaths(); if (options.plugins) { for (const pluginConfigEntry of options.plugins) { this.enablePlugin(pluginConfigEntry, searchPaths); diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-allowLocalPluginLoads-object.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-allowLocalPluginLoads-object.js index 803def231ed88..09a7c513d6509 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-allowLocalPluginLoads-object.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-allowLocalPluginLoads-object.js @@ -94,7 +94,7 @@ Info 6 [00:00:29.000] Search path: /user/username/projects/myproject Info 7 [00:00:30.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 8 [00:00:31.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 9 [00:00:32.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Info 10 [00:00:33.000] Config: /user/username/projects/myproject/tsconfig.json : { diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-allowLocalPluginLoads.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-allowLocalPluginLoads.js index 51baa647f12db..204f041475a26 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-allowLocalPluginLoads.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-allowLocalPluginLoads.js @@ -91,7 +91,7 @@ Info 6 [00:00:29.000] Search path: /user/username/projects/myproject Info 7 [00:00:30.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 8 [00:00:31.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 9 [00:00:32.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin"} and options: {"watchFactory":"myplugin"} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Info 10 [00:00:33.000] Config: /user/username/projects/myproject/tsconfig.json : { diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-object.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-object.js index 803def231ed88..09a7c513d6509 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-object.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-object.js @@ -94,7 +94,7 @@ Info 6 [00:00:29.000] Search path: /user/username/projects/myproject Info 7 [00:00:30.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 8 [00:00:31.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 9 [00:00:32.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Info 10 [00:00:33.000] Config: /user/username/projects/myproject/tsconfig.json : { diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginOverride-allowLocalPluginLoads-object.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginOverride-allowLocalPluginLoads-object.js index 986d42156a862..92d0e23a09c57 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginOverride-allowLocalPluginLoads-object.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginOverride-allowLocalPluginLoads-object.js @@ -138,7 +138,7 @@ Info 9 [00:00:32.000] Search path: /user/username/projects/myproject Info 10 [00:00:33.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 11 [00:00:34.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 12 [00:00:35.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Info 13 [00:00:36.000] Config: /user/username/projects/myproject/tsconfig.json : { diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginOverride-object.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginOverride-object.js index 986d42156a862..92d0e23a09c57 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginOverride-object.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginOverride-object.js @@ -138,7 +138,7 @@ Info 9 [00:00:32.000] Search path: /user/username/projects/myproject Info 10 [00:00:33.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 11 [00:00:34.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 12 [00:00:35.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Info 13 [00:00:36.000] Config: /user/username/projects/myproject/tsconfig.json : { diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginoverride-allowLocalPluginLoads.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginoverride-allowLocalPluginLoads.js index 32a366071322e..3509086b80dad 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginoverride-allowLocalPluginLoads.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginoverride-allowLocalPluginLoads.js @@ -135,7 +135,7 @@ Info 9 [00:00:32.000] Search path: /user/username/projects/myproject Info 10 [00:00:33.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 11 [00:00:34.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 12 [00:00:35.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin"} and options: {"watchFactory":"myplugin"} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Info 13 [00:00:36.000] Config: /user/username/projects/myproject/tsconfig.json : { diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginoverride.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginoverride.js index 32a366071322e..3509086b80dad 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginoverride.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host-with-pluginoverride.js @@ -135,7 +135,7 @@ Info 9 [00:00:32.000] Search path: /user/username/projects/myproject Info 10 [00:00:33.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 11 [00:00:34.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 12 [00:00:35.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin"} and options: {"watchFactory":"myplugin"} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Info 13 [00:00:36.000] Config: /user/username/projects/myproject/tsconfig.json : { diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host.js index 51baa647f12db..204f041475a26 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-as-configuration-of-host.js @@ -91,7 +91,7 @@ Info 6 [00:00:29.000] Search path: /user/username/projects/myproject Info 7 [00:00:30.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 8 [00:00:31.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 9 [00:00:32.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin"} and options: {"watchFactory":"myplugin"} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Info 10 [00:00:33.000] Config: /user/username/projects/myproject/tsconfig.json : { diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-allowLocalPluginLoads-object.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-allowLocalPluginLoads-object.js index f252724aa67b8..fcb4653d476f9 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-allowLocalPluginLoads-object.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-allowLocalPluginLoads-object.js @@ -109,7 +109,7 @@ Info 6 [00:00:29.000] Search path: /user/username/projects/myproject Info 7 [00:00:30.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 8 [00:00:31.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 9 [00:00:32.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin2 from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin2 from /a/pluginprobe1/node_modules Require:: Module myplugin2 created with config: {"name":"myplugin2","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Custom myplugin2watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Info 10 [00:00:33.000] Config: /user/username/projects/myproject/tsconfig.json : { @@ -129,23 +129,24 @@ Info 10 [00:00:33.000] Config: /user/username/projects/myproject/tsconfig.json } Info 11 [00:00:34.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 12 [00:00:35.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +Info 13 [00:00:36.000] Local plugin loading enabled; adding /user/username/projects/myproject to search paths +CustomRequire:: Resolving myplugin from /user/username/projects/myproject/node_modules Require:: Module myplugin created with config: {"name":"myplugin","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} -Info 13 [00:00:36.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 14 [00:00:37.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Custom watchDirectory: /user/username/projects/myproject true {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} -Info 14 [00:00:37.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 15 [00:00:38.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info +Info 15 [00:00:38.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 16 [00:00:39.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info Custom myplugin2watchFile: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} -Info 16 [00:00:39.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 17 [00:00:40.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info +Info 17 [00:00:40.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 18 [00:00:41.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info Custom myplugin2watchFile: /a/lib/lib.d.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} -Info 18 [00:00:41.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 19 [00:00:42.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots Custom watchDirectory: /user/username/projects/myproject/node_modules/@types true {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} -Info 19 [00:00:42.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info 20 [00:00:43.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 21 [00:00:44.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 22 [00:00:45.000] Files (3) +Info 20 [00:00:43.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 21 [00:00:44.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 22 [00:00:45.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 23 [00:00:46.000] Files (3) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -158,14 +159,14 @@ Info 22 [00:00:45.000] Files (3) b.ts Matched by default include pattern '**/*' -Info 23 [00:00:46.000] ----------------------------------------------- -Info 24 [00:00:47.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 24 [00:00:48.000] Files (3) +Info 24 [00:00:47.000] ----------------------------------------------- +Info 25 [00:00:48.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 25 [00:00:49.000] Files (3) -Info 24 [00:00:49.000] ----------------------------------------------- -Info 24 [00:00:50.000] Open files: -Info 24 [00:00:51.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 24 [00:00:52.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 25 [00:00:50.000] ----------------------------------------------- +Info 25 [00:00:51.000] Open files: +Info 25 [00:00:52.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 25 [00:00:53.000] Projects: /user/username/projects/myproject/tsconfig.json After request PolledWatches:: @@ -194,11 +195,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 24 [00:00:53.000] response: +Info 25 [00:00:54.000] response: { "responseRequired": false } -Info 25 [00:00:54.000] Add a file +Info 26 [00:00:55.000] Add a file Checking timeout queue length: 0 //// [/user/username/projects/myproject/c.ts] export class a { prop = "hello"; foo() { return this.prop; } } @@ -230,11 +231,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 26 [00:00:57.000] Invoke plugin watches -Info 27 [00:00:58.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 28 [00:00:59.000] Scheduled: /user/username/projects/myproject/tsconfig.json -Info 29 [00:01:00.000] Scheduled: *ensureProjectForOpenFiles* -Info 30 [00:01:01.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 27 [00:00:58.000] Invoke plugin watches +Info 28 [00:00:59.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 29 [00:01:00.000] Scheduled: /user/username/projects/myproject/tsconfig.json +Info 30 [00:01:01.000] Scheduled: *ensureProjectForOpenFiles* +Info 31 [00:01:02.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Before running timeout callbacks PolledWatches:: @@ -263,13 +264,13 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 31 [00:01:02.000] Running: /user/username/projects/myproject/tsconfig.json -Info 32 [00:01:03.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info +Info 32 [00:01:03.000] Running: /user/username/projects/myproject/tsconfig.json +Info 33 [00:01:04.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info Custom myplugin2watchFile: /user/username/projects/myproject/c.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} -Info 33 [00:01:04.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 34 [00:01:05.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 35 [00:01:06.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 36 [00:01:07.000] Files (4) +Info 34 [00:01:05.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 35 [00:01:06.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 36 [00:01:07.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 37 [00:01:08.000] Files (4) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -285,24 +286,24 @@ Info 36 [00:01:07.000] Files (4) c.ts Matched by default include pattern '**/*' -Info 37 [00:01:08.000] ----------------------------------------------- -Info 38 [00:01:09.000] Running: *ensureProjectForOpenFiles* -Info 39 [00:01:10.000] Before ensureProjectForOpenFiles: -Info 40 [00:01:11.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 40 [00:01:12.000] Files (4) - -Info 40 [00:01:13.000] ----------------------------------------------- -Info 40 [00:01:14.000] Open files: -Info 40 [00:01:15.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 40 [00:01:16.000] Projects: /user/username/projects/myproject/tsconfig.json -Info 40 [00:01:17.000] After ensureProjectForOpenFiles: -Info 41 [00:01:18.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 41 [00:01:19.000] Files (4) - -Info 41 [00:01:20.000] ----------------------------------------------- -Info 41 [00:01:21.000] Open files: -Info 41 [00:01:22.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 41 [00:01:23.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 38 [00:01:09.000] ----------------------------------------------- +Info 39 [00:01:10.000] Running: *ensureProjectForOpenFiles* +Info 40 [00:01:11.000] Before ensureProjectForOpenFiles: +Info 41 [00:01:12.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 41 [00:01:13.000] Files (4) + +Info 41 [00:01:14.000] ----------------------------------------------- +Info 41 [00:01:15.000] Open files: +Info 41 [00:01:16.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 41 [00:01:17.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 41 [00:01:18.000] After ensureProjectForOpenFiles: +Info 42 [00:01:19.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 42 [00:01:20.000] Files (4) + +Info 42 [00:01:21.000] ----------------------------------------------- +Info 42 [00:01:22.000] Open files: +Info 42 [00:01:23.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 42 [00:01:24.000] Projects: /user/username/projects/myproject/tsconfig.json After running timeout callbacks PolledWatches:: @@ -333,7 +334,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 41 [00:01:24.000] Change file +Info 42 [00:01:25.000] Change file Checking timeout queue length: 0 //// [/user/username/projects/myproject/b.ts] export class a { prop = "hello"; foo() { return this.prop; } } @@ -367,11 +368,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 42 [00:01:28.000] Invoke plugin watches -Info 43 [00:01:29.000] FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info -Info 44 [00:01:30.000] Scheduled: /user/username/projects/myproject/tsconfig.json -Info 45 [00:01:31.000] Scheduled: *ensureProjectForOpenFiles* -Info 46 [00:01:32.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info +Info 43 [00:01:29.000] Invoke plugin watches +Info 44 [00:01:30.000] FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info +Info 45 [00:01:31.000] Scheduled: /user/username/projects/myproject/tsconfig.json +Info 46 [00:01:32.000] Scheduled: *ensureProjectForOpenFiles* +Info 47 [00:01:33.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info Before running timeout callbacks PolledWatches:: @@ -402,27 +403,27 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 47 [00:01:33.000] Running: /user/username/projects/myproject/tsconfig.json -Info 48 [00:01:34.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 49 [00:01:35.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms -Info 50 [00:01:36.000] Different program with same set of files -Info 51 [00:01:37.000] Running: *ensureProjectForOpenFiles* -Info 52 [00:01:38.000] Before ensureProjectForOpenFiles: -Info 53 [00:01:39.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 53 [00:01:40.000] Files (4) - -Info 53 [00:01:41.000] ----------------------------------------------- -Info 53 [00:01:42.000] Open files: -Info 53 [00:01:43.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 53 [00:01:44.000] Projects: /user/username/projects/myproject/tsconfig.json -Info 53 [00:01:45.000] After ensureProjectForOpenFiles: -Info 54 [00:01:46.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 54 [00:01:47.000] Files (4) - -Info 54 [00:01:48.000] ----------------------------------------------- -Info 54 [00:01:49.000] Open files: -Info 54 [00:01:50.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 54 [00:01:51.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 48 [00:01:34.000] Running: /user/username/projects/myproject/tsconfig.json +Info 49 [00:01:35.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 50 [00:01:36.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info 51 [00:01:37.000] Different program with same set of files +Info 52 [00:01:38.000] Running: *ensureProjectForOpenFiles* +Info 53 [00:01:39.000] Before ensureProjectForOpenFiles: +Info 54 [00:01:40.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 54 [00:01:41.000] Files (4) + +Info 54 [00:01:42.000] ----------------------------------------------- +Info 54 [00:01:43.000] Open files: +Info 54 [00:01:44.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 54 [00:01:45.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 54 [00:01:46.000] After ensureProjectForOpenFiles: +Info 55 [00:01:47.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 55 [00:01:48.000] Files (4) + +Info 55 [00:01:49.000] ----------------------------------------------- +Info 55 [00:01:50.000] Open files: +Info 55 [00:01:51.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 55 [00:01:52.000] Projects: /user/username/projects/myproject/tsconfig.json After running timeout callbacks PolledWatches:: @@ -453,7 +454,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 54 [00:01:52.000] request: +Info 55 [00:01:53.000] request: { "command": "configurePlugin", "arguments": { @@ -495,7 +496,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 55 [00:01:53.000] response: +Info 56 [00:01:54.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":2,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -527,11 +528,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 56 [00:01:54.000] response: +Info 57 [00:01:55.000] response: { "responseRequired": false } -Info 57 [00:01:55.000] request: +Info 58 [00:01:56.000] request: { "command": "configurePlugin", "arguments": { @@ -573,7 +574,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 58 [00:01:56.000] response: +Info 59 [00:01:57.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":3,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -605,11 +606,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 59 [00:01:57.000] response: +Info 60 [00:01:58.000] response: { "responseRequired": false } -Info 60 [00:01:58.000] request: +Info 61 [00:01:59.000] request: { "command": "configurePlugin", "arguments": { @@ -651,7 +652,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 61 [00:01:59.000] response: +Info 62 [00:02:00.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":4,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -683,7 +684,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 62 [00:02:00.000] response: +Info 63 [00:02:01.000] response: { "responseRequired": false } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-allowLocalPluginLoads.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-allowLocalPluginLoads.js index e99d264f15faa..73101bbc073c5 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-allowLocalPluginLoads.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-allowLocalPluginLoads.js @@ -106,7 +106,7 @@ Info 6 [00:00:29.000] Search path: /user/username/projects/myproject Info 7 [00:00:30.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 8 [00:00:31.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 9 [00:00:32.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin2"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin2 from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin2 from /a/pluginprobe1/node_modules Require:: Module myplugin2 created with config: {"name":"myplugin2"} and options: {"watchFactory":"myplugin2"} Custom myplugin2watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin2"} Info 10 [00:00:33.000] Config: /user/username/projects/myproject/tsconfig.json : { @@ -123,23 +123,24 @@ Info 10 [00:00:33.000] Config: /user/username/projects/myproject/tsconfig.json } Info 11 [00:00:34.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin2"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 12 [00:00:35.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +Info 13 [00:00:36.000] Local plugin loading enabled; adding /user/username/projects/myproject to search paths +CustomRequire:: Resolving myplugin from /user/username/projects/myproject/node_modules Require:: Module myplugin created with config: {"name":"myplugin"} and options: {"watchFactory":"myplugin"} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} -Info 13 [00:00:36.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 14 [00:00:37.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Custom watchDirectory: /user/username/projects/myproject true {"watchFactory":"myplugin"} -Info 14 [00:00:37.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 15 [00:00:38.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info +Info 15 [00:00:38.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 16 [00:00:39.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info Custom myplugin2watchFile: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} -Info 16 [00:00:39.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 17 [00:00:40.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info +Info 17 [00:00:40.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 18 [00:00:41.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info Custom myplugin2watchFile: /a/lib/lib.d.ts 500 {"watchFactory":"myplugin2"} -Info 18 [00:00:41.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 19 [00:00:42.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots Custom watchDirectory: /user/username/projects/myproject/node_modules/@types true {"watchFactory":"myplugin"} -Info 19 [00:00:42.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info 20 [00:00:43.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 21 [00:00:44.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 22 [00:00:45.000] Files (3) +Info 20 [00:00:43.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 21 [00:00:44.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 22 [00:00:45.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 23 [00:00:46.000] Files (3) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -152,14 +153,14 @@ Info 22 [00:00:45.000] Files (3) b.ts Matched by default include pattern '**/*' -Info 23 [00:00:46.000] ----------------------------------------------- -Info 24 [00:00:47.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 24 [00:00:48.000] Files (3) +Info 24 [00:00:47.000] ----------------------------------------------- +Info 25 [00:00:48.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 25 [00:00:49.000] Files (3) -Info 24 [00:00:49.000] ----------------------------------------------- -Info 24 [00:00:50.000] Open files: -Info 24 [00:00:51.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 24 [00:00:52.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 25 [00:00:50.000] ----------------------------------------------- +Info 25 [00:00:51.000] Open files: +Info 25 [00:00:52.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 25 [00:00:53.000] Projects: /user/username/projects/myproject/tsconfig.json After request PolledWatches:: @@ -188,11 +189,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 24 [00:00:53.000] response: +Info 25 [00:00:54.000] response: { "responseRequired": false } -Info 25 [00:00:54.000] Add a file +Info 26 [00:00:55.000] Add a file Checking timeout queue length: 0 //// [/user/username/projects/myproject/c.ts] export class a { prop = "hello"; foo() { return this.prop; } } @@ -224,11 +225,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 26 [00:00:57.000] Invoke plugin watches -Info 27 [00:00:58.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 28 [00:00:59.000] Scheduled: /user/username/projects/myproject/tsconfig.json -Info 29 [00:01:00.000] Scheduled: *ensureProjectForOpenFiles* -Info 30 [00:01:01.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 27 [00:00:58.000] Invoke plugin watches +Info 28 [00:00:59.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 29 [00:01:00.000] Scheduled: /user/username/projects/myproject/tsconfig.json +Info 30 [00:01:01.000] Scheduled: *ensureProjectForOpenFiles* +Info 31 [00:01:02.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Before running timeout callbacks PolledWatches:: @@ -257,13 +258,13 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 31 [00:01:02.000] Running: /user/username/projects/myproject/tsconfig.json -Info 32 [00:01:03.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info +Info 32 [00:01:03.000] Running: /user/username/projects/myproject/tsconfig.json +Info 33 [00:01:04.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info Custom myplugin2watchFile: /user/username/projects/myproject/c.ts 500 {"watchFactory":"myplugin2"} -Info 33 [00:01:04.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 34 [00:01:05.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 35 [00:01:06.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 36 [00:01:07.000] Files (4) +Info 34 [00:01:05.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 35 [00:01:06.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 36 [00:01:07.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 37 [00:01:08.000] Files (4) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -279,24 +280,24 @@ Info 36 [00:01:07.000] Files (4) c.ts Matched by default include pattern '**/*' -Info 37 [00:01:08.000] ----------------------------------------------- -Info 38 [00:01:09.000] Running: *ensureProjectForOpenFiles* -Info 39 [00:01:10.000] Before ensureProjectForOpenFiles: -Info 40 [00:01:11.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 40 [00:01:12.000] Files (4) - -Info 40 [00:01:13.000] ----------------------------------------------- -Info 40 [00:01:14.000] Open files: -Info 40 [00:01:15.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 40 [00:01:16.000] Projects: /user/username/projects/myproject/tsconfig.json -Info 40 [00:01:17.000] After ensureProjectForOpenFiles: -Info 41 [00:01:18.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 41 [00:01:19.000] Files (4) - -Info 41 [00:01:20.000] ----------------------------------------------- -Info 41 [00:01:21.000] Open files: -Info 41 [00:01:22.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 41 [00:01:23.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 38 [00:01:09.000] ----------------------------------------------- +Info 39 [00:01:10.000] Running: *ensureProjectForOpenFiles* +Info 40 [00:01:11.000] Before ensureProjectForOpenFiles: +Info 41 [00:01:12.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 41 [00:01:13.000] Files (4) + +Info 41 [00:01:14.000] ----------------------------------------------- +Info 41 [00:01:15.000] Open files: +Info 41 [00:01:16.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 41 [00:01:17.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 41 [00:01:18.000] After ensureProjectForOpenFiles: +Info 42 [00:01:19.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 42 [00:01:20.000] Files (4) + +Info 42 [00:01:21.000] ----------------------------------------------- +Info 42 [00:01:22.000] Open files: +Info 42 [00:01:23.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 42 [00:01:24.000] Projects: /user/username/projects/myproject/tsconfig.json After running timeout callbacks PolledWatches:: @@ -327,7 +328,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 41 [00:01:24.000] Change file +Info 42 [00:01:25.000] Change file Checking timeout queue length: 0 //// [/user/username/projects/myproject/b.ts] export class a { prop = "hello"; foo() { return this.prop; } } @@ -361,11 +362,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 42 [00:01:28.000] Invoke plugin watches -Info 43 [00:01:29.000] FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info -Info 44 [00:01:30.000] Scheduled: /user/username/projects/myproject/tsconfig.json -Info 45 [00:01:31.000] Scheduled: *ensureProjectForOpenFiles* -Info 46 [00:01:32.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info +Info 43 [00:01:29.000] Invoke plugin watches +Info 44 [00:01:30.000] FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info +Info 45 [00:01:31.000] Scheduled: /user/username/projects/myproject/tsconfig.json +Info 46 [00:01:32.000] Scheduled: *ensureProjectForOpenFiles* +Info 47 [00:01:33.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info Before running timeout callbacks PolledWatches:: @@ -396,27 +397,27 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 47 [00:01:33.000] Running: /user/username/projects/myproject/tsconfig.json -Info 48 [00:01:34.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 49 [00:01:35.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms -Info 50 [00:01:36.000] Different program with same set of files -Info 51 [00:01:37.000] Running: *ensureProjectForOpenFiles* -Info 52 [00:01:38.000] Before ensureProjectForOpenFiles: -Info 53 [00:01:39.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 53 [00:01:40.000] Files (4) - -Info 53 [00:01:41.000] ----------------------------------------------- -Info 53 [00:01:42.000] Open files: -Info 53 [00:01:43.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 53 [00:01:44.000] Projects: /user/username/projects/myproject/tsconfig.json -Info 53 [00:01:45.000] After ensureProjectForOpenFiles: -Info 54 [00:01:46.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 54 [00:01:47.000] Files (4) - -Info 54 [00:01:48.000] ----------------------------------------------- -Info 54 [00:01:49.000] Open files: -Info 54 [00:01:50.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 54 [00:01:51.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 48 [00:01:34.000] Running: /user/username/projects/myproject/tsconfig.json +Info 49 [00:01:35.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 50 [00:01:36.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info 51 [00:01:37.000] Different program with same set of files +Info 52 [00:01:38.000] Running: *ensureProjectForOpenFiles* +Info 53 [00:01:39.000] Before ensureProjectForOpenFiles: +Info 54 [00:01:40.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 54 [00:01:41.000] Files (4) + +Info 54 [00:01:42.000] ----------------------------------------------- +Info 54 [00:01:43.000] Open files: +Info 54 [00:01:44.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 54 [00:01:45.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 54 [00:01:46.000] After ensureProjectForOpenFiles: +Info 55 [00:01:47.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 55 [00:01:48.000] Files (4) + +Info 55 [00:01:49.000] ----------------------------------------------- +Info 55 [00:01:50.000] Open files: +Info 55 [00:01:51.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 55 [00:01:52.000] Projects: /user/username/projects/myproject/tsconfig.json After running timeout callbacks PolledWatches:: @@ -447,7 +448,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 54 [00:01:52.000] request: +Info 55 [00:01:53.000] request: { "command": "configurePlugin", "arguments": { @@ -490,7 +491,7 @@ WatchedFiles:: WatchedDirectories:Recursive:: WatchedDirectories:: Custom:: onConfigurationChanged:: {"extraData":"myData"} -Info 55 [00:01:53.000] response: +Info 56 [00:01:54.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":2,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -522,11 +523,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 56 [00:01:54.000] response: +Info 57 [00:01:55.000] response: { "responseRequired": false } -Info 57 [00:01:55.000] request: +Info 58 [00:01:56.000] request: { "command": "configurePlugin", "arguments": { @@ -569,7 +570,7 @@ WatchedFiles:: WatchedDirectories:Recursive:: WatchedDirectories:: Custom:: myplugin2onConfigurationChanged:: {"extraData":"myData"} -Info 58 [00:01:56.000] response: +Info 59 [00:01:57.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":3,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -601,11 +602,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 59 [00:01:57.000] response: +Info 60 [00:01:58.000] response: { "responseRequired": false } -Info 60 [00:01:58.000] request: +Info 61 [00:01:59.000] request: { "command": "configurePlugin", "arguments": { @@ -647,7 +648,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 61 [00:01:59.000] response: +Info 62 [00:02:00.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":4,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -679,7 +680,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 62 [00:02:00.000] response: +Info 63 [00:02:01.000] response: { "responseRequired": false } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-object.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-object.js index f252724aa67b8..b3458f10ed255 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-object.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-object.js @@ -109,7 +109,7 @@ Info 6 [00:00:29.000] Search path: /user/username/projects/myproject Info 7 [00:00:30.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 8 [00:00:31.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 9 [00:00:32.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin2 from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin2 from /a/pluginprobe1/node_modules Require:: Module myplugin2 created with config: {"name":"myplugin2","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Custom myplugin2watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Info 10 [00:00:33.000] Config: /user/username/projects/myproject/tsconfig.json : { @@ -129,7 +129,7 @@ Info 10 [00:00:33.000] Config: /user/username/projects/myproject/tsconfig.json } Info 11 [00:00:34.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 12 [00:00:35.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Info 13 [00:00:36.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginOverride-allowLocalPluginLoads-object.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginOverride-allowLocalPluginLoads-object.js index 144d59e9e2ca3..df5c2499c5a5d 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginOverride-allowLocalPluginLoads-object.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginOverride-allowLocalPluginLoads-object.js @@ -217,7 +217,7 @@ Info 12 [00:00:35.000] Search path: /user/username/projects/myproject Info 13 [00:00:36.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 14 [00:00:37.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 15 [00:00:38.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin2 from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin2 from /a/pluginprobe1/node_modules Require:: Module myplugin2 created with config: {"name":"myplugin2","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Custom myplugin2watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Info 16 [00:00:39.000] Config: /user/username/projects/myproject/tsconfig.json : { @@ -237,23 +237,24 @@ Info 16 [00:00:39.000] Config: /user/username/projects/myproject/tsconfig.json } Info 17 [00:00:40.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 18 [00:00:41.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +Info 19 [00:00:42.000] Local plugin loading enabled; adding /user/username/projects/myproject to search paths +CustomRequire:: Resolving myplugin from /user/username/projects/myproject/node_modules Require:: Module myplugin created with config: {"name":"myplugin","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} -Info 19 [00:00:42.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 20 [00:00:43.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Custom watchDirectory: /user/username/projects/myproject true {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} -Info 20 [00:00:43.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 21 [00:00:44.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info +Info 21 [00:00:44.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 22 [00:00:45.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info Custom myplugin2watchFile: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} -Info 22 [00:00:45.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 23 [00:00:46.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info +Info 23 [00:00:46.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 24 [00:00:47.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info Custom myplugin2watchFile: /a/lib/lib.d.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} -Info 24 [00:00:47.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 25 [00:00:48.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots Custom watchDirectory: /user/username/projects/myproject/node_modules/@types true {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} -Info 25 [00:00:48.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info 26 [00:00:49.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 27 [00:00:50.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 28 [00:00:51.000] Files (3) +Info 26 [00:00:49.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 27 [00:00:50.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 28 [00:00:51.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 29 [00:00:52.000] Files (3) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -266,14 +267,14 @@ Info 28 [00:00:51.000] Files (3) b.ts Matched by default include pattern '**/*' -Info 29 [00:00:52.000] ----------------------------------------------- -Info 30 [00:00:53.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 30 [00:00:54.000] Files (3) +Info 30 [00:00:53.000] ----------------------------------------------- +Info 31 [00:00:54.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 31 [00:00:55.000] Files (3) -Info 30 [00:00:55.000] ----------------------------------------------- -Info 30 [00:00:56.000] Open files: -Info 30 [00:00:57.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 30 [00:00:58.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 31 [00:00:56.000] ----------------------------------------------- +Info 31 [00:00:57.000] Open files: +Info 31 [00:00:58.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 31 [00:00:59.000] Projects: /user/username/projects/myproject/tsconfig.json After request PolledWatches:: @@ -302,11 +303,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 30 [00:00:59.000] response: +Info 31 [00:01:00.000] response: { "responseRequired": false } -Info 31 [00:01:00.000] Add a file +Info 32 [00:01:01.000] Add a file Checking timeout queue length: 0 //// [/user/username/projects/myproject/c.ts] export class a { prop = "hello"; foo() { return this.prop; } } @@ -338,11 +339,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 32 [00:01:03.000] Invoke plugin watches -Info 33 [00:01:04.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 34 [00:01:05.000] Scheduled: /user/username/projects/myproject/tsconfig.json -Info 35 [00:01:06.000] Scheduled: *ensureProjectForOpenFiles* -Info 36 [00:01:07.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 33 [00:01:04.000] Invoke plugin watches +Info 34 [00:01:05.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 35 [00:01:06.000] Scheduled: /user/username/projects/myproject/tsconfig.json +Info 36 [00:01:07.000] Scheduled: *ensureProjectForOpenFiles* +Info 37 [00:01:08.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Before running timeout callbacks PolledWatches:: @@ -371,13 +372,13 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 37 [00:01:08.000] Running: /user/username/projects/myproject/tsconfig.json -Info 38 [00:01:09.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info +Info 38 [00:01:09.000] Running: /user/username/projects/myproject/tsconfig.json +Info 39 [00:01:10.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info Custom myplugin2watchFile: /user/username/projects/myproject/c.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} -Info 39 [00:01:10.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 40 [00:01:11.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 41 [00:01:12.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 42 [00:01:13.000] Files (4) +Info 40 [00:01:11.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 41 [00:01:12.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 42 [00:01:13.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 43 [00:01:14.000] Files (4) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -393,24 +394,24 @@ Info 42 [00:01:13.000] Files (4) c.ts Matched by default include pattern '**/*' -Info 43 [00:01:14.000] ----------------------------------------------- -Info 44 [00:01:15.000] Running: *ensureProjectForOpenFiles* -Info 45 [00:01:16.000] Before ensureProjectForOpenFiles: -Info 46 [00:01:17.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 46 [00:01:18.000] Files (4) - -Info 46 [00:01:19.000] ----------------------------------------------- -Info 46 [00:01:20.000] Open files: -Info 46 [00:01:21.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 46 [00:01:22.000] Projects: /user/username/projects/myproject/tsconfig.json -Info 46 [00:01:23.000] After ensureProjectForOpenFiles: -Info 47 [00:01:24.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 47 [00:01:25.000] Files (4) - -Info 47 [00:01:26.000] ----------------------------------------------- -Info 47 [00:01:27.000] Open files: -Info 47 [00:01:28.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 47 [00:01:29.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 44 [00:01:15.000] ----------------------------------------------- +Info 45 [00:01:16.000] Running: *ensureProjectForOpenFiles* +Info 46 [00:01:17.000] Before ensureProjectForOpenFiles: +Info 47 [00:01:18.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 47 [00:01:19.000] Files (4) + +Info 47 [00:01:20.000] ----------------------------------------------- +Info 47 [00:01:21.000] Open files: +Info 47 [00:01:22.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 47 [00:01:23.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 47 [00:01:24.000] After ensureProjectForOpenFiles: +Info 48 [00:01:25.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 48 [00:01:26.000] Files (4) + +Info 48 [00:01:27.000] ----------------------------------------------- +Info 48 [00:01:28.000] Open files: +Info 48 [00:01:29.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 48 [00:01:30.000] Projects: /user/username/projects/myproject/tsconfig.json After running timeout callbacks PolledWatches:: @@ -441,7 +442,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 47 [00:01:30.000] Change file +Info 48 [00:01:31.000] Change file Checking timeout queue length: 0 //// [/user/username/projects/myproject/b.ts] export class a { prop = "hello"; foo() { return this.prop; } } @@ -475,11 +476,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 48 [00:01:34.000] Invoke plugin watches -Info 49 [00:01:35.000] FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info -Info 50 [00:01:36.000] Scheduled: /user/username/projects/myproject/tsconfig.json -Info 51 [00:01:37.000] Scheduled: *ensureProjectForOpenFiles* -Info 52 [00:01:38.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info +Info 49 [00:01:35.000] Invoke plugin watches +Info 50 [00:01:36.000] FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info +Info 51 [00:01:37.000] Scheduled: /user/username/projects/myproject/tsconfig.json +Info 52 [00:01:38.000] Scheduled: *ensureProjectForOpenFiles* +Info 53 [00:01:39.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} WatchType: Closed Script info Before running timeout callbacks PolledWatches:: @@ -510,27 +511,27 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 53 [00:01:39.000] Running: /user/username/projects/myproject/tsconfig.json -Info 54 [00:01:40.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 55 [00:01:41.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms -Info 56 [00:01:42.000] Different program with same set of files -Info 57 [00:01:43.000] Running: *ensureProjectForOpenFiles* -Info 58 [00:01:44.000] Before ensureProjectForOpenFiles: -Info 59 [00:01:45.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 59 [00:01:46.000] Files (4) - -Info 59 [00:01:47.000] ----------------------------------------------- -Info 59 [00:01:48.000] Open files: -Info 59 [00:01:49.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 59 [00:01:50.000] Projects: /user/username/projects/myproject/tsconfig.json -Info 59 [00:01:51.000] After ensureProjectForOpenFiles: -Info 60 [00:01:52.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 60 [00:01:53.000] Files (4) - -Info 60 [00:01:54.000] ----------------------------------------------- -Info 60 [00:01:55.000] Open files: -Info 60 [00:01:56.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 60 [00:01:57.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 54 [00:01:40.000] Running: /user/username/projects/myproject/tsconfig.json +Info 55 [00:01:41.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 56 [00:01:42.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info 57 [00:01:43.000] Different program with same set of files +Info 58 [00:01:44.000] Running: *ensureProjectForOpenFiles* +Info 59 [00:01:45.000] Before ensureProjectForOpenFiles: +Info 60 [00:01:46.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 60 [00:01:47.000] Files (4) + +Info 60 [00:01:48.000] ----------------------------------------------- +Info 60 [00:01:49.000] Open files: +Info 60 [00:01:50.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 60 [00:01:51.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 60 [00:01:52.000] After ensureProjectForOpenFiles: +Info 61 [00:01:53.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 61 [00:01:54.000] Files (4) + +Info 61 [00:01:55.000] ----------------------------------------------- +Info 61 [00:01:56.000] Open files: +Info 61 [00:01:57.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 61 [00:01:58.000] Projects: /user/username/projects/myproject/tsconfig.json After running timeout callbacks PolledWatches:: @@ -561,7 +562,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 60 [00:01:58.000] request: +Info 61 [00:01:59.000] request: { "command": "configurePlugin", "arguments": { @@ -603,7 +604,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 61 [00:01:59.000] response: +Info 62 [00:02:00.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":4,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -635,11 +636,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 62 [00:02:00.000] response: +Info 63 [00:02:01.000] response: { "responseRequired": false } -Info 63 [00:02:01.000] request: +Info 64 [00:02:02.000] request: { "command": "configurePlugin", "arguments": { @@ -681,7 +682,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 64 [00:02:02.000] response: +Info 65 [00:02:03.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":5,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -713,11 +714,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 65 [00:02:03.000] response: +Info 66 [00:02:04.000] response: { "responseRequired": false } -Info 66 [00:02:04.000] request: +Info 67 [00:02:05.000] request: { "command": "configurePlugin", "arguments": { @@ -759,7 +760,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 67 [00:02:05.000] response: +Info 68 [00:02:06.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":6,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -791,7 +792,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 68 [00:02:06.000] response: +Info 69 [00:02:07.000] response: { "responseRequired": false } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginOverride-object.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginOverride-object.js index 144d59e9e2ca3..fe6e9777a99a2 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginOverride-object.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginOverride-object.js @@ -217,7 +217,7 @@ Info 12 [00:00:35.000] Search path: /user/username/projects/myproject Info 13 [00:00:36.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 14 [00:00:37.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 15 [00:00:38.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin2 from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin2 from /a/pluginprobe1/node_modules Require:: Module myplugin2 created with config: {"name":"myplugin2","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Custom myplugin2watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Info 16 [00:00:39.000] Config: /user/username/projects/myproject/tsconfig.json : { @@ -237,7 +237,7 @@ Info 16 [00:00:39.000] Config: /user/username/projects/myproject/tsconfig.json } Info 17 [00:00:40.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin2","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 18 [00:00:41.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Info 19 [00:00:42.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginoverride-allowLocalPluginLoads.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginoverride-allowLocalPluginLoads.js index 07f10ec9405a6..16a9edb829c5d 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginoverride-allowLocalPluginLoads.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginoverride-allowLocalPluginLoads.js @@ -214,7 +214,7 @@ Info 12 [00:00:35.000] Search path: /user/username/projects/myproject Info 13 [00:00:36.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 14 [00:00:37.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 15 [00:00:38.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin2"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin2 from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin2 from /a/pluginprobe1/node_modules Require:: Module myplugin2 created with config: {"name":"myplugin2"} and options: {"watchFactory":"myplugin2"} Custom myplugin2watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin2"} Info 16 [00:00:39.000] Config: /user/username/projects/myproject/tsconfig.json : { @@ -231,23 +231,24 @@ Info 16 [00:00:39.000] Config: /user/username/projects/myproject/tsconfig.json } Info 17 [00:00:40.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin2"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 18 [00:00:41.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +Info 19 [00:00:42.000] Local plugin loading enabled; adding /user/username/projects/myproject to search paths +CustomRequire:: Resolving myplugin from /user/username/projects/myproject/node_modules Require:: Module myplugin created with config: {"name":"myplugin"} and options: {"watchFactory":"myplugin"} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} -Info 19 [00:00:42.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 20 [00:00:43.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Custom watchDirectory: /user/username/projects/myproject true {"watchFactory":"myplugin"} -Info 20 [00:00:43.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 21 [00:00:44.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info +Info 21 [00:00:44.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 22 [00:00:45.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info Custom myplugin2watchFile: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} -Info 22 [00:00:45.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 23 [00:00:46.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info +Info 23 [00:00:46.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 24 [00:00:47.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info Custom myplugin2watchFile: /a/lib/lib.d.ts 500 {"watchFactory":"myplugin2"} -Info 24 [00:00:47.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 25 [00:00:48.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots Custom watchDirectory: /user/username/projects/myproject/node_modules/@types true {"watchFactory":"myplugin"} -Info 25 [00:00:48.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info 26 [00:00:49.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 27 [00:00:50.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 28 [00:00:51.000] Files (3) +Info 26 [00:00:49.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 27 [00:00:50.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 28 [00:00:51.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 29 [00:00:52.000] Files (3) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -260,14 +261,14 @@ Info 28 [00:00:51.000] Files (3) b.ts Matched by default include pattern '**/*' -Info 29 [00:00:52.000] ----------------------------------------------- -Info 30 [00:00:53.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 30 [00:00:54.000] Files (3) +Info 30 [00:00:53.000] ----------------------------------------------- +Info 31 [00:00:54.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 31 [00:00:55.000] Files (3) -Info 30 [00:00:55.000] ----------------------------------------------- -Info 30 [00:00:56.000] Open files: -Info 30 [00:00:57.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 30 [00:00:58.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 31 [00:00:56.000] ----------------------------------------------- +Info 31 [00:00:57.000] Open files: +Info 31 [00:00:58.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 31 [00:00:59.000] Projects: /user/username/projects/myproject/tsconfig.json After request PolledWatches:: @@ -296,11 +297,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 30 [00:00:59.000] response: +Info 31 [00:01:00.000] response: { "responseRequired": false } -Info 31 [00:01:00.000] Add a file +Info 32 [00:01:01.000] Add a file Checking timeout queue length: 0 //// [/user/username/projects/myproject/c.ts] export class a { prop = "hello"; foo() { return this.prop; } } @@ -332,11 +333,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 32 [00:01:03.000] Invoke plugin watches -Info 33 [00:01:04.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 34 [00:01:05.000] Scheduled: /user/username/projects/myproject/tsconfig.json -Info 35 [00:01:06.000] Scheduled: *ensureProjectForOpenFiles* -Info 36 [00:01:07.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 33 [00:01:04.000] Invoke plugin watches +Info 34 [00:01:05.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 35 [00:01:06.000] Scheduled: /user/username/projects/myproject/tsconfig.json +Info 36 [00:01:07.000] Scheduled: *ensureProjectForOpenFiles* +Info 37 [00:01:08.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Before running timeout callbacks PolledWatches:: @@ -365,13 +366,13 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 37 [00:01:08.000] Running: /user/username/projects/myproject/tsconfig.json -Info 38 [00:01:09.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info +Info 38 [00:01:09.000] Running: /user/username/projects/myproject/tsconfig.json +Info 39 [00:01:10.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info Custom myplugin2watchFile: /user/username/projects/myproject/c.ts 500 {"watchFactory":"myplugin2"} -Info 39 [00:01:10.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 40 [00:01:11.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 41 [00:01:12.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 42 [00:01:13.000] Files (4) +Info 40 [00:01:11.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 41 [00:01:12.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 42 [00:01:13.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 43 [00:01:14.000] Files (4) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -387,24 +388,24 @@ Info 42 [00:01:13.000] Files (4) c.ts Matched by default include pattern '**/*' -Info 43 [00:01:14.000] ----------------------------------------------- -Info 44 [00:01:15.000] Running: *ensureProjectForOpenFiles* -Info 45 [00:01:16.000] Before ensureProjectForOpenFiles: -Info 46 [00:01:17.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 46 [00:01:18.000] Files (4) - -Info 46 [00:01:19.000] ----------------------------------------------- -Info 46 [00:01:20.000] Open files: -Info 46 [00:01:21.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 46 [00:01:22.000] Projects: /user/username/projects/myproject/tsconfig.json -Info 46 [00:01:23.000] After ensureProjectForOpenFiles: -Info 47 [00:01:24.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 47 [00:01:25.000] Files (4) - -Info 47 [00:01:26.000] ----------------------------------------------- -Info 47 [00:01:27.000] Open files: -Info 47 [00:01:28.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 47 [00:01:29.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 44 [00:01:15.000] ----------------------------------------------- +Info 45 [00:01:16.000] Running: *ensureProjectForOpenFiles* +Info 46 [00:01:17.000] Before ensureProjectForOpenFiles: +Info 47 [00:01:18.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 47 [00:01:19.000] Files (4) + +Info 47 [00:01:20.000] ----------------------------------------------- +Info 47 [00:01:21.000] Open files: +Info 47 [00:01:22.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 47 [00:01:23.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 47 [00:01:24.000] After ensureProjectForOpenFiles: +Info 48 [00:01:25.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 48 [00:01:26.000] Files (4) + +Info 48 [00:01:27.000] ----------------------------------------------- +Info 48 [00:01:28.000] Open files: +Info 48 [00:01:29.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 48 [00:01:30.000] Projects: /user/username/projects/myproject/tsconfig.json After running timeout callbacks PolledWatches:: @@ -435,7 +436,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 47 [00:01:30.000] Change file +Info 48 [00:01:31.000] Change file Checking timeout queue length: 0 //// [/user/username/projects/myproject/b.ts] export class a { prop = "hello"; foo() { return this.prop; } } @@ -469,11 +470,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 48 [00:01:34.000] Invoke plugin watches -Info 49 [00:01:35.000] FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info -Info 50 [00:01:36.000] Scheduled: /user/username/projects/myproject/tsconfig.json -Info 51 [00:01:37.000] Scheduled: *ensureProjectForOpenFiles* -Info 52 [00:01:38.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info +Info 49 [00:01:35.000] Invoke plugin watches +Info 50 [00:01:36.000] FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info +Info 51 [00:01:37.000] Scheduled: /user/username/projects/myproject/tsconfig.json +Info 52 [00:01:38.000] Scheduled: *ensureProjectForOpenFiles* +Info 53 [00:01:39.000] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 500 {"watchFactory":"myplugin2"} WatchType: Closed Script info Before running timeout callbacks PolledWatches:: @@ -504,27 +505,27 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 53 [00:01:39.000] Running: /user/username/projects/myproject/tsconfig.json -Info 54 [00:01:40.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 55 [00:01:41.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms -Info 56 [00:01:42.000] Different program with same set of files -Info 57 [00:01:43.000] Running: *ensureProjectForOpenFiles* -Info 58 [00:01:44.000] Before ensureProjectForOpenFiles: -Info 59 [00:01:45.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 59 [00:01:46.000] Files (4) - -Info 59 [00:01:47.000] ----------------------------------------------- -Info 59 [00:01:48.000] Open files: -Info 59 [00:01:49.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 59 [00:01:50.000] Projects: /user/username/projects/myproject/tsconfig.json -Info 59 [00:01:51.000] After ensureProjectForOpenFiles: -Info 60 [00:01:52.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 60 [00:01:53.000] Files (4) - -Info 60 [00:01:54.000] ----------------------------------------------- -Info 60 [00:01:55.000] Open files: -Info 60 [00:01:56.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 60 [00:01:57.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 54 [00:01:40.000] Running: /user/username/projects/myproject/tsconfig.json +Info 55 [00:01:41.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 56 [00:01:42.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info 57 [00:01:43.000] Different program with same set of files +Info 58 [00:01:44.000] Running: *ensureProjectForOpenFiles* +Info 59 [00:01:45.000] Before ensureProjectForOpenFiles: +Info 60 [00:01:46.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 60 [00:01:47.000] Files (4) + +Info 60 [00:01:48.000] ----------------------------------------------- +Info 60 [00:01:49.000] Open files: +Info 60 [00:01:50.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 60 [00:01:51.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 60 [00:01:52.000] After ensureProjectForOpenFiles: +Info 61 [00:01:53.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 61 [00:01:54.000] Files (4) + +Info 61 [00:01:55.000] ----------------------------------------------- +Info 61 [00:01:56.000] Open files: +Info 61 [00:01:57.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 61 [00:01:58.000] Projects: /user/username/projects/myproject/tsconfig.json After running timeout callbacks PolledWatches:: @@ -555,7 +556,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 60 [00:01:58.000] request: +Info 61 [00:01:59.000] request: { "command": "configurePlugin", "arguments": { @@ -598,7 +599,7 @@ WatchedFiles:: WatchedDirectories:Recursive:: WatchedDirectories:: Custom:: onConfigurationChanged:: {"extraData":"myData"} -Info 61 [00:01:59.000] response: +Info 62 [00:02:00.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":4,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -630,11 +631,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 62 [00:02:00.000] response: +Info 63 [00:02:01.000] response: { "responseRequired": false } -Info 63 [00:02:01.000] request: +Info 64 [00:02:02.000] request: { "command": "configurePlugin", "arguments": { @@ -677,7 +678,7 @@ WatchedFiles:: WatchedDirectories:Recursive:: WatchedDirectories:: Custom:: myplugin2onConfigurationChanged:: {"extraData":"myData"} -Info 64 [00:02:02.000] response: +Info 65 [00:02:03.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":5,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -709,11 +710,11 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 65 [00:02:03.000] response: +Info 66 [00:02:04.000] response: { "responseRequired": false } -Info 66 [00:02:04.000] request: +Info 67 [00:02:05.000] request: { "command": "configurePlugin", "arguments": { @@ -755,7 +756,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 67 [00:02:05.000] response: +Info 68 [00:02:06.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":6,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -787,7 +788,7 @@ WatchedFiles:: {"pollingInterval":500,"options":{"watchFactory":"myplugin2"}} WatchedDirectories:Recursive:: WatchedDirectories:: -Info 68 [00:02:06.000] response: +Info 69 [00:02:07.000] response: { "responseRequired": false } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginoverride.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginoverride.js index 07f10ec9405a6..c8193b44cc2a3 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginoverride.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host-with-pluginoverride.js @@ -214,7 +214,7 @@ Info 12 [00:00:35.000] Search path: /user/username/projects/myproject Info 13 [00:00:36.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 14 [00:00:37.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 15 [00:00:38.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin2"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin2 from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin2 from /a/pluginprobe1/node_modules Require:: Module myplugin2 created with config: {"name":"myplugin2"} and options: {"watchFactory":"myplugin2"} Custom myplugin2watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin2"} Info 16 [00:00:39.000] Config: /user/username/projects/myproject/tsconfig.json : { @@ -231,7 +231,7 @@ Info 16 [00:00:39.000] Config: /user/username/projects/myproject/tsconfig.json } Info 17 [00:00:40.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin2"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 18 [00:00:41.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin"} and options: {"watchFactory":"myplugin"} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Info 19 [00:00:42.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host.js index e99d264f15faa..6eb962e36ab6d 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-as-well-as-configuration-of-host.js @@ -106,7 +106,7 @@ Info 6 [00:00:29.000] Search path: /user/username/projects/myproject Info 7 [00:00:30.000] For info: /user/username/projects/myproject/a.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info 8 [00:00:31.000] Creating configuration project /user/username/projects/myproject/tsconfig.json Info 9 [00:00:32.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin2"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin2 from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin2 from /a/pluginprobe1/node_modules Require:: Module myplugin2 created with config: {"name":"myplugin2"} and options: {"watchFactory":"myplugin2"} Custom myplugin2watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin2"} Info 10 [00:00:33.000] Config: /user/username/projects/myproject/tsconfig.json : { @@ -123,7 +123,7 @@ Info 10 [00:00:33.000] Config: /user/username/projects/myproject/tsconfig.json } Info 11 [00:00:34.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin2"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 12 [00:00:35.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin"} and options: {"watchFactory":"myplugin"} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Info 13 [00:00:36.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-allowLocalPluginLoads-object.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-allowLocalPluginLoads-object.js index afe421ef1493d..3f389f2d13805 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-allowLocalPluginLoads-object.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-allowLocalPluginLoads-object.js @@ -64,21 +64,22 @@ Info 6 [00:00:29.000] Config: /user/username/projects/myproject/tsconfig.json } Info 7 [00:00:30.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 8 [00:00:31.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +Info 9 [00:00:32.000] Local plugin loading enabled; adding /user/username/projects/myproject to search paths +CustomRequire:: Resolving myplugin from /user/username/projects/myproject/node_modules Require:: Module myplugin created with config: {"name":"myplugin","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} -Info 9 [00:00:32.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 10 [00:00:33.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Custom watchDirectory: /user/username/projects/myproject true {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} -Info 10 [00:00:33.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 11 [00:00:34.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 undefined WatchType: Closed Script info -Info 12 [00:00:35.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 13 [00:00:36.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info -Info 14 [00:00:37.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 11 [00:00:34.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 12 [00:00:35.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 undefined WatchType: Closed Script info +Info 13 [00:00:36.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 14 [00:00:37.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info 15 [00:00:38.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots Custom watchDirectory: /user/username/projects/myproject/node_modules/@types true {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} -Info 15 [00:00:38.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info 16 [00:00:39.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 17 [00:00:40.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 18 [00:00:41.000] Files (3) +Info 16 [00:00:39.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 17 [00:00:40.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 18 [00:00:41.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 19 [00:00:42.000] Files (3) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -91,14 +92,14 @@ Info 18 [00:00:41.000] Files (3) b.ts Matched by default include pattern '**/*' -Info 19 [00:00:42.000] ----------------------------------------------- -Info 20 [00:00:43.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 20 [00:00:44.000] Files (3) +Info 20 [00:00:43.000] ----------------------------------------------- +Info 21 [00:00:44.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 21 [00:00:45.000] Files (3) -Info 20 [00:00:45.000] ----------------------------------------------- -Info 20 [00:00:46.000] Open files: -Info 20 [00:00:47.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 20 [00:00:48.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 21 [00:00:46.000] ----------------------------------------------- +Info 21 [00:00:47.000] Open files: +Info 21 [00:00:48.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 21 [00:00:49.000] Projects: /user/username/projects/myproject/tsconfig.json After request PolledWatches:: @@ -122,11 +123,11 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 20 [00:00:49.000] response: +Info 21 [00:00:50.000] response: { "responseRequired": false } -Info 21 [00:00:50.000] Add a file +Info 22 [00:00:51.000] Add a file Checking timeout queue length: 0 //// [/user/username/projects/myproject/c.ts] export class a { prop = "hello"; foo() { return this.prop; } } @@ -153,11 +154,11 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 22 [00:00:53.000] Invoke plugin watches -Info 23 [00:00:54.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 24 [00:00:55.000] Scheduled: /user/username/projects/myproject/tsconfig.json -Info 25 [00:00:56.000] Scheduled: *ensureProjectForOpenFiles* -Info 26 [00:00:57.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 23 [00:00:54.000] Invoke plugin watches +Info 24 [00:00:55.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 25 [00:00:56.000] Scheduled: /user/username/projects/myproject/tsconfig.json +Info 26 [00:00:57.000] Scheduled: *ensureProjectForOpenFiles* +Info 27 [00:00:58.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Before running timeout callbacks PolledWatches:: @@ -181,12 +182,12 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 27 [00:00:58.000] Running: /user/username/projects/myproject/tsconfig.json -Info 28 [00:00:59.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 undefined WatchType: Closed Script info -Info 29 [00:01:00.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 30 [00:01:01.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 31 [00:01:02.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 32 [00:01:03.000] Files (4) +Info 28 [00:00:59.000] Running: /user/username/projects/myproject/tsconfig.json +Info 29 [00:01:00.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 undefined WatchType: Closed Script info +Info 30 [00:01:01.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 31 [00:01:02.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 32 [00:01:03.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 33 [00:01:04.000] Files (4) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -202,24 +203,24 @@ Info 32 [00:01:03.000] Files (4) c.ts Matched by default include pattern '**/*' -Info 33 [00:01:04.000] ----------------------------------------------- -Info 34 [00:01:05.000] Running: *ensureProjectForOpenFiles* -Info 35 [00:01:06.000] Before ensureProjectForOpenFiles: -Info 36 [00:01:07.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 36 [00:01:08.000] Files (4) - -Info 36 [00:01:09.000] ----------------------------------------------- -Info 36 [00:01:10.000] Open files: -Info 36 [00:01:11.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 36 [00:01:12.000] Projects: /user/username/projects/myproject/tsconfig.json -Info 36 [00:01:13.000] After ensureProjectForOpenFiles: -Info 37 [00:01:14.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 37 [00:01:15.000] Files (4) - -Info 37 [00:01:16.000] ----------------------------------------------- -Info 37 [00:01:17.000] Open files: -Info 37 [00:01:18.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 37 [00:01:19.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 34 [00:01:05.000] ----------------------------------------------- +Info 35 [00:01:06.000] Running: *ensureProjectForOpenFiles* +Info 36 [00:01:07.000] Before ensureProjectForOpenFiles: +Info 37 [00:01:08.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 37 [00:01:09.000] Files (4) + +Info 37 [00:01:10.000] ----------------------------------------------- +Info 37 [00:01:11.000] Open files: +Info 37 [00:01:12.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 37 [00:01:13.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 37 [00:01:14.000] After ensureProjectForOpenFiles: +Info 38 [00:01:15.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 38 [00:01:16.000] Files (4) + +Info 38 [00:01:17.000] ----------------------------------------------- +Info 38 [00:01:18.000] Open files: +Info 38 [00:01:19.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 38 [00:01:20.000] Projects: /user/username/projects/myproject/tsconfig.json After running timeout callbacks PolledWatches:: @@ -245,7 +246,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 37 [00:01:20.000] request: +Info 38 [00:01:21.000] request: { "command": "configurePlugin", "arguments": { @@ -282,7 +283,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 38 [00:01:21.000] response: +Info 39 [00:01:22.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":1,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -309,11 +310,11 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 39 [00:01:22.000] response: +Info 40 [00:01:23.000] response: { "responseRequired": false } -Info 40 [00:01:23.000] request: +Info 41 [00:01:24.000] request: { "command": "configurePlugin", "arguments": { @@ -350,7 +351,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 41 [00:01:24.000] response: +Info 42 [00:01:25.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":2,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -377,7 +378,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 42 [00:01:25.000] response: +Info 43 [00:01:26.000] response: { "responseRequired": false } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-allowLocalPluginLoads.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-allowLocalPluginLoads.js index 09f3b4b8a35b2..fbde481967243 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-allowLocalPluginLoads.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-allowLocalPluginLoads.js @@ -61,21 +61,22 @@ Info 6 [00:00:29.000] Config: /user/username/projects/myproject/tsconfig.json } Info 7 [00:00:30.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 8 [00:00:31.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +Info 9 [00:00:32.000] Local plugin loading enabled; adding /user/username/projects/myproject to search paths +CustomRequire:: Resolving myplugin from /user/username/projects/myproject/node_modules Require:: Module myplugin created with config: {"name":"myplugin"} and options: {"watchFactory":"myplugin"} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} -Info 9 [00:00:32.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 10 [00:00:33.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Custom watchDirectory: /user/username/projects/myproject true {"watchFactory":"myplugin"} -Info 10 [00:00:33.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 11 [00:00:34.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 undefined WatchType: Closed Script info -Info 12 [00:00:35.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 13 [00:00:36.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info -Info 14 [00:00:37.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 11 [00:00:34.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 12 [00:00:35.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 undefined WatchType: Closed Script info +Info 13 [00:00:36.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 14 [00:00:37.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info 15 [00:00:38.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots Custom watchDirectory: /user/username/projects/myproject/node_modules/@types true {"watchFactory":"myplugin"} -Info 15 [00:00:38.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info 16 [00:00:39.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 17 [00:00:40.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 18 [00:00:41.000] Files (3) +Info 16 [00:00:39.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 17 [00:00:40.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 18 [00:00:41.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 19 [00:00:42.000] Files (3) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -88,14 +89,14 @@ Info 18 [00:00:41.000] Files (3) b.ts Matched by default include pattern '**/*' -Info 19 [00:00:42.000] ----------------------------------------------- -Info 20 [00:00:43.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 20 [00:00:44.000] Files (3) +Info 20 [00:00:43.000] ----------------------------------------------- +Info 21 [00:00:44.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 21 [00:00:45.000] Files (3) -Info 20 [00:00:45.000] ----------------------------------------------- -Info 20 [00:00:46.000] Open files: -Info 20 [00:00:47.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 20 [00:00:48.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 21 [00:00:46.000] ----------------------------------------------- +Info 21 [00:00:47.000] Open files: +Info 21 [00:00:48.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 21 [00:00:49.000] Projects: /user/username/projects/myproject/tsconfig.json After request PolledWatches:: @@ -119,11 +120,11 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 20 [00:00:49.000] response: +Info 21 [00:00:50.000] response: { "responseRequired": false } -Info 21 [00:00:50.000] Add a file +Info 22 [00:00:51.000] Add a file Checking timeout queue length: 0 //// [/user/username/projects/myproject/c.ts] export class a { prop = "hello"; foo() { return this.prop; } } @@ -150,11 +151,11 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 22 [00:00:53.000] Invoke plugin watches -Info 23 [00:00:54.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 24 [00:00:55.000] Scheduled: /user/username/projects/myproject/tsconfig.json -Info 25 [00:00:56.000] Scheduled: *ensureProjectForOpenFiles* -Info 26 [00:00:57.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 23 [00:00:54.000] Invoke plugin watches +Info 24 [00:00:55.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 25 [00:00:56.000] Scheduled: /user/username/projects/myproject/tsconfig.json +Info 26 [00:00:57.000] Scheduled: *ensureProjectForOpenFiles* +Info 27 [00:00:58.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Before running timeout callbacks PolledWatches:: @@ -178,12 +179,12 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 27 [00:00:58.000] Running: /user/username/projects/myproject/tsconfig.json -Info 28 [00:00:59.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 undefined WatchType: Closed Script info -Info 29 [00:01:00.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 30 [00:01:01.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 31 [00:01:02.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 32 [00:01:03.000] Files (4) +Info 28 [00:00:59.000] Running: /user/username/projects/myproject/tsconfig.json +Info 29 [00:01:00.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 undefined WatchType: Closed Script info +Info 30 [00:01:01.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 31 [00:01:02.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 32 [00:01:03.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 33 [00:01:04.000] Files (4) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -199,24 +200,24 @@ Info 32 [00:01:03.000] Files (4) c.ts Matched by default include pattern '**/*' -Info 33 [00:01:04.000] ----------------------------------------------- -Info 34 [00:01:05.000] Running: *ensureProjectForOpenFiles* -Info 35 [00:01:06.000] Before ensureProjectForOpenFiles: -Info 36 [00:01:07.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 36 [00:01:08.000] Files (4) - -Info 36 [00:01:09.000] ----------------------------------------------- -Info 36 [00:01:10.000] Open files: -Info 36 [00:01:11.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 36 [00:01:12.000] Projects: /user/username/projects/myproject/tsconfig.json -Info 36 [00:01:13.000] After ensureProjectForOpenFiles: -Info 37 [00:01:14.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 37 [00:01:15.000] Files (4) - -Info 37 [00:01:16.000] ----------------------------------------------- -Info 37 [00:01:17.000] Open files: -Info 37 [00:01:18.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 37 [00:01:19.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 34 [00:01:05.000] ----------------------------------------------- +Info 35 [00:01:06.000] Running: *ensureProjectForOpenFiles* +Info 36 [00:01:07.000] Before ensureProjectForOpenFiles: +Info 37 [00:01:08.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 37 [00:01:09.000] Files (4) + +Info 37 [00:01:10.000] ----------------------------------------------- +Info 37 [00:01:11.000] Open files: +Info 37 [00:01:12.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 37 [00:01:13.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 37 [00:01:14.000] After ensureProjectForOpenFiles: +Info 38 [00:01:15.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 38 [00:01:16.000] Files (4) + +Info 38 [00:01:17.000] ----------------------------------------------- +Info 38 [00:01:18.000] Open files: +Info 38 [00:01:19.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 38 [00:01:20.000] Projects: /user/username/projects/myproject/tsconfig.json After running timeout callbacks PolledWatches:: @@ -242,7 +243,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 37 [00:01:20.000] request: +Info 38 [00:01:21.000] request: { "command": "configurePlugin", "arguments": { @@ -280,7 +281,7 @@ WatchedDirectories:Recursive:: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: Custom:: onConfigurationChanged:: {"extraData":"myData"} -Info 38 [00:01:21.000] response: +Info 39 [00:01:22.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":1,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -307,11 +308,11 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 39 [00:01:22.000] response: +Info 40 [00:01:23.000] response: { "responseRequired": false } -Info 40 [00:01:23.000] request: +Info 41 [00:01:24.000] request: { "command": "configurePlugin", "arguments": { @@ -348,7 +349,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 41 [00:01:24.000] response: +Info 42 [00:01:25.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":2,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -375,7 +376,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 42 [00:01:25.000] response: +Info 43 [00:01:26.000] response: { "responseRequired": false } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-object.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-object.js index afe421ef1493d..9f750c092ee36 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-object.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-object.js @@ -64,7 +64,7 @@ Info 6 [00:00:29.000] Config: /user/username/projects/myproject/tsconfig.json } Info 7 [00:00:30.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 8 [00:00:31.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Info 9 [00:00:32.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginOverride-allowLocalPluginLoads-object.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginOverride-allowLocalPluginLoads-object.js index 2bbf735bfca94..60469b30d7bf2 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginOverride-allowLocalPluginLoads-object.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginOverride-allowLocalPluginLoads-object.js @@ -108,21 +108,22 @@ Info 9 [00:00:32.000] Config: /user/username/projects/myproject/tsconfig.json } Info 10 [00:00:33.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 11 [00:00:34.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +Info 12 [00:00:35.000] Local plugin loading enabled; adding /user/username/projects/myproject to search paths +CustomRequire:: Resolving myplugin from /user/username/projects/myproject/node_modules Require:: Module myplugin created with config: {"name":"myplugin","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} -Info 12 [00:00:35.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 13 [00:00:36.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Custom watchDirectory: /user/username/projects/myproject true {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} -Info 13 [00:00:36.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 14 [00:00:37.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 undefined WatchType: Closed Script info -Info 15 [00:00:38.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 16 [00:00:39.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info -Info 17 [00:00:40.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 14 [00:00:37.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 15 [00:00:38.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 undefined WatchType: Closed Script info +Info 16 [00:00:39.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 17 [00:00:40.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info 18 [00:00:41.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots Custom watchDirectory: /user/username/projects/myproject/node_modules/@types true {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} -Info 18 [00:00:41.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info 19 [00:00:42.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 20 [00:00:43.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 21 [00:00:44.000] Files (3) +Info 19 [00:00:42.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 20 [00:00:43.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 21 [00:00:44.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 22 [00:00:45.000] Files (3) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -135,14 +136,14 @@ Info 21 [00:00:44.000] Files (3) b.ts Matched by default include pattern '**/*' -Info 22 [00:00:45.000] ----------------------------------------------- -Info 23 [00:00:46.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 23 [00:00:47.000] Files (3) +Info 23 [00:00:46.000] ----------------------------------------------- +Info 24 [00:00:47.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 24 [00:00:48.000] Files (3) -Info 23 [00:00:48.000] ----------------------------------------------- -Info 23 [00:00:49.000] Open files: -Info 23 [00:00:50.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 23 [00:00:51.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 24 [00:00:49.000] ----------------------------------------------- +Info 24 [00:00:50.000] Open files: +Info 24 [00:00:51.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 24 [00:00:52.000] Projects: /user/username/projects/myproject/tsconfig.json After request PolledWatches:: @@ -166,11 +167,11 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 23 [00:00:52.000] response: +Info 24 [00:00:53.000] response: { "responseRequired": false } -Info 24 [00:00:53.000] Add a file +Info 25 [00:00:54.000] Add a file Checking timeout queue length: 0 //// [/user/username/projects/myproject/c.ts] export class a { prop = "hello"; foo() { return this.prop; } } @@ -197,11 +198,11 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 25 [00:00:56.000] Invoke plugin watches -Info 26 [00:00:57.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 27 [00:00:58.000] Scheduled: /user/username/projects/myproject/tsconfig.json -Info 28 [00:00:59.000] Scheduled: *ensureProjectForOpenFiles* -Info 29 [00:01:00.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 26 [00:00:57.000] Invoke plugin watches +Info 27 [00:00:58.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 28 [00:00:59.000] Scheduled: /user/username/projects/myproject/tsconfig.json +Info 29 [00:01:00.000] Scheduled: *ensureProjectForOpenFiles* +Info 30 [00:01:01.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Before running timeout callbacks PolledWatches:: @@ -225,12 +226,12 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 30 [00:01:01.000] Running: /user/username/projects/myproject/tsconfig.json -Info 31 [00:01:02.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 undefined WatchType: Closed Script info -Info 32 [00:01:03.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 33 [00:01:04.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 34 [00:01:05.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 35 [00:01:06.000] Files (4) +Info 31 [00:01:02.000] Running: /user/username/projects/myproject/tsconfig.json +Info 32 [00:01:03.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 undefined WatchType: Closed Script info +Info 33 [00:01:04.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 34 [00:01:05.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 35 [00:01:06.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 36 [00:01:07.000] Files (4) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -246,24 +247,24 @@ Info 35 [00:01:06.000] Files (4) c.ts Matched by default include pattern '**/*' -Info 36 [00:01:07.000] ----------------------------------------------- -Info 37 [00:01:08.000] Running: *ensureProjectForOpenFiles* -Info 38 [00:01:09.000] Before ensureProjectForOpenFiles: -Info 39 [00:01:10.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 39 [00:01:11.000] Files (4) - -Info 39 [00:01:12.000] ----------------------------------------------- -Info 39 [00:01:13.000] Open files: -Info 39 [00:01:14.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 39 [00:01:15.000] Projects: /user/username/projects/myproject/tsconfig.json -Info 39 [00:01:16.000] After ensureProjectForOpenFiles: -Info 40 [00:01:17.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 40 [00:01:18.000] Files (4) - -Info 40 [00:01:19.000] ----------------------------------------------- -Info 40 [00:01:20.000] Open files: -Info 40 [00:01:21.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 40 [00:01:22.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 37 [00:01:08.000] ----------------------------------------------- +Info 38 [00:01:09.000] Running: *ensureProjectForOpenFiles* +Info 39 [00:01:10.000] Before ensureProjectForOpenFiles: +Info 40 [00:01:11.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 40 [00:01:12.000] Files (4) + +Info 40 [00:01:13.000] ----------------------------------------------- +Info 40 [00:01:14.000] Open files: +Info 40 [00:01:15.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 40 [00:01:16.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 40 [00:01:17.000] After ensureProjectForOpenFiles: +Info 41 [00:01:18.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 41 [00:01:19.000] Files (4) + +Info 41 [00:01:20.000] ----------------------------------------------- +Info 41 [00:01:21.000] Open files: +Info 41 [00:01:22.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 41 [00:01:23.000] Projects: /user/username/projects/myproject/tsconfig.json After running timeout callbacks PolledWatches:: @@ -289,7 +290,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 40 [00:01:23.000] request: +Info 41 [00:01:24.000] request: { "command": "configurePlugin", "arguments": { @@ -326,7 +327,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 41 [00:01:24.000] response: +Info 42 [00:01:25.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":2,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -353,11 +354,11 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 42 [00:01:25.000] response: +Info 43 [00:01:26.000] response: { "responseRequired": false } -Info 43 [00:01:26.000] request: +Info 44 [00:01:27.000] request: { "command": "configurePlugin", "arguments": { @@ -394,7 +395,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 44 [00:01:27.000] response: +Info 45 [00:01:28.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":3,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -421,7 +422,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}}} WatchedDirectories:: -Info 45 [00:01:28.000] response: +Info 46 [00:01:29.000] response: { "responseRequired": false } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginOverride-object.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginOverride-object.js index 2bbf735bfca94..218703f5afde3 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginOverride-object.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginOverride-object.js @@ -108,7 +108,7 @@ Info 9 [00:00:32.000] Config: /user/username/projects/myproject/tsconfig.json } Info 10 [00:00:33.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 11 [00:00:34.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin","myconfig":"somethingelse"} and options: {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Info 12 [00:00:35.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":{"name":"myplugin","myconfig":"somethingelse"}} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginoverride-allowLocalPluginLoads.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginoverride-allowLocalPluginLoads.js index d052ecc7a0cee..de0cdc243ae03 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginoverride-allowLocalPluginLoads.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginoverride-allowLocalPluginLoads.js @@ -105,21 +105,22 @@ Info 9 [00:00:32.000] Config: /user/username/projects/myproject/tsconfig.json } Info 10 [00:00:33.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 11 [00:00:34.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +Info 12 [00:00:35.000] Local plugin loading enabled; adding /user/username/projects/myproject to search paths +CustomRequire:: Resolving myplugin from /user/username/projects/myproject/node_modules Require:: Module myplugin created with config: {"name":"myplugin"} and options: {"watchFactory":"myplugin"} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} -Info 12 [00:00:35.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 13 [00:00:36.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Custom watchDirectory: /user/username/projects/myproject true {"watchFactory":"myplugin"} -Info 13 [00:00:36.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 14 [00:00:37.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 undefined WatchType: Closed Script info -Info 15 [00:00:38.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 16 [00:00:39.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info -Info 17 [00:00:40.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 14 [00:00:37.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 15 [00:00:38.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 500 undefined WatchType: Closed Script info +Info 16 [00:00:39.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 17 [00:00:40.000] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info 18 [00:00:41.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots Custom watchDirectory: /user/username/projects/myproject/node_modules/@types true {"watchFactory":"myplugin"} -Info 18 [00:00:41.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info 19 [00:00:42.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 20 [00:00:43.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 21 [00:00:44.000] Files (3) +Info 19 [00:00:42.000] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info 20 [00:00:43.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 21 [00:00:44.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 22 [00:00:45.000] Files (3) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -132,14 +133,14 @@ Info 21 [00:00:44.000] Files (3) b.ts Matched by default include pattern '**/*' -Info 22 [00:00:45.000] ----------------------------------------------- -Info 23 [00:00:46.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 23 [00:00:47.000] Files (3) +Info 23 [00:00:46.000] ----------------------------------------------- +Info 24 [00:00:47.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 24 [00:00:48.000] Files (3) -Info 23 [00:00:48.000] ----------------------------------------------- -Info 23 [00:00:49.000] Open files: -Info 23 [00:00:50.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 23 [00:00:51.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 24 [00:00:49.000] ----------------------------------------------- +Info 24 [00:00:50.000] Open files: +Info 24 [00:00:51.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 24 [00:00:52.000] Projects: /user/username/projects/myproject/tsconfig.json After request PolledWatches:: @@ -163,11 +164,11 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 23 [00:00:52.000] response: +Info 24 [00:00:53.000] response: { "responseRequired": false } -Info 24 [00:00:53.000] Add a file +Info 25 [00:00:54.000] Add a file Checking timeout queue length: 0 //// [/user/username/projects/myproject/c.ts] export class a { prop = "hello"; foo() { return this.prop; } } @@ -194,11 +195,11 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 25 [00:00:56.000] Invoke plugin watches -Info 26 [00:00:57.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory -Info 27 [00:00:58.000] Scheduled: /user/username/projects/myproject/tsconfig.json -Info 28 [00:00:59.000] Scheduled: *ensureProjectForOpenFiles* -Info 29 [00:01:00.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 26 [00:00:57.000] Invoke plugin watches +Info 27 [00:00:58.000] DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info 28 [00:00:59.000] Scheduled: /user/username/projects/myproject/tsconfig.json +Info 29 [00:01:00.000] Scheduled: *ensureProjectForOpenFiles* +Info 30 [00:01:01.000] Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/c.ts :: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory Before running timeout callbacks PolledWatches:: @@ -222,12 +223,12 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 30 [00:01:01.000] Running: /user/username/projects/myproject/tsconfig.json -Info 31 [00:01:02.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 undefined WatchType: Closed Script info -Info 32 [00:01:03.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info 33 [00:01:04.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info 34 [00:01:05.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 35 [00:01:06.000] Files (4) +Info 31 [00:01:02.000] Running: /user/username/projects/myproject/tsconfig.json +Info 32 [00:01:03.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/c.ts 500 undefined WatchType: Closed Script info +Info 33 [00:01:04.000] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info 34 [00:01:05.000] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 35 [00:01:06.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 36 [00:01:07.000] Files (4) /a/lib/lib.d.ts /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts @@ -243,24 +244,24 @@ Info 35 [00:01:06.000] Files (4) c.ts Matched by default include pattern '**/*' -Info 36 [00:01:07.000] ----------------------------------------------- -Info 37 [00:01:08.000] Running: *ensureProjectForOpenFiles* -Info 38 [00:01:09.000] Before ensureProjectForOpenFiles: -Info 39 [00:01:10.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 39 [00:01:11.000] Files (4) - -Info 39 [00:01:12.000] ----------------------------------------------- -Info 39 [00:01:13.000] Open files: -Info 39 [00:01:14.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 39 [00:01:15.000] Projects: /user/username/projects/myproject/tsconfig.json -Info 39 [00:01:16.000] After ensureProjectForOpenFiles: -Info 40 [00:01:17.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info 40 [00:01:18.000] Files (4) - -Info 40 [00:01:19.000] ----------------------------------------------- -Info 40 [00:01:20.000] Open files: -Info 40 [00:01:21.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined -Info 40 [00:01:22.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 37 [00:01:08.000] ----------------------------------------------- +Info 38 [00:01:09.000] Running: *ensureProjectForOpenFiles* +Info 39 [00:01:10.000] Before ensureProjectForOpenFiles: +Info 40 [00:01:11.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 40 [00:01:12.000] Files (4) + +Info 40 [00:01:13.000] ----------------------------------------------- +Info 40 [00:01:14.000] Open files: +Info 40 [00:01:15.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 40 [00:01:16.000] Projects: /user/username/projects/myproject/tsconfig.json +Info 40 [00:01:17.000] After ensureProjectForOpenFiles: +Info 41 [00:01:18.000] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info 41 [00:01:19.000] Files (4) + +Info 41 [00:01:20.000] ----------------------------------------------- +Info 41 [00:01:21.000] Open files: +Info 41 [00:01:22.000] FileName: /user/username/projects/myproject/a.ts ProjectRootPath: undefined +Info 41 [00:01:23.000] Projects: /user/username/projects/myproject/tsconfig.json After running timeout callbacks PolledWatches:: @@ -286,7 +287,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 40 [00:01:23.000] request: +Info 41 [00:01:24.000] request: { "command": "configurePlugin", "arguments": { @@ -324,7 +325,7 @@ WatchedDirectories:Recursive:: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: Custom:: onConfigurationChanged:: {"extraData":"myData"} -Info 41 [00:01:24.000] response: +Info 42 [00:01:25.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":2,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -351,11 +352,11 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 42 [00:01:25.000] response: +Info 43 [00:01:26.000] response: { "responseRequired": false } -Info 43 [00:01:26.000] request: +Info 44 [00:01:27.000] request: { "command": "configurePlugin", "arguments": { @@ -392,7 +393,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 44 [00:01:27.000] response: +Info 45 [00:01:28.000] response: {"seq":0,"type":"response","command":"configurePlugin","request_seq":3,"success":true,"performanceData":{"updateGraphDurationMs":*}} After request @@ -419,7 +420,7 @@ WatchedDirectories:Recursive:: /user/username/projects/myproject/node_modules/@types: {"options":{"watchFactory":"myplugin"}} WatchedDirectories:: -Info 45 [00:01:28.000] response: +Info 46 [00:01:29.000] response: { "responseRequired": false } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginoverride.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginoverride.js index d052ecc7a0cee..aa776fc21fc48 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginoverride.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file-with-pluginoverride.js @@ -105,7 +105,7 @@ Info 9 [00:00:32.000] Config: /user/username/projects/myproject/tsconfig.json } Info 10 [00:00:33.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 11 [00:00:34.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin"} and options: {"watchFactory":"myplugin"} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Info 12 [00:00:35.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory diff --git a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file.js b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file.js index 09f3b4b8a35b2..967f55a3b29f0 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/watchFactory-in-config-file.js @@ -61,7 +61,7 @@ Info 6 [00:00:29.000] Config: /user/username/projects/myproject/tsconfig.json } Info 7 [00:00:30.000] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info 8 [00:00:31.000] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -CustomRequire:: Resolving myplugin from /a/lib/tsc.js/../../../node_modules +CustomRequire:: Resolving myplugin from /a/pluginprobe1/node_modules Require:: Module myplugin created with config: {"name":"myplugin"} and options: {"watchFactory":"myplugin"} Custom watchFile: /user/username/projects/myproject/tsconfig.json 2000 {"watchFactory":"myplugin"} Info 9 [00:00:32.000] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 {"watchFactory":"myplugin"} Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory