From 7f5d714e416ea3b93197c31ebca44fe88d7eec8c Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 5 Sep 2024 12:43:29 +0200 Subject: [PATCH] Revert "Ignore tsserver requests for createDirectoryWatcher(~/Library) on macOS" --- .../src/typescriptServiceClient.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/extensions/typescript-language-features/src/typescriptServiceClient.ts b/extensions/typescript-language-features/src/typescriptServiceClient.ts index d18a4c9372a90..2d3ea9eeda623 100644 --- a/extensions/typescript-language-features/src/typescriptServiceClient.ts +++ b/extensions/typescript-language-features/src/typescriptServiceClient.ts @@ -5,7 +5,6 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { homedir } from 'os'; import { ServiceConfigurationProvider, SyntaxServerConfiguration, TsServerLogLevel, TypeScriptServiceConfiguration, areServiceConfigurationsEqual } from './configuration/configuration'; import * as fileSchemes from './configuration/fileSchemes'; import { Schemes } from './configuration/schemes'; @@ -1039,20 +1038,15 @@ export default class TypeScriptServiceClient extends Disposable implements IType return; case EventName.createDirectoryWatcher: { - const fpath = (event.body as Proto.CreateDirectoryWatcherEventBody).path; - if (fpath.startsWith(inMemoryResourcePrefix)) { - return; - } - if (process.platform === 'darwin' && fpath === path.join(homedir(), 'Library')) { - // ignore directory watch requests on ~/Library - // until microsoft/TypeScript#59831 is resolved + const path = (event.body as Proto.CreateDirectoryWatcherEventBody).path; + if (path.startsWith(inMemoryResourcePrefix)) { return; } this.createFileSystemWatcher( (event.body as Proto.CreateDirectoryWatcherEventBody).id, new vscode.RelativePattern( - vscode.Uri.file(fpath), + vscode.Uri.file(path), (event.body as Proto.CreateDirectoryWatcherEventBody).recursive ? '**' : '*' ), (event.body as Proto.CreateDirectoryWatcherEventBody).ignoreUpdate