billion-context 0.1.5 → 0.1.6
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/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3185,6 +3185,7 @@ var THROTTLE_FILE = path4.join(cacheDir(), ".update-check");
|
|
|
3185
3185
|
var SEMVER_RE = /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z-.]+)?$/;
|
|
3186
3186
|
var timer;
|
|
3187
3187
|
var inFlight = false;
|
|
3188
|
+
var notified = /* @__PURE__ */ new Set();
|
|
3188
3189
|
function parseVersion(v) {
|
|
3189
3190
|
return v.replace(/^v/, "").split(".").map((n) => parseInt(n, 10) || 0);
|
|
3190
3191
|
}
|
|
@@ -3231,12 +3232,15 @@ async function checkForUpdate(opts, force = false) {
|
|
|
3231
3232
|
const data = await res.json();
|
|
3232
3233
|
const latest = data.version;
|
|
3233
3234
|
if (!latest || !isNewer(latest, opts.currentVersion)) return;
|
|
3235
|
+
if (notified.has(latest)) return;
|
|
3234
3236
|
const installed = await installLatest(opts.packageName, latest);
|
|
3235
3237
|
if (installed) {
|
|
3238
|
+
notified.add(latest);
|
|
3236
3239
|
console.error(
|
|
3237
3240
|
`\x1B[32m\u2714 ${opts.packageName} auto-updated ${opts.currentVersion} \u2192 ${latest}. Restart bili to finish.\x1B[0m`
|
|
3238
3241
|
);
|
|
3239
3242
|
} else {
|
|
3243
|
+
notified.add(latest);
|
|
3240
3244
|
console.error(
|
|
3241
3245
|
`\x1B[33m${opts.packageName} ${latest} is available (you have ${opts.currentVersion}). Update with: npm install -g ${opts.packageName}@latest\x1B[0m`
|
|
3242
3246
|
);
|