squeezr-ai 1.16.7 → 1.16.8

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.
Files changed (2) hide show
  1. package/bin/squeezr.js +17 -6
  2. package/package.json +1 -1
package/bin/squeezr.js CHANGED
@@ -1044,14 +1044,25 @@ switch (command) {
1044
1044
  }
1045
1045
  }
1046
1046
 
1047
- // Clear update check cache so it doesn't show stale banner
1048
- try { fs.unlinkSync(UPDATE_CHECK_FILE) } catch {}
1047
+ // Write cache with the new version so neither parent nor child shows stale banner
1048
+ try {
1049
+ const newPkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf-8'))
1050
+ const dir = path.dirname(UPDATE_CHECK_FILE)
1051
+ if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true })
1052
+ fs.writeFileSync(UPDATE_CHECK_FILE, JSON.stringify({ latest: newPkg.version, checkedAt: Date.now() }))
1053
+ } catch {
1054
+ try { fs.unlinkSync(UPDATE_CHECK_FILE) } catch {}
1055
+ }
1049
1056
 
1050
1057
  console.log('\nStarting Squeezr...')
1051
- // Re-exec the new binary so we run the updated code
1052
- const squeezrBin = process.argv[1]
1058
+ // Resolve the updated binary from npm global path (process.argv[1] may still be the old version)
1059
+ let newBin = process.argv[1]
1060
+ try {
1061
+ const resolved = execSync('which squeezr', { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] }).trim()
1062
+ if (resolved) newBin = resolved
1063
+ } catch {}
1053
1064
  try {
1054
- execSync(`node "${squeezrBin}" start`, { stdio: 'inherit' })
1065
+ execSync(`node "${newBin}" start`, { stdio: 'inherit' })
1055
1066
  } catch {}
1056
1067
 
1057
1068
  if (isWSL()) {
@@ -1109,4 +1120,4 @@ switch (command) {
1109
1120
  process.exit(1)
1110
1121
  }
1111
1122
 
1112
- await showUpdateBanner()
1123
+ if (command !== 'update') await showUpdateBanner()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squeezr-ai",
3
- "version": "1.16.7",
3
+ "version": "1.16.8",
4
4
  "description": "AI proxy that compresses Claude Code, Codex, Aider, Gemini CLI and Ollama context windows to save thousands of tokens per session",
5
5
  "keywords": [
6
6
  "claude",