toga-ai 1.0.22 → 1.0.23

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/package.json +1 -1
  2. package/scripts/install.js +6 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "TOGA Technology Team Claude Knowledge System — shared AI coding harness with skills, knowledge base CLI, and project installer for Claude Code.",
5
5
  "keywords": [
6
6
  "claude",
@@ -510,22 +510,16 @@ function main() {
510
510
 
511
511
  const bundleVersion = getBundleVersion();
512
512
 
513
- // Warn if running a stale npx-cached version (common Windows problem).
514
- // Skip during --post-install (npm already ran the right version).
513
+ // Auto-upgrade if npx served a stale cached version (common on Windows).
514
+ // Skip during --post-install npm already ensured the right version.
515
515
  if (!isPostInstall) {
516
516
  const latestVersion = getLatestNpmVersion();
517
517
  if (latestVersion && semverLt(bundleVersion, latestVersion)) {
518
518
  console.log('');
519
- console.log(' STALE VERSION DETECTED');
520
- console.log('═════════════════════════════════════════════');
521
- console.log(' You are running toga-ai@' + bundleVersion + ' but toga-ai@' + latestVersion + ' is available.');
522
- console.log(' Your npx cache has an old version. Run the following to fix it:');
523
- console.log('');
524
- console.log(' npm cache clean --force');
525
- console.log(' npx toga-ai@latest');
526
- console.log('');
527
- console.log(' (This is a common npx caching issue on Windows.)');
528
- process.exit(1);
519
+ console.log(' Stale version detected (toga-ai@' + bundleVersion + ' → toga-ai@' + latestVersion + '). Auto-upgrading...');
520
+ const upgradeArgs = ['toga-ai@' + latestVersion, '--yes'].concat(args);
521
+ const upgrade = spawnSync('npx', upgradeArgs, { stdio: 'inherit', shell: process.platform === 'win32' });
522
+ process.exit(upgrade.status ?? 0);
529
523
  }
530
524
  }
531
525