claude-threads 0.14.0 → 0.14.1

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.
@@ -2,6 +2,7 @@ import updateNotifier from 'update-notifier';
2
2
  import { readFileSync } from 'fs';
3
3
  import { resolve } from 'path';
4
4
  import { fileURLToPath } from 'url';
5
+ import semver from 'semver';
5
6
  const __dirname = fileURLToPath(new URL('.', import.meta.url));
6
7
  let cachedUpdateInfo;
7
8
  export function checkForUpdates() {
@@ -26,6 +27,15 @@ Run: npm install -g claude-threads`,
26
27
  }
27
28
  }
28
29
  // Returns update info if available, for posting to Mattermost
30
+ // Only returns if latest > current (handles stale cache edge case)
29
31
  export function getUpdateInfo() {
32
+ if (!cachedUpdateInfo)
33
+ return undefined;
34
+ // Sanity check: only show update if latest is actually newer
35
+ const current = cachedUpdateInfo.current;
36
+ const latest = cachedUpdateInfo.latest;
37
+ if (current && latest && semver.gte(current, latest)) {
38
+ return undefined; // Current is same or newer, no update needed
39
+ }
30
40
  return cachedUpdateInfo;
31
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-threads",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "Share Claude Code sessions live in a Mattermost channel with interactive features",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -52,6 +52,7 @@
52
52
  "commander": "^14.0.2",
53
53
  "diff": "^8.0.2",
54
54
  "prompts": "^2.4.2",
55
+ "semver": "^7.7.3",
55
56
  "update-notifier": "^7.3.1",
56
57
  "ws": "^8.18.0",
57
58
  "yaml": "^2.8.2",
@@ -61,6 +62,7 @@
61
62
  "@eslint/js": "^9.39.2",
62
63
  "@types/node": "^22.19.3",
63
64
  "@types/prompts": "^2.4.9",
65
+ "@types/semver": "^7.7.1",
64
66
  "@types/update-notifier": "^6.0.8",
65
67
  "@types/ws": "^8.5.13",
66
68
  "@vitest/coverage-v8": "^4.0.16",