coder-config 0.46.6 → 0.46.8-beta
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 +1 -1
- package/package.json +1 -1
- package/ui/routes/updates.js +42 -14
package/lib/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coder-config",
|
|
3
|
-
"version": "0.46.
|
|
3
|
+
"version": "0.46.8-beta",
|
|
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",
|
package/ui/routes/updates.js
CHANGED
|
@@ -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
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
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 (
|
|
244
|
+
if (targetVersion) {
|
|
216
245
|
// Pre-cache the package before showing notification
|
|
217
|
-
|
|
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(
|
|
259
|
+
console.log(`[update-check] update available: ${targetVersion} (${targetChannel})`);
|
|
232
260
|
return {
|
|
233
261
|
updateAvailable: true,
|
|
234
262
|
installedVersion,
|
|
235
|
-
latestVersion:
|
|
236
|
-
sourceVersion:
|
|
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
|
|
271
|
+
// No update available
|
|
244
272
|
return {
|
|
245
273
|
updateAvailable: false,
|
|
246
274
|
installedVersion,
|
|
247
|
-
latestVersion:
|
|
248
|
-
sourceVersion:
|
|
275
|
+
latestVersion: stableVersion || installedVersion,
|
|
276
|
+
sourceVersion: stableVersion || installedVersion,
|
|
249
277
|
installDir: manager.installDir
|
|
250
278
|
};
|
|
251
279
|
}
|