@liangjie559567/ultrapower 5.5.10 → 5.5.11
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.
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
{
|
|
9
9
|
"name": "ultrapower",
|
|
10
10
|
"description": "Disciplined multi-agent orchestration: workflow enforcement + parallel execution",
|
|
11
|
-
"version": "5.5.
|
|
11
|
+
"version": "5.5.11",
|
|
12
12
|
"source": {
|
|
13
13
|
"source": "npm",
|
|
14
14
|
"package": "@liangjie559567/ultrapower",
|
|
15
|
-
"version": "5.5.
|
|
15
|
+
"version": "5.5.11"
|
|
16
16
|
},
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "liangjie559567"
|
package/package.json
CHANGED
package/scripts/plugin-setup.mjs
CHANGED
|
@@ -280,6 +280,33 @@ function fixNpmCache() {
|
|
|
280
280
|
|
|
281
281
|
fixNpmCache();
|
|
282
282
|
|
|
283
|
+
// Fix: Claude Code's npm-cache/package.json stores a semver range (e.g. "^5.2.3") after first install.
|
|
284
|
+
// On subsequent "Update now" clicks, the installer sees the range is satisfied by the cached version
|
|
285
|
+
// and skips re-downloading — so users stay on the old version forever.
|
|
286
|
+
// We overwrite the range with the exact current version to force a fresh download on next update.
|
|
287
|
+
function fixNpmCacheVersion() {
|
|
288
|
+
try {
|
|
289
|
+
const npmCachePkgPath = join(CLAUDE_DIR, 'plugins', 'npm-cache', 'package.json');
|
|
290
|
+
if (!existsSync(npmCachePkgPath)) return;
|
|
291
|
+
const cachePkg = JSON.parse(readFileSync(npmCachePkgPath, 'utf-8'));
|
|
292
|
+
const dep = cachePkg?.dependencies?.['@liangjie559567/ultrapower'];
|
|
293
|
+
if (!dep) return;
|
|
294
|
+
// Read current version from this package's own package.json
|
|
295
|
+
const selfPkgPath = join(__dirname, '..', 'package.json');
|
|
296
|
+
if (!existsSync(selfPkgPath)) return;
|
|
297
|
+
const selfPkg = JSON.parse(readFileSync(selfPkgPath, 'utf-8'));
|
|
298
|
+
const currentVersion = selfPkg.version;
|
|
299
|
+
if (!currentVersion || dep === currentVersion) return;
|
|
300
|
+
cachePkg.dependencies['@liangjie559567/ultrapower'] = currentVersion;
|
|
301
|
+
writeFileSync(npmCachePkgPath, JSON.stringify(cachePkg, null, 2));
|
|
302
|
+
console.log(`[OMC] Updated npm-cache version range: ${dep} -> ${currentVersion} (fixes "Update now" skipping re-download)`);
|
|
303
|
+
} catch (e) {
|
|
304
|
+
console.log('[OMC] Warning: Could not fix npm-cache version:', e.message);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
fixNpmCacheVersion();
|
|
309
|
+
|
|
283
310
|
// Fix: npm install strips hidden directories (starting with '.'), so .claude-plugin/plugin.json
|
|
284
311
|
// is never extracted to the plugin cache. We recreate it directly in the plugin cache.
|
|
285
312
|
// The postinstall script runs from the npm-cache node_modules dir, so we must target the
|