coder-config 0.46.7-beta → 0.46.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.
package/lib/constants.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Constants and tool path configurations
3
3
  */
4
4
 
5
- const VERSION = '0.46.7-beta';
5
+ const VERSION = '0.46.9';
6
6
 
7
7
  // Tool-specific path configurations
8
8
  const TOOL_PATHS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coder-config",
3
- "version": "0.46.7-beta",
3
+ "version": "0.46.9",
4
4
  "description": "Configuration manager for AI coding tools - Claude Code, Gemini CLI, Codex CLI, Antigravity. Manage MCPs, rules, permissions, memory, and workstreams.",
5
5
  "author": "regression.io",
6
6
  "main": "config-loader.js",
@@ -207,15 +207,43 @@ async function checkForUpdates(manager, dirname, channel = 'stable') {
207
207
  path.join(dirname, '..', 'config-loader.js')
208
208
  );
209
209
 
210
- // Check npm for version (respects channel preference)
211
- const npmVersion = await fetchNpmVersion(channel);
212
-
213
- console.log(`[update-check] installed: ${installedVersion}, npm: ${npmVersion}`);
210
+ // Check npm for versions
211
+ // Beta channel should also see stable releases (stable is always preferred if newer)
212
+ const betaVersion = channel === 'beta' ? await fetchNpmVersion('beta') : null;
213
+ const stableVersion = await fetchNpmVersion('stable');
214
+
215
+ console.log(`[update-check] installed: ${installedVersion}, stable: ${stableVersion}, beta: ${betaVersion}`);
216
+
217
+ // Determine which version to offer (prefer stable if it's newer than both)
218
+ let targetVersion = null;
219
+ let targetChannel = channel;
220
+
221
+ if (channel === 'beta') {
222
+ // On beta channel: prefer stable if newer, otherwise beta
223
+ if (stableVersion && isNewerVersion(stableVersion, installedVersion)) {
224
+ // Stable is newer than installed - check if it's also newer than beta
225
+ if (!betaVersion || isNewerVersion(stableVersion, betaVersion)) {
226
+ targetVersion = stableVersion;
227
+ targetChannel = 'stable';
228
+ } else {
229
+ targetVersion = betaVersion;
230
+ targetChannel = 'beta';
231
+ }
232
+ } else if (betaVersion && isNewerVersion(betaVersion, installedVersion)) {
233
+ targetVersion = betaVersion;
234
+ targetChannel = 'beta';
235
+ }
236
+ } else {
237
+ // On stable channel: only offer stable
238
+ if (stableVersion && isNewerVersion(stableVersion, installedVersion)) {
239
+ targetVersion = stableVersion;
240
+ targetChannel = 'stable';
241
+ }
242
+ }
214
243
 
215
- if (npmVersion && isNewerVersion(npmVersion, installedVersion)) {
244
+ if (targetVersion) {
216
245
  // Pre-cache the package before showing notification
217
- // This ensures the update will actually work when clicked
218
- const cached = await preCachePackage(npmVersion);
246
+ const cached = await preCachePackage(targetVersion);
219
247
 
220
248
  if (!cached) {
221
249
  console.log('[update-check] update found but not yet installable, skipping notification');
@@ -228,24 +256,24 @@ async function checkForUpdates(manager, dirname, channel = 'stable') {
228
256
  };
229
257
  }
230
258
 
231
- console.log('[update-check] update available and pre-cached');
259
+ console.log(`[update-check] update available: ${targetVersion} (${targetChannel})`);
232
260
  return {
233
261
  updateAvailable: true,
234
262
  installedVersion,
235
- latestVersion: npmVersion,
236
- sourceVersion: npmVersion, // legacy alias for v0.37.0 compatibility
263
+ latestVersion: targetVersion,
264
+ sourceVersion: targetVersion,
237
265
  updateMethod: 'npm',
238
- channel,
266
+ channel: targetChannel,
239
267
  installDir: manager.installDir
240
268
  };
241
269
  }
242
270
 
243
- // No update available from npm
271
+ // No update available
244
272
  return {
245
273
  updateAvailable: false,
246
274
  installedVersion,
247
- latestVersion: npmVersion || installedVersion,
248
- sourceVersion: npmVersion || installedVersion, // legacy alias for v0.37.0 compatibility
275
+ latestVersion: stableVersion || installedVersion,
276
+ sourceVersion: stableVersion || installedVersion,
249
277
  installDir: manager.installDir
250
278
  };
251
279
  }