@inetafrica/open-claudia 1.14.8 → 1.14.9

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 (3) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/bot.js +7 -3
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.14.9
4
+ - Fix `/upgrade`: `latest` was const-scoped to the version-check try
5
+ block, so the install step ran with `latest` undefined and threw
6
+ `ReferenceError: latest is not defined`. Hoist the variable and fall
7
+ back to npm's `latest` dist-tag if `npm view` fails. Regression
8
+ introduced in 745c6cf — broke v1.14.7 and v1.14.8 upgrades.
9
+
3
10
  ## v1.14.8
4
11
  - Fix: `/stop` and the 6h hard-timeout now walk the full descendant
5
12
  process tree, not just the Claude CLI's process group. Background
package/bot.js CHANGED
@@ -1548,9 +1548,12 @@ bot.onText(/\/upgrade$/, async (msg) => {
1548
1548
  // Change to HOME first — npm install -g replaces the package directory
1549
1549
  // which can delete the cwd out from under the running process
1550
1550
  try { process.chdir(process.env.HOME || require("os").homedir()); } catch (e) { /* already gone */ }
1551
- // Check if there's actually a newer version
1551
+ // Check if there's actually a newer version. `latest` is hoisted so
1552
+ // the install step below can reference it; if `npm view` fails we
1553
+ // fall back to npm's `latest` dist-tag.
1554
+ let latest = null;
1552
1555
  try {
1553
- const latest = execSync("npm view @inetafrica/open-claudia version", {
1556
+ latest = execSync("npm view @inetafrica/open-claudia version", {
1554
1557
  encoding: "utf-8", timeout: 15000,
1555
1558
  env: { ...process.env, PATH: FULL_PATH, HOME: process.env.HOME || require("os").homedir() },
1556
1559
  }).trim();
@@ -1562,8 +1565,9 @@ bot.onText(/\/upgrade$/, async (msg) => {
1562
1565
  } catch (e) {
1563
1566
  await send("Upgrading...");
1564
1567
  }
1568
+ const installTarget = latest || "latest";
1565
1569
  try {
1566
- execSync(`npm install -g @inetafrica/open-claudia@${latest} 2>&1`, {
1570
+ execSync(`npm install -g @inetafrica/open-claudia@${installTarget} 2>&1`, {
1567
1571
  encoding: "utf-8", timeout: 120000,
1568
1572
  cwd: process.env.HOME || require("os").homedir(),
1569
1573
  env: { ...process.env, PATH: FULL_PATH, HOME: process.env.HOME || require("os").homedir() },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inetafrica/open-claudia",
3
- "version": "1.14.8",
3
+ "version": "1.14.9",
4
4
  "description": "Your always-on AI coding assistant — Claude Code via Telegram",
5
5
  "main": "bot.js",
6
6
  "bin": {