@iseoane/agent-depot 0.6.12 → 0.6.13
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/CHANGELOG.md +13 -0
- package/dist/src/self-update.js +9 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.6.13] - 2026-11-11
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- `self update` accepts a global npm install when Node is managed by mise (for
|
|
15
|
+
example on Omarchy), where `npm` is a wrapper script instead of a link to
|
|
16
|
+
`npm-cli.js`. The npm next to the wrapper must be verifiable and npm's global
|
|
17
|
+
directory must still contain this exact installation (#102).
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Development only: release checks pass on Windows without touching real state (#101).
|
|
22
|
+
|
|
10
23
|
## [0.6.12] - 2026-11-09
|
|
11
24
|
|
|
12
25
|
### Changed
|
package/dist/src/self-update.js
CHANGED
|
@@ -66,6 +66,9 @@ function successfulStdout(result) {
|
|
|
66
66
|
return undefined;
|
|
67
67
|
return result.stdout.toString("utf8").trim();
|
|
68
68
|
}
|
|
69
|
+
function isNpmCli(target) {
|
|
70
|
+
return target !== undefined && path.basename(target) === "npm-cli.js" && path.basename(path.dirname(target)) === "bin" && path.basename(path.dirname(path.dirname(target))) === "npm";
|
|
71
|
+
}
|
|
69
72
|
export function createSelfUpdateOperations(options) {
|
|
70
73
|
const resolveExecutable = options.resolveExecutable ?? createPortableExecutableResolver();
|
|
71
74
|
const platform = options.platform ?? process.platform;
|
|
@@ -79,8 +82,12 @@ export function createSelfUpdateOperations(options) {
|
|
|
79
82
|
const verifiedFile = platform === "win32" && path.basename(npm.executable).toLowerCase() === "npm.cmd"
|
|
80
83
|
? path.join(path.dirname(npm.executable), "node_modules", "npm", "bin", "npm-cli.js")
|
|
81
84
|
: npm.executable;
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
let target = await realpath(verifiedFile).catch(() => undefined);
|
|
86
|
+
// mise replaces `<prefix>/bin/npm` with a script that runs `<prefix>/lib/node_modules/npm/bin/npm-cli.js`.
|
|
87
|
+
if (!isNpmCli(target) && platform !== "win32" && target !== undefined && path.basename(npm.executable) === "npm") {
|
|
88
|
+
target = await realpath(path.join(path.dirname(target), "..", "lib", "node_modules", "npm", "bin", "npm-cli.js")).catch(() => undefined);
|
|
89
|
+
}
|
|
90
|
+
if (!isNpmCli(target))
|
|
84
91
|
return undefined;
|
|
85
92
|
let rootResult;
|
|
86
93
|
try {
|