From e2285cc0336a75a586e97d99da86e9eba6998015 Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Wed, 2 Oct 2024 10:40:01 +0200 Subject: [PATCH] chore: add verbose log for the watcher --- src/watcher.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/watcher.ts b/src/watcher.ts index b1720a5..25a6a22 100644 --- a/src/watcher.ts +++ b/src/watcher.ts @@ -5,6 +5,7 @@ import mm from 'micromatch' import type { TestTree } from './testTree' import { getConfig } from './config' import type { VitestFolderAPI } from './api' +import { log } from './log' export class ExtensionWatcher extends vscode.Disposable { private watcherByFolder = new Map() @@ -31,10 +32,12 @@ export class ExtensionWatcher extends vscode.Disposable { this.watcherByFolder.set(api.workspaceFolder, watcher) watcher.onDidDelete((file) => { + log.verbose?.('[VSCODE] File deleted:', file.fsPath) this.testTree.removeFile(normalize(file.fsPath)) }) watcher.onDidChange(async (file) => { + log.verbose?.('[VSCODE] File changed:', file.fsPath) const filepath = normalize(file.fsPath) if (await this.shouldIgnoreFile(filepath)) { return @@ -43,6 +46,7 @@ export class ExtensionWatcher extends vscode.Disposable { }) watcher.onDidCreate(async (file) => { + log.verbose?.('[VSCODE] File created:', file.fsPath) const filepath = normalize(file.fsPath) if (await this.shouldIgnoreFile(filepath)) { return -- 2.51.2