From 80417f4fa7d44c4f5a1ad7d2225671de48a29a7d Mon Sep 17 00:00:00 2001 From: lohit Date: Mon, 21 Jul 2025 21:48:59 +0530 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=20add=20rsbuild=20`watchFiles`?= =?UTF-8?q?=20config=20for=20bruno-app=20`src/providers/*`=20=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit eacbc7799f1f2e78a891fec7f607654138801cdf. --- packages/bruno-app/rsbuild.config.mjs | 15 --------------- packages/bruno-electron/src/app/collections.js | 7 +------ packages/bruno-electron/src/ipc/preferences.js | 3 +-- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/packages/bruno-app/rsbuild.config.mjs b/packages/bruno-app/rsbuild.config.mjs index b9b84129c..f21f80666 100644 --- a/packages/bruno-app/rsbuild.config.mjs +++ b/packages/bruno-app/rsbuild.config.mjs @@ -18,21 +18,6 @@ export default defineConfig({ } }) ], - dev: { - watchFiles: { - paths: [ - 'src/providers/**', - 'src/utils/**', - 'src/hooks/**', - 'src/themes/**', - 'src/selectors/**' - ], - options: { - usePolling: false, - interval: 1000, - }, - }, - }, source: { tsconfigPath: './jsconfig.json', // Specifies the path to the JavaScript/TypeScript configuration file, exclude: [ diff --git a/packages/bruno-electron/src/app/collections.js b/packages/bruno-electron/src/app/collections.js index 091580176..a6b7a178c 100644 --- a/packages/bruno-electron/src/app/collections.js +++ b/packages/bruno-electron/src/app/collections.js @@ -56,12 +56,7 @@ const openCollectionDialog = async (win, watcher) => { }; const openCollection = async (win, watcher, collectionPath, options = {}) => { - if (!watcher.hasWatcher(collectionPath) || options.forceRefreshWatcher) { - if (options.forceRefreshWatcher) { - // the watcher is being refreshed, so we remove the existing watcher - // when the collection is opened again in the gui, a new watcher will be created via the `renderer:mount-collection` handler - watcher.removeWatcher(collectionPath); - } + if (!watcher.hasWatcher(collectionPath)) { try { let brunoConfig = await getCollectionConfigFile(collectionPath); const uid = generateUidBasedOnHash(collectionPath); diff --git a/packages/bruno-electron/src/ipc/preferences.js b/packages/bruno-electron/src/ipc/preferences.js index 26de4c913..4c9c34d99 100644 --- a/packages/bruno-electron/src/ipc/preferences.js +++ b/packages/bruno-electron/src/ipc/preferences.js @@ -28,8 +28,7 @@ const registerPreferencesIpc = (mainWindow, watcher, lastOpenedCollections) => { for (let collectionPath of lastOpened) { if (isDirectory(collectionPath)) { await openCollection(mainWindow, watcher, collectionPath, { - dontSendDisplayErrors: true, - forceRefreshWatcher: true + dontSendDisplayErrors: true }); } }