impeccable 2.1.4 → 2.1.5

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.
@@ -60,26 +60,18 @@ async function showHelp() {
60
60
 
61
61
  // ─── version helpers ─────────────────────────────────────────────────────────
62
62
 
63
- function getLocalVersion() {
64
- try {
65
- const pkg = JSON.parse(readFileSync(join(__dirname, '..', '..', 'package.json'), 'utf-8'));
66
- return pkg.version;
67
- } catch {
68
- return null;
63
+ /**
64
+ * Read the skills version from the impeccable SKILL.md frontmatter.
65
+ */
66
+ function getSkillsVersion(root) {
67
+ for (const d of PROVIDER_DIRS) {
68
+ const skillMd = join(root, d, 'skills', 'impeccable', 'SKILL.md');
69
+ if (!existsSync(skillMd)) continue;
70
+ const content = readFileSync(skillMd, 'utf-8');
71
+ const match = content.match(/^version:\s*(.+)$/m);
72
+ if (match) return match[1].trim().replace(/^["']|["']$/g, '');
69
73
  }
70
- }
71
-
72
- function fetchRemoteVersion() {
73
- return new Promise((resolve) => {
74
- get('https://registry.npmjs.org/impeccable/latest', (res) => {
75
- if (res.statusCode !== 200) { resolve(null); res.resume(); return; }
76
- let data = '';
77
- res.on('data', (chunk) => { data += chunk; });
78
- res.on('end', () => {
79
- try { resolve(JSON.parse(data).version); } catch { resolve(null); }
80
- });
81
- }).on('error', () => resolve(null));
82
- });
74
+ return null;
83
75
  }
84
76
 
85
77
  /**
@@ -119,7 +111,9 @@ async function downloadAndExtractBundle() {
119
111
  * (e.g. .agents vs .claude), so we strip those differences.
120
112
  */
121
113
  function normalizeForHash(content) {
122
- return content.replace(/\.(claude|cursor|agents|gemini|codex|kiro|opencode|pi|trae|trae-cn|rovodev)\/skills\//g, '.PROVIDER/skills/');
114
+ return content
115
+ .replace(/\.(claude|cursor|agents|gemini|codex|kiro|opencode|pi|trae|trae-cn|rovodev)\/skills\//g, '.PROVIDER/skills/')
116
+ .replace(/^version:\s*.+$/m, 'version: NORMALIZED');
123
117
  }
124
118
 
125
119
  /**
@@ -164,7 +158,6 @@ async function check() {
164
158
  }
165
159
 
166
160
  const providers = findInstalledProviders(root);
167
- const version = getLocalVersion();
168
161
 
169
162
  console.log('Checking for updates...\n');
170
163
  try {
@@ -173,9 +166,10 @@ async function check() {
173
166
  rmSync(bundleDir, { recursive: true, force: true });
174
167
 
175
168
  if (upToDate) {
176
- console.log(`Skills are up to date${version ? ` (v${version})` : ''}.`);
169
+ const v = getSkillsVersion(root);
170
+ console.log(`Skills are up to date${v ? ` (v${v})` : ''}.`);
177
171
  } else {
178
- console.log(`Updates available${version ? ` (currently v${version})` : ''}.`);
172
+ console.log('Updates available.');
179
173
  console.log('Run `npx impeccable skills update` to update.');
180
174
  }
181
175
  } catch (e) {
@@ -534,8 +528,8 @@ async function update(flags = []) {
534
528
  // Compare local vs remote -- skip if already up to date
535
529
  if (!yes && isUpToDate(root, providers, tmpDir)) {
536
530
  rmSync(tmpDir, { recursive: true, force: true });
537
- const version = getLocalVersion();
538
- console.log(`Skills are up to date${version ? ` (v${version})` : ''}. Nothing to do.`);
531
+ const v = getSkillsVersion(root);
532
+ console.log(`Skills are up to date${v ? ` (v${v})` : ''}. Nothing to do.`);
539
533
  process.exit(0);
540
534
  }
541
535
 
@@ -587,8 +581,8 @@ async function update(flags = []) {
587
581
  // Not available -- skip
588
582
  }
589
583
 
590
- const version = await fetchRemoteVersion();
591
- console.log(`Updated ${updated} skills across ${providers.length} provider(s)${version ? ` to v${version}` : ''}.`);
584
+ const v = getSkillsVersion(root);
585
+ console.log(`Updated ${updated} skills across ${providers.length} provider(s)${v ? ` to v${v}` : ''}.`);
592
586
  console.log('Done!\n');
593
587
  } catch (e) {
594
588
  console.error(`Update failed: ${e.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impeccable",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
4
  "author": "Paul Bakaus",
5
5
  "description": "Design skills, commands, and anti-pattern detection for AI coding agents",
6
6
  "keywords": [