@kybernesis/create 0.15.4 → 0.15.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.
- package/dist/upgrade.js +20 -2
- package/package.json +1 -1
package/dist/upgrade.js
CHANGED
|
@@ -977,10 +977,28 @@ export async function upgrade(options = {}) {
|
|
|
977
977
|
// reason rewriteManifest pins it: npm would save a caret by default.
|
|
978
978
|
const eveChange = changed.find((spec) => spec.startsWith("eve@"));
|
|
979
979
|
const others = changed.filter((spec) => spec !== eveChange);
|
|
980
|
+
/**
|
|
981
|
+
* A third-party extension whose declared peer range trails the certified
|
|
982
|
+
* eve (the Vercel-owned @github-tools/eve-extension and @agent-browser/eve
|
|
983
|
+
* both do) makes npm's default resolver ERESOLVE before it will write a
|
|
984
|
+
* tree at all. That is not a reason to abort the upgrade: retry the same
|
|
985
|
+
* install with --legacy-peer-deps so the tree is written, then let
|
|
986
|
+
* assessPeerTree below judge WHO actually objects. A @kybernesis or root
|
|
987
|
+
* conflict still stops everything; only a stale third-party edge is
|
|
988
|
+
* tolerated (same principle as the KYB-548 peer-tree gate). KYB-561.
|
|
989
|
+
*/
|
|
990
|
+
const npmInstall = (args) => {
|
|
991
|
+
let result = commandResult("npm", args, cwd);
|
|
992
|
+
if (result.status !== 0 && /ERESOLVE/i.test(`${result.stdout}\n${result.stderr}`)) {
|
|
993
|
+
console.log(yellow("\n ! npm reported a peer conflict. Retrying with --legacy-peer-deps so the installed peer tree can be assessed."));
|
|
994
|
+
result = commandResult("npm", [...args, "--legacy-peer-deps"], cwd);
|
|
995
|
+
}
|
|
996
|
+
return result;
|
|
997
|
+
};
|
|
980
998
|
const installArgs = cleanInstall ? ["install"] : ["install", ...others];
|
|
981
|
-
let installed = cleanInstall || others.length > 0 ?
|
|
999
|
+
let installed = cleanInstall || others.length > 0 ? npmInstall(installArgs) : { status: 0, stdout: "", stderr: "" };
|
|
982
1000
|
if (installed.status === 0 && !cleanInstall && eveChange) {
|
|
983
|
-
installed =
|
|
1001
|
+
installed = npmInstall(["install", "--save-exact", eveChange]);
|
|
984
1002
|
}
|
|
985
1003
|
if (installed.status !== 0) {
|
|
986
1004
|
const output = `${installed.stdout}\n${installed.stderr}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kybernesis/create",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.5",
|
|
4
4
|
"description": "The Kybernesis agent scaffolder and FDE toolkit: one command to a governed, remembering, multiplayer, self-testing eve agent — plus doctor and upgrade.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|