@snapcommit/cli 1.1.0 → 1.1.1

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/dist/repl.js CHANGED
@@ -30,17 +30,20 @@ async function startREPL() {
30
30
  process.exit(1);
31
31
  }
32
32
  console.log(chalk_1.default.green(`✅ Logged in as ${chalk_1.default.bold(authConfig.email)}\n`));
33
- // Check for updates (non-blocking)
33
+ // Check for updates (non-blocking, but show result)
34
34
  (0, version_1.checkForUpdates)().then(updateInfo => {
35
35
  if (updateInfo && updateInfo.hasUpdate) {
36
- console.log(chalk_1.default.yellow.bold('╔════════════════════════════════════════╗'));
36
+ console.log(chalk_1.default.yellow.bold('\n╔════════════════════════════════════════╗'));
37
37
  console.log(chalk_1.default.yellow.bold('║ 🚀 UPDATE AVAILABLE! ║'));
38
38
  console.log(chalk_1.default.yellow.bold('╚════════════════════════════════════════╝'));
39
39
  console.log(chalk_1.default.white(` Current: ${chalk_1.default.red(updateInfo.currentVersion)} → Latest: ${chalk_1.default.green(updateInfo.latestVersion)}\n`));
40
- console.log(chalk_1.default.cyan(' Update now: ') + chalk_1.default.white('npm install -g @snapcommit/cli@latest\n'));
40
+ console.log(chalk_1.default.cyan.bold(' Update now: ') + chalk_1.default.white('npm install -g @snapcommit/cli@latest'));
41
+ console.log(chalk_1.default.gray(' (Faster AI, better UX, bug fixes!)\n'));
41
42
  }
42
- }).catch(() => {
43
+ }).catch((err) => {
43
44
  // Silent fail - don't interrupt user experience
45
+ // But log for debugging if needed
46
+ console.error('Version check failed:', err);
44
47
  });
45
48
  // Check GitHub connection status
46
49
  const githubConnected = (0, github_connect_1.isGitHubConnected)();
@@ -55,13 +55,14 @@ function getLatestVersionFromNpm(packageName) {
55
55
  return new Promise((resolve, reject) => {
56
56
  // Encode package name for URL (handles scoped packages like @snapcommit/cli)
57
57
  const encodedName = packageName.replace('/', '%2F');
58
- https_1.default.get(`https://registry.npmjs.org/${encodedName}/latest`, (res) => {
58
+ https_1.default.get(`https://registry.npmjs.org/${encodedName}`, (res) => {
59
59
  let data = '';
60
60
  res.on('data', (chunk) => data += chunk);
61
61
  res.on('end', () => {
62
62
  try {
63
63
  const json = JSON.parse(data);
64
- resolve(json.version);
64
+ // Get the latest version from dist-tags
65
+ resolve(json['dist-tags']?.latest || json.version);
65
66
  }
66
67
  catch {
67
68
  reject(new Error('Failed to parse npm response'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapcommit/cli",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Instant AI commits. Beautiful progress tracking. Never write commit messages again.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {