research-copilot 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/out/main/index.mjs +11 -5
- package/package.json +1 -1
package/app/out/main/index.mjs
CHANGED
|
@@ -9279,6 +9279,14 @@ async function destroyAllCoordinators() {
|
|
|
9279
9279
|
function registerIpcHandlers() {
|
|
9280
9280
|
if (ipcHandlersRegistered) return;
|
|
9281
9281
|
ipcHandlersRegistered = true;
|
|
9282
|
+
const currentVersion = (() => {
|
|
9283
|
+
try {
|
|
9284
|
+
const rootPkg = JSON.parse(readFileSync(join(__dirname, "..", "..", "..", "package.json"), "utf-8"));
|
|
9285
|
+
return rootPkg.version;
|
|
9286
|
+
} catch {
|
|
9287
|
+
return app.getVersion();
|
|
9288
|
+
}
|
|
9289
|
+
})();
|
|
9282
9290
|
let cachedUpdateInfo = null;
|
|
9283
9291
|
const checkForUpdate = async () => {
|
|
9284
9292
|
if (cachedUpdateInfo) return cachedUpdateInfo;
|
|
@@ -9289,13 +9297,11 @@ function registerIpcHandlers() {
|
|
|
9289
9297
|
if (!res.ok) throw new Error(`npm registry returned ${res.status}`);
|
|
9290
9298
|
const data = await res.json();
|
|
9291
9299
|
const latest = data.version;
|
|
9292
|
-
const
|
|
9293
|
-
|
|
9294
|
-
cachedUpdateInfo = { latest, current, hasUpdate };
|
|
9300
|
+
const hasUpdate = latest !== currentVersion && compareVersions(latest, currentVersion) > 0;
|
|
9301
|
+
cachedUpdateInfo = { latest, current: currentVersion, hasUpdate };
|
|
9295
9302
|
return cachedUpdateInfo;
|
|
9296
9303
|
} catch {
|
|
9297
|
-
|
|
9298
|
-
cachedUpdateInfo = { latest: current, current, hasUpdate: false };
|
|
9304
|
+
cachedUpdateInfo = { latest: currentVersion, current: currentVersion, hasUpdate: false };
|
|
9299
9305
|
return cachedUpdateInfo;
|
|
9300
9306
|
}
|
|
9301
9307
|
};
|
package/package.json
CHANGED