specdacular 0.1.3 → 0.1.4
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.
|
@@ -45,8 +45,13 @@ const child = spawn(process.execPath, ['-e', `
|
|
|
45
45
|
latest = execSync('npm view specdacular version', { encoding: 'utf8', timeout: 10000, windowsHide: true }).trim();
|
|
46
46
|
} catch (e) {}
|
|
47
47
|
|
|
48
|
+
// Only show update if we have both a real installed version and a newer latest
|
|
49
|
+
// Don't show if installed is default (0.0.0) - means VERSION file missing
|
|
50
|
+
const hasRealInstall = installed !== '0.0.0';
|
|
51
|
+
const isNewer = latest && installed !== latest && latest > installed;
|
|
52
|
+
|
|
48
53
|
const result = {
|
|
49
|
-
update_available:
|
|
54
|
+
update_available: hasRealInstall && isNewer,
|
|
50
55
|
installed,
|
|
51
56
|
latest: latest || 'unknown',
|
|
52
57
|
checked: Math.floor(Date.now() / 1000)
|