@way_marks/server 4.4.6 → 4.4.7

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.
@@ -162,11 +162,21 @@ async function getVersionInfo() {
162
162
  // Check cache first
163
163
  const cache = readCacheFile();
164
164
  if (cache && isCacheValid(cache)) {
165
- return {
166
- currentVersion,
167
- latestVersion: cache.latestVersion,
168
- updateAvailable: compareVersions(currentVersion, cache.latestVersion),
169
- };
165
+ // Smart cache invalidation: if current version is newer than cached latest,
166
+ // the cache is stale (e.g., new version was released and installed)
167
+ const currentIsNewer = compareVersions(cache.latestVersion, currentVersion);
168
+ if (currentIsNewer) {
169
+ // Cache is stale, invalidate it and fetch fresh data
170
+ // This prevents showing "update available" when user already has the latest
171
+ }
172
+ else {
173
+ // Cache is good
174
+ return {
175
+ currentVersion,
176
+ latestVersion: cache.latestVersion,
177
+ updateAvailable: compareVersions(currentVersion, cache.latestVersion),
178
+ };
179
+ }
170
180
  }
171
181
  // Prevent multiple concurrent fetches within a short window
172
182
  const now = Date.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@way_marks/server",
3
- "version": "4.4.6",
3
+ "version": "4.4.7",
4
4
  "description": "Waymark MCP server and dashboard",
5
5
  "author": "Waymark <hello@waymarks.dev>",
6
6
  "license": "MIT",