fix(coding-agent): install checked pi update version
This commit is contained in:
@@ -188,6 +188,29 @@ describe("detectInstallMethod", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("self-updates exact npm versions without uninstalling the current package", () => {
|
||||
const { prefix } = createNpmPrefixInstall();
|
||||
|
||||
const command = getSelfUpdateCommand("@earendil-works/pi-coding-agent", undefined, {
|
||||
packageName: "@earendil-works/pi-coding-agent",
|
||||
installSpec: "@earendil-works/pi-coding-agent@1.2.3",
|
||||
});
|
||||
|
||||
expect(command).toEqual({
|
||||
command: "npm",
|
||||
args: [
|
||||
"--prefix",
|
||||
prefix,
|
||||
"install",
|
||||
"-g",
|
||||
"--ignore-scripts",
|
||||
"--min-release-age=0",
|
||||
"@earendil-works/pi-coding-agent@1.2.3",
|
||||
],
|
||||
display: `npm --prefix ${prefix} install -g --ignore-scripts --min-release-age=0 @earendil-works/pi-coding-agent@1.2.3`,
|
||||
});
|
||||
});
|
||||
|
||||
test("self-updates renamed packages from the current install prefix", () => {
|
||||
const { prefix } = createNpmPrefixInstall();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user