universal-dev-standards 3.5.0-beta.20 → 3.5.0-beta.21
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/package.json +1 -1
- package/src/utils/github.js +73 -2
- package/standards-registry.json +3 -3
package/package.json
CHANGED
package/src/utils/github.js
CHANGED
|
@@ -453,9 +453,51 @@ export function installSkillToDir(skillName, targetBaseDir) {
|
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
+
/**
|
|
457
|
+
* Compare two semantic versions for sorting
|
|
458
|
+
* @param {string} a - First version
|
|
459
|
+
* @param {string} b - Second version
|
|
460
|
+
* @returns {number} -1, 0, or 1
|
|
461
|
+
*/
|
|
462
|
+
function compareVersionsForSort(a, b) {
|
|
463
|
+
const parseVersion = (v) => {
|
|
464
|
+
const [main, prerelease] = v.split('-');
|
|
465
|
+
const [major, minor, patch] = main.split('.').map(Number);
|
|
466
|
+
return { major, minor, patch, prerelease: prerelease || null };
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
const pa = parseVersion(a);
|
|
470
|
+
const pb = parseVersion(b);
|
|
471
|
+
|
|
472
|
+
if (pa.major !== pb.major) return pa.major - pb.major;
|
|
473
|
+
if (pa.minor !== pb.minor) return pa.minor - pb.minor;
|
|
474
|
+
if (pa.patch !== pb.patch) return pa.patch - pb.patch;
|
|
475
|
+
|
|
476
|
+
// No prerelease > prerelease
|
|
477
|
+
if (!pa.prerelease && pb.prerelease) return 1;
|
|
478
|
+
if (pa.prerelease && !pb.prerelease) return -1;
|
|
479
|
+
if (!pa.prerelease && !pb.prerelease) return 0;
|
|
480
|
+
|
|
481
|
+
// Compare prerelease (beta.1 < beta.2)
|
|
482
|
+
const parsePrerelease = (pr) => {
|
|
483
|
+
const match = pr.match(/^(alpha|beta|rc)\.?(\d+)?$/);
|
|
484
|
+
if (match) {
|
|
485
|
+
const order = { alpha: 1, beta: 2, rc: 3 };
|
|
486
|
+
return { type: order[match[1]] || 0, num: parseInt(match[2] || '0', 10) };
|
|
487
|
+
}
|
|
488
|
+
return { type: 0, num: 0 };
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
const pra = parsePrerelease(pa.prerelease);
|
|
492
|
+
const prb = parsePrerelease(pb.prerelease);
|
|
493
|
+
|
|
494
|
+
if (pra.type !== prb.type) return pra.type - prb.type;
|
|
495
|
+
return pra.num - prb.num;
|
|
496
|
+
}
|
|
497
|
+
|
|
456
498
|
/**
|
|
457
499
|
* Get Plugin Marketplace installed skills info
|
|
458
|
-
* Reads from ~/.claude/plugins/installed_plugins.json
|
|
500
|
+
* Reads from ~/.claude/plugins/installed_plugins.json and cache directory
|
|
459
501
|
* @returns {Object|null} Marketplace skills info or null
|
|
460
502
|
*/
|
|
461
503
|
export function getMarketplaceSkillsInfo() {
|
|
@@ -487,9 +529,38 @@ export function getMarketplaceSkillsInfo() {
|
|
|
487
529
|
}
|
|
488
530
|
|
|
489
531
|
const info = pluginInfo[0];
|
|
532
|
+
let version = info.version || 'unknown';
|
|
533
|
+
|
|
534
|
+
// installed_plugins.json may have stale version info
|
|
535
|
+
// Check the actual cache directory for the latest installed version
|
|
536
|
+
// pluginKey format: "universal-dev-standards@asia-ostrich"
|
|
537
|
+
const parts = pluginKey.split('@');
|
|
538
|
+
if (parts.length === 2) {
|
|
539
|
+
const [pluginName, marketplace] = parts;
|
|
540
|
+
const cacheDir = join(homedir(), '.claude', 'plugins', 'cache', marketplace, pluginName);
|
|
541
|
+
|
|
542
|
+
if (existsSync(cacheDir)) {
|
|
543
|
+
try {
|
|
544
|
+
const versions = readdirSync(cacheDir)
|
|
545
|
+
.filter(name => name.match(/^\d+\.\d+\.\d+/));
|
|
546
|
+
|
|
547
|
+
if (versions.length > 0) {
|
|
548
|
+
// Sort versions and get the latest
|
|
549
|
+
versions.sort(compareVersionsForSort);
|
|
550
|
+
const latestVersion = versions[versions.length - 1];
|
|
551
|
+
if (latestVersion && latestVersion !== version) {
|
|
552
|
+
version = latestVersion;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
} catch {
|
|
556
|
+
// Ignore errors reading cache directory
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
490
561
|
return {
|
|
491
562
|
installed: true,
|
|
492
|
-
version
|
|
563
|
+
version,
|
|
493
564
|
installPath: info.installPath || null,
|
|
494
565
|
installedAt: info.installedAt || null,
|
|
495
566
|
lastUpdated: info.lastUpdated || null,
|
package/standards-registry.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"version": "3.5.0-beta.
|
|
3
|
+
"version": "3.5.0-beta.21",
|
|
4
4
|
"lastUpdated": "2026-01-14",
|
|
5
5
|
"description": "Standards registry for universal-dev-standards with integrated skills and AI-optimized formats",
|
|
6
6
|
"formats": {
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"standards": {
|
|
49
49
|
"name": "universal-dev-standards",
|
|
50
50
|
"url": "https://github.com/AsiaOstrich/universal-dev-standards",
|
|
51
|
-
"version": "3.5.0-beta.
|
|
51
|
+
"version": "3.5.0-beta.21"
|
|
52
52
|
},
|
|
53
53
|
"skills": {
|
|
54
54
|
"name": "universal-dev-standards",
|
|
55
55
|
"url": "https://github.com/AsiaOstrich/universal-dev-standards",
|
|
56
56
|
"localPath": "skills/claude-code",
|
|
57
57
|
"rawUrl": "https://raw.githubusercontent.com/AsiaOstrich/universal-dev-standards/main/skills/claude-code",
|
|
58
|
-
"version": "3.5.0-beta.
|
|
58
|
+
"version": "3.5.0-beta.21",
|
|
59
59
|
"note": "Skills are now included in the main repository under skills/"
|
|
60
60
|
}
|
|
61
61
|
},
|