@ze-norm/cli 0.11.0 → 0.11.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"self-update.d.ts","sourceRoot":"","sources":["../../src/util/self-update.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"self-update.d.ts","sourceRoot":"","sources":["../../src/util/self-update.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA4ElE"}
|
package/dist/util/self-update.js
CHANGED
|
@@ -98,7 +98,16 @@ export async function armSelfUpdate(notify) {
|
|
|
98
98
|
}
|
|
99
99
|
// Detached, non-blocking. Outlives this process; the upgrade lands for the
|
|
100
100
|
// next invocation. stdio ignored so it can't corrupt this command's output.
|
|
101
|
-
|
|
101
|
+
//
|
|
102
|
+
// `--prefer-online`: revalidate cached registry metadata instead of
|
|
103
|
+
// trusting it. An auto-updater's whole job is fetching the newest version,
|
|
104
|
+
// so stale local packument metadata is exactly the wrong thing to trust —
|
|
105
|
+
// without this, an install attempted shortly after a publish can serve a
|
|
106
|
+
// cached packument that predates the new version and fail with ETARGET
|
|
107
|
+
// (silently, since stdio is ignored), then the single-flight marker blocks
|
|
108
|
+
// retries until it ages out. Forcing a metadata revalidation closes that
|
|
109
|
+
// post-publish race.
|
|
110
|
+
const child = spawn("npm", ["install", "-g", "--prefer-online", `${PACKAGE_NAME}@${update.latest}`], {
|
|
102
111
|
detached: true,
|
|
103
112
|
stdio: "ignore",
|
|
104
113
|
});
|