reactoradar 1.5.0 → 1.5.2
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.js +2 -2
- package/main.js +11 -3
- package/package.json +1 -1
package/app.js
CHANGED
|
@@ -257,8 +257,8 @@ if (window.electronAPI) {
|
|
|
257
257
|
|
|
258
258
|
window.electronAPI.on('app-version', (version) => {
|
|
259
259
|
state._appVersion = version;
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
// Update anywhere the version is displayed
|
|
261
|
+
document.querySelectorAll('#aboutVersion').forEach(el => el.textContent = 'v' + version);
|
|
262
262
|
});
|
|
263
263
|
|
|
264
264
|
window.electronAPI.on('update-available', ({ current, latest }) => {
|
package/main.js
CHANGED
|
@@ -38,10 +38,18 @@ app.whenReady().then(async () => {
|
|
|
38
38
|
|
|
39
39
|
await createMainWindow();
|
|
40
40
|
|
|
41
|
-
// Send version to renderer
|
|
42
|
-
|
|
41
|
+
// Send version to renderer — try package.json, fallback to app.getVersion()
|
|
42
|
+
let appVersion;
|
|
43
|
+
try { appVersion = require('./package.json').version; } catch { appVersion = app.getVersion(); }
|
|
44
|
+
// Send multiple times to ensure renderer catches it
|
|
43
45
|
mainWindow?.webContents.on('did-finish-load', () => {
|
|
44
|
-
|
|
46
|
+
[200, 1000, 3000].forEach(delay => {
|
|
47
|
+
setTimeout(() => {
|
|
48
|
+
if (mainWindow && !mainWindow.isDestroyed()) {
|
|
49
|
+
mainWindow.webContents.send('app-version', appVersion);
|
|
50
|
+
}
|
|
51
|
+
}, delay);
|
|
52
|
+
});
|
|
45
53
|
});
|
|
46
54
|
|
|
47
55
|
// Check for updates (non-blocking)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reactoradar",
|
|
3
3
|
"productName": "ReactoRadar",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.2",
|
|
5
5
|
"description": "macOS debugger for React Native — Console, Sources, Network, Performance, Memory, Redux, AsyncStorage, React tree. Supports RN 0.74+ with Hermes and New Architecture.",
|
|
6
6
|
"main": "main.js",
|
|
7
7
|
"bin": {
|