@shllg/emend 0.3.0 → 0.4.0

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/emend.mjs CHANGED
@@ -2940,7 +2940,7 @@ var VERSION;
2940
2940
  var init_version2 = __esm({
2941
2941
  "src/version.ts"() {
2942
2942
  "use strict";
2943
- VERSION = "0.3.0";
2943
+ VERSION = "0.4.0";
2944
2944
  }
2945
2945
  });
2946
2946
 
@@ -30392,6 +30392,10 @@ var init_blob_read = __esm({
30392
30392
  BlobReadCache = class {
30393
30393
  verified = /* @__PURE__ */ new Set();
30394
30394
  verifying = /* @__PURE__ */ new Map();
30395
+ verifiedLimit;
30396
+ constructor({ verifiedLimit = VERIFIED_LIMIT } = {}) {
30397
+ this.verifiedLimit = verifiedLimit;
30398
+ }
30395
30399
  /** Tests inspect FIFO eviction through a snapshot so they cannot mutate the live cache. */
30396
30400
  verifiedKeysForTesting() {
30397
30401
  return [...this.verified];
@@ -30420,7 +30424,7 @@ var init_blob_read = __esm({
30420
30424
  pending2 = verify(handle3, sha, size, key3).then((valid2) => {
30421
30425
  if (valid2) {
30422
30426
  this.verified.add(key3);
30423
- if (this.verified.size > VERIFIED_LIMIT) {
30427
+ if (this.verified.size > this.verifiedLimit) {
30424
30428
  const oldest = this.verified.values().next().value;
30425
30429
  if (oldest !== void 0) this.verified.delete(oldest);
30426
30430
  }