semantic-release-lerna 2.18.2 → 2.18.4
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 +311 -280
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2469,56 +2469,39 @@ var require_semver2 = __commonJS({
|
|
|
2469
2469
|
var require_index_min = __commonJS({
|
|
2470
2470
|
"node_modules/hosted-git-info/node_modules/lru-cache/dist/commonjs/index.min.js"(exports) {
|
|
2471
2471
|
"use strict";
|
|
2472
|
+
var G = (c3, t) => () => (t || c3((t = { exports: {} }).exports, t), t.exports);
|
|
2473
|
+
var M = G((O) => {
|
|
2474
|
+
"use strict";
|
|
2475
|
+
Object.defineProperty(O, "__esModule", { value: true });
|
|
2476
|
+
O.tracing = O.metrics = void 0;
|
|
2477
|
+
var L = __require("node:diagnostics_channel");
|
|
2478
|
+
O.metrics = (0, L.channel)("lru-cache:metrics");
|
|
2479
|
+
O.tracing = (0, L.tracingChannel)("lru-cache");
|
|
2480
|
+
});
|
|
2472
2481
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2473
2482
|
exports.LRUCache = void 0;
|
|
2474
|
-
var
|
|
2483
|
+
var u2 = M();
|
|
2484
|
+
var D = () => u2.metrics.hasSubscribers || u2.tracing.hasSubscribers;
|
|
2485
|
+
var P = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
|
|
2475
2486
|
var U = /* @__PURE__ */ new Set();
|
|
2476
|
-
var
|
|
2477
|
-
var
|
|
2478
|
-
typeof
|
|
2479
|
-
};
|
|
2480
|
-
var
|
|
2481
|
-
var
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
onabort;
|
|
2485
|
-
_onabort = [];
|
|
2486
|
-
reason;
|
|
2487
|
-
aborted = false;
|
|
2488
|
-
addEventListener(i2, s) {
|
|
2489
|
-
this._onabort.push(s);
|
|
2490
|
-
}
|
|
2491
|
-
}, C = class {
|
|
2492
|
-
constructor() {
|
|
2493
|
-
t();
|
|
2494
|
-
}
|
|
2495
|
-
signal = new L();
|
|
2496
|
-
abort(i2) {
|
|
2497
|
-
if (!this.signal.aborted) {
|
|
2498
|
-
this.signal.reason = i2, this.signal.aborted = true;
|
|
2499
|
-
for (let s of this.signal._onabort) s(i2);
|
|
2500
|
-
this.signal.onabort?.(i2);
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2503
|
-
};
|
|
2504
|
-
let c3 = R.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t = () => {
|
|
2505
|
-
c3 && (c3 = false, I("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", t));
|
|
2506
|
-
};
|
|
2507
|
-
}
|
|
2508
|
-
var x = (c3) => !U.has(c3);
|
|
2509
|
-
var y = (c3) => c3 && c3 === Math.floor(c3) && c3 > 0 && isFinite(c3);
|
|
2510
|
-
var M = (c3) => y(c3) ? c3 <= Math.pow(2, 8) ? Uint8Array : c3 <= Math.pow(2, 16) ? Uint16Array : c3 <= Math.pow(2, 32) ? Uint32Array : c3 <= Number.MAX_SAFE_INTEGER ? z : null : null;
|
|
2511
|
-
var z = class extends Array {
|
|
2487
|
+
var j = typeof process == "object" && process ? process : {};
|
|
2488
|
+
var H = (c3, t, e, i2) => {
|
|
2489
|
+
typeof j.emitWarning == "function" ? j.emitWarning(c3, t, e, i2) : console.error(`[${e}] ${t}: ${c3}`);
|
|
2490
|
+
};
|
|
2491
|
+
var N = (c3) => !U.has(c3);
|
|
2492
|
+
var F = (c3) => !!c3 && c3 === Math.floor(c3) && c3 > 0 && isFinite(c3);
|
|
2493
|
+
var I = (c3) => F(c3) ? c3 <= Math.pow(2, 8) ? Uint8Array : c3 <= Math.pow(2, 16) ? Uint16Array : c3 <= Math.pow(2, 32) ? Uint32Array : c3 <= Number.MAX_SAFE_INTEGER ? W : null : null;
|
|
2494
|
+
var W = class extends Array {
|
|
2512
2495
|
constructor(t) {
|
|
2513
2496
|
super(t), this.fill(0);
|
|
2514
2497
|
}
|
|
2515
2498
|
};
|
|
2516
|
-
var
|
|
2499
|
+
var C = class c3 {
|
|
2517
2500
|
heap;
|
|
2518
2501
|
length;
|
|
2519
2502
|
static #o = false;
|
|
2520
2503
|
static create(t) {
|
|
2521
|
-
let e =
|
|
2504
|
+
let e = I(t);
|
|
2522
2505
|
if (!e) return [];
|
|
2523
2506
|
c3.#o = true;
|
|
2524
2507
|
let i2 = new c3(t, e);
|
|
@@ -2535,17 +2518,17 @@ var require_index_min = __commonJS({
|
|
|
2535
2518
|
return this.heap[--this.length];
|
|
2536
2519
|
}
|
|
2537
2520
|
};
|
|
2538
|
-
var
|
|
2521
|
+
var x = class c3 {
|
|
2539
2522
|
#o;
|
|
2540
2523
|
#c;
|
|
2524
|
+
#m;
|
|
2525
|
+
#D;
|
|
2541
2526
|
#w;
|
|
2542
|
-
#
|
|
2527
|
+
#M;
|
|
2528
|
+
#j;
|
|
2543
2529
|
#S;
|
|
2544
|
-
#L;
|
|
2545
|
-
#U;
|
|
2546
|
-
#m;
|
|
2547
2530
|
get perf() {
|
|
2548
|
-
return this.#
|
|
2531
|
+
return this.#S;
|
|
2549
2532
|
}
|
|
2550
2533
|
ttl;
|
|
2551
2534
|
ttlResolution;
|
|
@@ -2563,30 +2546,30 @@ var require_index_min = __commonJS({
|
|
|
2563
2546
|
allowStaleOnFetchRejection;
|
|
2564
2547
|
ignoreFetchAbort;
|
|
2565
2548
|
#n;
|
|
2566
|
-
#
|
|
2549
|
+
#b;
|
|
2567
2550
|
#s;
|
|
2568
2551
|
#i;
|
|
2569
2552
|
#t;
|
|
2570
|
-
#a;
|
|
2571
|
-
#u;
|
|
2572
2553
|
#l;
|
|
2554
|
+
#u;
|
|
2555
|
+
#a;
|
|
2573
2556
|
#h;
|
|
2574
|
-
#b;
|
|
2575
|
-
#r;
|
|
2576
2557
|
#y;
|
|
2577
|
-
#
|
|
2558
|
+
#r;
|
|
2559
|
+
#_;
|
|
2560
|
+
#F;
|
|
2578
2561
|
#d;
|
|
2579
2562
|
#g;
|
|
2580
2563
|
#T;
|
|
2581
|
-
#
|
|
2564
|
+
#O;
|
|
2582
2565
|
#f;
|
|
2583
|
-
#
|
|
2566
|
+
#U;
|
|
2584
2567
|
static unsafeExposeInternals(t) {
|
|
2585
|
-
return { starts: t.#
|
|
2586
|
-
return t.#
|
|
2568
|
+
return { starts: t.#F, ttls: t.#d, autopurgeTimers: t.#g, sizes: t.#_, keyMap: t.#s, keyList: t.#i, valList: t.#t, next: t.#l, prev: t.#u, get head() {
|
|
2569
|
+
return t.#a;
|
|
2587
2570
|
}, get tail() {
|
|
2588
2571
|
return t.#h;
|
|
2589
|
-
}, free: t.#
|
|
2572
|
+
}, free: t.#y, isBackgroundFetch: (e) => t.#e(e), backgroundFetch: (e, i2, s, n2) => t.#P(e, i2, s, n2), moveToTail: (e) => t.#L(e), indexes: (e) => t.#A(e), rindexes: (e) => t.#v(e), isStale: (e) => t.#p(e) };
|
|
2590
2573
|
}
|
|
2591
2574
|
get max() {
|
|
2592
2575
|
return this.#o;
|
|
@@ -2595,196 +2578,196 @@ var require_index_min = __commonJS({
|
|
|
2595
2578
|
return this.#c;
|
|
2596
2579
|
}
|
|
2597
2580
|
get calculatedSize() {
|
|
2598
|
-
return this.#
|
|
2581
|
+
return this.#b;
|
|
2599
2582
|
}
|
|
2600
2583
|
get size() {
|
|
2601
2584
|
return this.#n;
|
|
2602
2585
|
}
|
|
2603
2586
|
get fetchMethod() {
|
|
2604
|
-
return this.#
|
|
2587
|
+
return this.#M;
|
|
2605
2588
|
}
|
|
2606
2589
|
get memoMethod() {
|
|
2607
|
-
return this.#
|
|
2590
|
+
return this.#j;
|
|
2608
2591
|
}
|
|
2609
2592
|
get dispose() {
|
|
2610
|
-
return this.#
|
|
2593
|
+
return this.#m;
|
|
2611
2594
|
}
|
|
2612
2595
|
get onInsert() {
|
|
2613
|
-
return this.#
|
|
2596
|
+
return this.#D;
|
|
2614
2597
|
}
|
|
2615
2598
|
get disposeAfter() {
|
|
2616
|
-
return this.#
|
|
2599
|
+
return this.#w;
|
|
2617
2600
|
}
|
|
2618
2601
|
constructor(t) {
|
|
2619
|
-
let { max: e = 0, ttl: i2, ttlResolution: s = 1, ttlAutopurge: n2, updateAgeOnGet: o2, updateAgeOnHas:
|
|
2620
|
-
if (
|
|
2621
|
-
if (this.#
|
|
2622
|
-
let
|
|
2623
|
-
if (!
|
|
2624
|
-
if (this.#o = e, this.#c =
|
|
2602
|
+
let { max: e = 0, ttl: i2, ttlResolution: s = 1, ttlAutopurge: n2, updateAgeOnGet: o2, updateAgeOnHas: r, allowStale: h2, dispose: a2, onInsert: d, disposeAfter: f, noDisposeOnSet: p, noUpdateTTL: m, maxSize: T = 0, maxEntrySize: w = 0, sizeCalculation: y, fetchMethod: l, memoMethod: S, noDeleteOnFetchRejection: _, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: g, allowStaleOnFetchAbort: A, ignoreFetchAbort: v, perf: R } = t;
|
|
2603
|
+
if (R !== void 0 && typeof R?.now != "function") throw new TypeError("perf option must have a now() method if specified");
|
|
2604
|
+
if (this.#S = R ?? P, e !== 0 && !F(e)) throw new TypeError("max option must be a nonnegative integer");
|
|
2605
|
+
let z = e ? I(e) : Array;
|
|
2606
|
+
if (!z) throw new Error("invalid max value: " + e);
|
|
2607
|
+
if (this.#o = e, this.#c = T, this.maxEntrySize = w || this.#c, this.sizeCalculation = y, this.sizeCalculation) {
|
|
2625
2608
|
if (!this.#c && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
|
2626
2609
|
if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
|
|
2627
2610
|
}
|
|
2628
2611
|
if (S !== void 0 && typeof S != "function") throw new TypeError("memoMethod must be a function if defined");
|
|
2629
|
-
if (this.#
|
|
2630
|
-
if (this.#
|
|
2631
|
-
if (this.#c !== 0 && !
|
|
2632
|
-
if (!
|
|
2633
|
-
this.#
|
|
2612
|
+
if (this.#j = S, l !== void 0 && typeof l != "function") throw new TypeError("fetchMethod must be a function if specified");
|
|
2613
|
+
if (this.#M = l, this.#O = !!l, this.#s = /* @__PURE__ */ new Map(), this.#i = Array.from({ length: e }).fill(void 0), this.#t = Array.from({ length: e }).fill(void 0), this.#l = new z(e), this.#u = new z(e), this.#a = 0, this.#h = 0, this.#y = C.create(e), this.#n = 0, this.#b = 0, typeof a2 == "function" && (this.#m = a2), typeof d == "function" && (this.#D = d), typeof f == "function" ? (this.#w = f, this.#r = []) : (this.#w = void 0, this.#r = void 0), this.#T = !!this.#m, this.#U = !!this.#D, this.#f = !!this.#w, this.noDisposeOnSet = !!p, this.noUpdateTTL = !!m, this.noDeleteOnFetchRejection = !!_, this.allowStaleOnFetchRejection = !!g, this.allowStaleOnFetchAbort = !!A, this.ignoreFetchAbort = !!v, this.maxEntrySize !== 0) {
|
|
2614
|
+
if (this.#c !== 0 && !F(this.#c)) throw new TypeError("maxSize must be a positive integer if specified");
|
|
2615
|
+
if (!F(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
2616
|
+
this.#X();
|
|
2634
2617
|
}
|
|
2635
|
-
if (this.allowStale = !!
|
|
2636
|
-
if (!
|
|
2637
|
-
this.#
|
|
2618
|
+
if (this.allowStale = !!h2, this.noDeleteOnStaleGet = !!b, this.updateAgeOnGet = !!o2, this.updateAgeOnHas = !!r, this.ttlResolution = F(s) || s === 0 ? s : 1, this.ttlAutopurge = !!n2, this.ttl = i2 || 0, this.ttl) {
|
|
2619
|
+
if (!F(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
|
|
2620
|
+
this.#H();
|
|
2638
2621
|
}
|
|
2639
2622
|
if (this.#o === 0 && this.ttl === 0 && this.#c === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
2640
2623
|
if (!this.ttlAutopurge && !this.#o && !this.#c) {
|
|
2641
2624
|
let E = "LRU_CACHE_UNBOUNDED";
|
|
2642
|
-
|
|
2625
|
+
N(E) && (U.add(E), H("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", E, c3));
|
|
2643
2626
|
}
|
|
2644
2627
|
}
|
|
2645
2628
|
getRemainingTTL(t) {
|
|
2646
2629
|
return this.#s.has(t) ? 1 / 0 : 0;
|
|
2647
2630
|
}
|
|
2648
|
-
#
|
|
2649
|
-
let t = new
|
|
2650
|
-
this.#d = t, this.#
|
|
2651
|
-
let i2 = this.ttlAutopurge ?
|
|
2652
|
-
this.#g = i2, this.#N = (
|
|
2653
|
-
e[
|
|
2654
|
-
}, this.#R = (
|
|
2655
|
-
e[
|
|
2631
|
+
#H() {
|
|
2632
|
+
let t = new W(this.#o), e = new W(this.#o);
|
|
2633
|
+
this.#d = t, this.#F = e;
|
|
2634
|
+
let i2 = this.ttlAutopurge ? Array.from({ length: this.#o }) : void 0;
|
|
2635
|
+
this.#g = i2, this.#N = (r, h2, a2 = this.#S.now()) => {
|
|
2636
|
+
e[r] = h2 !== 0 ? a2 : 0, t[r] = h2, s(r, h2);
|
|
2637
|
+
}, this.#R = (r) => {
|
|
2638
|
+
e[r] = t[r] !== 0 ? this.#S.now() : 0, s(r, t[r]);
|
|
2656
2639
|
};
|
|
2657
|
-
let s = this.ttlAutopurge ? (
|
|
2658
|
-
if (i2?.[
|
|
2640
|
+
let s = this.ttlAutopurge ? (r, h2) => {
|
|
2641
|
+
if (i2?.[r] && (clearTimeout(i2[r]), i2[r] = void 0), h2 && h2 !== 0 && i2) {
|
|
2659
2642
|
let a2 = setTimeout(() => {
|
|
2660
|
-
this.#p(
|
|
2661
|
-
},
|
|
2662
|
-
a2.unref && a2.unref(), i2[
|
|
2643
|
+
this.#p(r) && this.#z(this.#i[r], "expire");
|
|
2644
|
+
}, h2 + 1);
|
|
2645
|
+
a2.unref && a2.unref(), i2[r] = a2;
|
|
2663
2646
|
}
|
|
2664
2647
|
} : () => {
|
|
2665
2648
|
};
|
|
2666
|
-
this.#
|
|
2667
|
-
if (t[
|
|
2668
|
-
let a2 = t[
|
|
2669
|
-
if (!a2 || !
|
|
2670
|
-
|
|
2671
|
-
let f =
|
|
2672
|
-
|
|
2649
|
+
this.#E = (r, h2) => {
|
|
2650
|
+
if (t[h2]) {
|
|
2651
|
+
let a2 = t[h2], d = e[h2];
|
|
2652
|
+
if (!a2 || !d) return;
|
|
2653
|
+
r.ttl = a2, r.start = d, r.now = n2 || o2();
|
|
2654
|
+
let f = r.now - d;
|
|
2655
|
+
r.remainingTTL = a2 - f;
|
|
2673
2656
|
}
|
|
2674
2657
|
};
|
|
2675
2658
|
let n2 = 0, o2 = () => {
|
|
2676
|
-
let
|
|
2659
|
+
let r = this.#S.now();
|
|
2677
2660
|
if (this.ttlResolution > 0) {
|
|
2678
|
-
n2 =
|
|
2679
|
-
let
|
|
2680
|
-
|
|
2661
|
+
n2 = r;
|
|
2662
|
+
let h2 = setTimeout(() => n2 = 0, this.ttlResolution);
|
|
2663
|
+
h2.unref && h2.unref();
|
|
2681
2664
|
}
|
|
2682
|
-
return
|
|
2665
|
+
return r;
|
|
2683
2666
|
};
|
|
2684
|
-
this.getRemainingTTL = (
|
|
2685
|
-
let
|
|
2686
|
-
if (
|
|
2687
|
-
let a2 = t[
|
|
2688
|
-
if (!a2 || !
|
|
2689
|
-
let f = (n2 || o2()) -
|
|
2667
|
+
this.getRemainingTTL = (r) => {
|
|
2668
|
+
let h2 = this.#s.get(r);
|
|
2669
|
+
if (h2 === void 0) return 0;
|
|
2670
|
+
let a2 = t[h2], d = e[h2];
|
|
2671
|
+
if (!a2 || !d) return 1 / 0;
|
|
2672
|
+
let f = (n2 || o2()) - d;
|
|
2690
2673
|
return a2 - f;
|
|
2691
|
-
}, this.#p = (
|
|
2692
|
-
let
|
|
2693
|
-
return !!a2 && !!
|
|
2674
|
+
}, this.#p = (r) => {
|
|
2675
|
+
let h2 = e[r], a2 = t[r];
|
|
2676
|
+
return !!a2 && !!h2 && (n2 || o2()) - h2 > a2;
|
|
2694
2677
|
};
|
|
2695
2678
|
}
|
|
2696
2679
|
#R = () => {
|
|
2697
2680
|
};
|
|
2698
|
-
#
|
|
2681
|
+
#E = () => {
|
|
2699
2682
|
};
|
|
2700
2683
|
#N = () => {
|
|
2701
2684
|
};
|
|
2702
2685
|
#p = () => false;
|
|
2703
|
-
#
|
|
2704
|
-
let t = new
|
|
2705
|
-
this.#
|
|
2706
|
-
this.#
|
|
2707
|
-
}, this.#
|
|
2686
|
+
#X() {
|
|
2687
|
+
let t = new W(this.#o);
|
|
2688
|
+
this.#b = 0, this.#_ = t, this.#C = (e) => {
|
|
2689
|
+
this.#b -= t[e], t[e] = 0;
|
|
2690
|
+
}, this.#k = (e, i2, s, n2) => {
|
|
2708
2691
|
if (this.#e(i2)) return 0;
|
|
2709
|
-
if (!
|
|
2692
|
+
if (!F(s)) if (n2) {
|
|
2710
2693
|
if (typeof n2 != "function") throw new TypeError("sizeCalculation must be a function");
|
|
2711
|
-
if (s = n2(i2, e), !
|
|
2694
|
+
if (s = n2(i2, e), !F(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
2712
2695
|
} else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
2713
2696
|
return s;
|
|
2714
|
-
}, this.#
|
|
2697
|
+
}, this.#I = (e, i2, s) => {
|
|
2715
2698
|
if (t[e] = i2, this.#c) {
|
|
2716
2699
|
let n2 = this.#c - t[e];
|
|
2717
|
-
for (; this.#
|
|
2700
|
+
for (; this.#b > n2; ) this.#G(true);
|
|
2718
2701
|
}
|
|
2719
|
-
this.#
|
|
2702
|
+
this.#b += t[e], s && (s.entrySize = i2, s.totalCalculatedSize = this.#b);
|
|
2720
2703
|
};
|
|
2721
2704
|
}
|
|
2722
|
-
#
|
|
2705
|
+
#C = (t) => {
|
|
2723
2706
|
};
|
|
2724
|
-
#
|
|
2707
|
+
#I = (t, e, i2) => {
|
|
2725
2708
|
};
|
|
2726
|
-
#
|
|
2709
|
+
#k = (t, e, i2, s) => {
|
|
2727
2710
|
if (i2 || s) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
|
2728
2711
|
return 0;
|
|
2729
2712
|
};
|
|
2730
|
-
*#
|
|
2731
|
-
if (this.#n) for (let e = this.#h;
|
|
2713
|
+
*#A({ allowStale: t = this.allowStale } = {}) {
|
|
2714
|
+
if (this.#n) for (let e = this.#h; this.#V(e) && ((t || !this.#p(e)) && (yield e), e !== this.#a); ) e = this.#u[e];
|
|
2732
2715
|
}
|
|
2733
|
-
*#
|
|
2734
|
-
if (this.#n) for (let e = this.#
|
|
2716
|
+
*#v({ allowStale: t = this.allowStale } = {}) {
|
|
2717
|
+
if (this.#n) for (let e = this.#a; this.#V(e) && ((t || !this.#p(e)) && (yield e), e !== this.#h); ) e = this.#l[e];
|
|
2735
2718
|
}
|
|
2736
|
-
#
|
|
2719
|
+
#V(t) {
|
|
2737
2720
|
return t !== void 0 && this.#s.get(this.#i[t]) === t;
|
|
2738
2721
|
}
|
|
2739
2722
|
*entries() {
|
|
2740
|
-
for (let t of this.#
|
|
2723
|
+
for (let t of this.#A()) this.#t[t] !== void 0 && this.#i[t] !== void 0 && !this.#e(this.#t[t]) && (yield [this.#i[t], this.#t[t]]);
|
|
2741
2724
|
}
|
|
2742
2725
|
*rentries() {
|
|
2743
|
-
for (let t of this.#
|
|
2726
|
+
for (let t of this.#v()) this.#t[t] !== void 0 && this.#i[t] !== void 0 && !this.#e(this.#t[t]) && (yield [this.#i[t], this.#t[t]]);
|
|
2744
2727
|
}
|
|
2745
2728
|
*keys() {
|
|
2746
|
-
for (let t of this.#
|
|
2729
|
+
for (let t of this.#A()) {
|
|
2747
2730
|
let e = this.#i[t];
|
|
2748
2731
|
e !== void 0 && !this.#e(this.#t[t]) && (yield e);
|
|
2749
2732
|
}
|
|
2750
2733
|
}
|
|
2751
2734
|
*rkeys() {
|
|
2752
|
-
for (let t of this.#
|
|
2735
|
+
for (let t of this.#v()) {
|
|
2753
2736
|
let e = this.#i[t];
|
|
2754
2737
|
e !== void 0 && !this.#e(this.#t[t]) && (yield e);
|
|
2755
2738
|
}
|
|
2756
2739
|
}
|
|
2757
2740
|
*values() {
|
|
2758
|
-
for (let t of this.#
|
|
2741
|
+
for (let t of this.#A()) this.#t[t] !== void 0 && !this.#e(this.#t[t]) && (yield this.#t[t]);
|
|
2759
2742
|
}
|
|
2760
2743
|
*rvalues() {
|
|
2761
|
-
for (let t of this.#
|
|
2744
|
+
for (let t of this.#v()) this.#t[t] !== void 0 && !this.#e(this.#t[t]) && (yield this.#t[t]);
|
|
2762
2745
|
}
|
|
2763
2746
|
[Symbol.iterator]() {
|
|
2764
2747
|
return this.entries();
|
|
2765
2748
|
}
|
|
2766
2749
|
[Symbol.toStringTag] = "LRUCache";
|
|
2767
2750
|
find(t, e = {}) {
|
|
2768
|
-
for (let i2 of this.#
|
|
2751
|
+
for (let i2 of this.#A()) {
|
|
2769
2752
|
let s = this.#t[i2], n2 = this.#e(s) ? s.__staleWhileFetching : s;
|
|
2770
|
-
if (n2 !== void 0 && t(n2, this.#i[i2], this)) return this
|
|
2753
|
+
if (n2 !== void 0 && t(n2, this.#i[i2], this)) return this.#x(this.#i[i2], e);
|
|
2771
2754
|
}
|
|
2772
2755
|
}
|
|
2773
2756
|
forEach(t, e = this) {
|
|
2774
|
-
for (let i2 of this.#
|
|
2757
|
+
for (let i2 of this.#A()) {
|
|
2775
2758
|
let s = this.#t[i2], n2 = this.#e(s) ? s.__staleWhileFetching : s;
|
|
2776
2759
|
n2 !== void 0 && t.call(e, n2, this.#i[i2], this);
|
|
2777
2760
|
}
|
|
2778
2761
|
}
|
|
2779
2762
|
rforEach(t, e = this) {
|
|
2780
|
-
for (let i2 of this.#
|
|
2763
|
+
for (let i2 of this.#v()) {
|
|
2781
2764
|
let s = this.#t[i2], n2 = this.#e(s) ? s.__staleWhileFetching : s;
|
|
2782
2765
|
n2 !== void 0 && t.call(e, n2, this.#i[i2], this);
|
|
2783
2766
|
}
|
|
2784
2767
|
}
|
|
2785
2768
|
purgeStale() {
|
|
2786
2769
|
let t = false;
|
|
2787
|
-
for (let e of this.#
|
|
2770
|
+
for (let e of this.#v({ allowStale: true })) this.#p(e) && (this.#z(this.#i[e], "expire"), t = true);
|
|
2788
2771
|
return t;
|
|
2789
2772
|
}
|
|
2790
2773
|
info(t) {
|
|
@@ -2793,27 +2776,27 @@ var require_index_min = __commonJS({
|
|
|
2793
2776
|
let i2 = this.#t[e], s = this.#e(i2) ? i2.__staleWhileFetching : i2;
|
|
2794
2777
|
if (s === void 0) return;
|
|
2795
2778
|
let n2 = { value: s };
|
|
2796
|
-
if (this.#d && this.#
|
|
2797
|
-
let o2 = this.#d[e],
|
|
2798
|
-
if (o2 &&
|
|
2799
|
-
let
|
|
2800
|
-
n2.ttl =
|
|
2779
|
+
if (this.#d && this.#F) {
|
|
2780
|
+
let o2 = this.#d[e], r = this.#F[e];
|
|
2781
|
+
if (o2 && r) {
|
|
2782
|
+
let h2 = o2 - (this.#S.now() - r);
|
|
2783
|
+
n2.ttl = h2, n2.start = Date.now();
|
|
2801
2784
|
}
|
|
2802
2785
|
}
|
|
2803
|
-
return this.#
|
|
2786
|
+
return this.#_ && (n2.size = this.#_[e]), n2;
|
|
2804
2787
|
}
|
|
2805
2788
|
dump() {
|
|
2806
2789
|
let t = [];
|
|
2807
|
-
for (let e of this.#
|
|
2790
|
+
for (let e of this.#A({ allowStale: true })) {
|
|
2808
2791
|
let i2 = this.#i[e], s = this.#t[e], n2 = this.#e(s) ? s.__staleWhileFetching : s;
|
|
2809
2792
|
if (n2 === void 0 || i2 === void 0) continue;
|
|
2810
2793
|
let o2 = { value: n2 };
|
|
2811
|
-
if (this.#d && this.#
|
|
2794
|
+
if (this.#d && this.#F) {
|
|
2812
2795
|
o2.ttl = this.#d[e];
|
|
2813
|
-
let
|
|
2814
|
-
o2.start = Math.floor(Date.now() -
|
|
2796
|
+
let r = this.#S.now() - this.#F[e];
|
|
2797
|
+
o2.start = Math.floor(Date.now() - r);
|
|
2815
2798
|
}
|
|
2816
|
-
this.#
|
|
2799
|
+
this.#_ && (o2.size = this.#_[e]), t.unshift([i2, o2]);
|
|
2817
2800
|
}
|
|
2818
2801
|
return t;
|
|
2819
2802
|
}
|
|
@@ -2822,44 +2805,53 @@ var require_index_min = __commonJS({
|
|
|
2822
2805
|
for (let [e, i2] of t) {
|
|
2823
2806
|
if (i2.start) {
|
|
2824
2807
|
let s = Date.now() - i2.start;
|
|
2825
|
-
i2.start = this.#
|
|
2808
|
+
i2.start = this.#S.now() - s;
|
|
2826
2809
|
}
|
|
2827
|
-
this
|
|
2810
|
+
this.#W(e, i2.value, i2);
|
|
2828
2811
|
}
|
|
2829
2812
|
}
|
|
2830
2813
|
set(t, e, i2 = {}) {
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2814
|
+
let { status: s = u2.metrics.hasSubscribers ? {} : void 0 } = i2;
|
|
2815
|
+
i2.status = s, s && (s.op = "set", s.key = t, e !== void 0 && (s.value = e));
|
|
2816
|
+
let n2 = this.#W(t, e, i2);
|
|
2817
|
+
return s && u2.metrics.hasSubscribers && u2.metrics.publish(s), n2;
|
|
2818
|
+
}
|
|
2819
|
+
#W(t, e, i2 = {}) {
|
|
2820
|
+
let { ttl: s = this.ttl, start: n2, noDisposeOnSet: o2 = this.noDisposeOnSet, sizeCalculation: r = this.sizeCalculation, status: h2 } = i2;
|
|
2821
|
+
if (e === void 0) return h2 && (h2.set = "deleted"), this.delete(t), this;
|
|
2822
|
+
let { noUpdateTTL: a2 = this.noUpdateTTL } = i2;
|
|
2823
|
+
h2 && !this.#e(e) && (h2.value = e);
|
|
2824
|
+
let d = this.#k(t, e, i2.size || 0, r, h2);
|
|
2825
|
+
if (this.maxEntrySize && d > this.maxEntrySize) return this.#z(t, "set"), h2 && (h2.set = "miss", h2.maxEntrySizeExceeded = true), this;
|
|
2834
2826
|
let f = this.#n === 0 ? void 0 : this.#s.get(t);
|
|
2835
|
-
if (f === void 0) f = this.#n === 0 ? this.#h : this.#
|
|
2827
|
+
if (f === void 0) f = this.#n === 0 ? this.#h : this.#y.length !== 0 ? this.#y.pop() : this.#n === this.#o ? this.#G(false) : this.#n, this.#i[f] = t, this.#t[f] = e, this.#s.set(t, f), this.#l[this.#h] = f, this.#u[f] = this.#h, this.#h = f, this.#n++, this.#I(f, d, h2), h2 && (h2.set = "add"), a2 = false, this.#U && this.#D?.(e, t, "add");
|
|
2836
2828
|
else {
|
|
2837
|
-
this.#
|
|
2838
|
-
let
|
|
2839
|
-
if (e !==
|
|
2840
|
-
if (this.#
|
|
2841
|
-
|
|
2842
|
-
let { __staleWhileFetching:
|
|
2843
|
-
|
|
2844
|
-
} else o2 || (this.#T && this.#
|
|
2845
|
-
if (this.#
|
|
2846
|
-
|
|
2847
|
-
let
|
|
2848
|
-
|
|
2829
|
+
this.#L(f);
|
|
2830
|
+
let p = this.#t[f];
|
|
2831
|
+
if (e !== p) {
|
|
2832
|
+
if (this.#O && this.#e(p)) {
|
|
2833
|
+
p.__abortController.abort(new Error("replaced"));
|
|
2834
|
+
let { __staleWhileFetching: m } = p;
|
|
2835
|
+
m !== void 0 && !o2 && (this.#T && this.#m?.(m, t, "set"), this.#f && this.#r?.push([m, t, "set"]));
|
|
2836
|
+
} else o2 || (this.#T && this.#m?.(p, t, "set"), this.#f && this.#r?.push([p, t, "set"]));
|
|
2837
|
+
if (this.#C(f), this.#I(f, d, h2), this.#t[f] = e, h2) {
|
|
2838
|
+
h2.set = "replace";
|
|
2839
|
+
let m = p && this.#e(p) ? p.__staleWhileFetching : p;
|
|
2840
|
+
m !== void 0 && (h2.oldValue = m);
|
|
2849
2841
|
}
|
|
2850
|
-
} else
|
|
2851
|
-
this.#
|
|
2842
|
+
} else h2 && (h2.set = "update");
|
|
2843
|
+
this.#U && this.onInsert?.(e, t, e === p ? "update" : "replace");
|
|
2852
2844
|
}
|
|
2853
|
-
if (s !== 0 && !this.#d && this.#
|
|
2854
|
-
let
|
|
2855
|
-
for (;
|
|
2845
|
+
if (s !== 0 && !this.#d && this.#H(), this.#d && (a2 || this.#N(f, s, n2), h2 && this.#E(h2, f)), !o2 && this.#f && this.#r) {
|
|
2846
|
+
let p = this.#r, m;
|
|
2847
|
+
for (; m = p?.shift(); ) this.#w?.(...m);
|
|
2856
2848
|
}
|
|
2857
2849
|
return this;
|
|
2858
2850
|
}
|
|
2859
2851
|
pop() {
|
|
2860
2852
|
try {
|
|
2861
2853
|
for (; this.#n; ) {
|
|
2862
|
-
let t = this.#t[this.#
|
|
2854
|
+
let t = this.#t[this.#a];
|
|
2863
2855
|
if (this.#G(true), this.#e(t)) {
|
|
2864
2856
|
if (t.__staleWhileFetching) return t.__staleWhileFetching;
|
|
2865
2857
|
} else if (t !== void 0) return t;
|
|
@@ -2867,157 +2859,203 @@ var require_index_min = __commonJS({
|
|
|
2867
2859
|
} finally {
|
|
2868
2860
|
if (this.#f && this.#r) {
|
|
2869
2861
|
let t = this.#r, e;
|
|
2870
|
-
for (; e = t?.shift(); ) this.#
|
|
2862
|
+
for (; e = t?.shift(); ) this.#w?.(...e);
|
|
2871
2863
|
}
|
|
2872
2864
|
}
|
|
2873
2865
|
}
|
|
2874
2866
|
#G(t) {
|
|
2875
|
-
let e = this.#
|
|
2876
|
-
return this.#
|
|
2867
|
+
let e = this.#a, i2 = this.#i[e], s = this.#t[e];
|
|
2868
|
+
return this.#O && this.#e(s) ? s.__abortController.abort(new Error("evicted")) : (this.#T || this.#f) && (this.#T && this.#m?.(s, i2, "evict"), this.#f && this.#r?.push([s, i2, "evict"])), this.#C(e), this.#g?.[e] && (clearTimeout(this.#g[e]), this.#g[e] = void 0), t && (this.#i[e] = void 0, this.#t[e] = void 0, this.#y.push(e)), this.#n === 1 ? (this.#a = this.#h = 0, this.#y.length = 0) : this.#a = this.#l[e], this.#s.delete(i2), this.#n--, e;
|
|
2877
2869
|
}
|
|
2878
2870
|
has(t, e = {}) {
|
|
2871
|
+
let { status: i2 = u2.metrics.hasSubscribers ? {} : void 0 } = e;
|
|
2872
|
+
e.status = i2, i2 && (i2.op = "has", i2.key = t);
|
|
2873
|
+
let s = this.#Y(t, e);
|
|
2874
|
+
return u2.metrics.hasSubscribers && u2.metrics.publish(i2), s;
|
|
2875
|
+
}
|
|
2876
|
+
#Y(t, e = {}) {
|
|
2879
2877
|
let { updateAgeOnHas: i2 = this.updateAgeOnHas, status: s } = e, n2 = this.#s.get(t);
|
|
2880
2878
|
if (n2 !== void 0) {
|
|
2881
2879
|
let o2 = this.#t[n2];
|
|
2882
2880
|
if (this.#e(o2) && o2.__staleWhileFetching === void 0) return false;
|
|
2883
|
-
if (this.#p(n2)) s && (s.has = "stale", this.#
|
|
2884
|
-
else return i2 && this.#R(n2), s && (s.has = "hit", this.#
|
|
2881
|
+
if (this.#p(n2)) s && (s.has = "stale", this.#E(s, n2));
|
|
2882
|
+
else return i2 && this.#R(n2), s && (s.has = "hit", this.#E(s, n2)), true;
|
|
2885
2883
|
} else s && (s.has = "miss");
|
|
2886
2884
|
return false;
|
|
2887
2885
|
}
|
|
2888
2886
|
peek(t, e = {}) {
|
|
2889
|
-
let {
|
|
2890
|
-
|
|
2891
|
-
let
|
|
2892
|
-
return
|
|
2887
|
+
let { status: i2 = D() ? {} : void 0 } = e;
|
|
2888
|
+
i2 && (i2.op = "peek", i2.key = t), e.status = i2;
|
|
2889
|
+
let s = this.#J(t, e);
|
|
2890
|
+
return u2.metrics.hasSubscribers && u2.metrics.publish(i2), s;
|
|
2891
|
+
}
|
|
2892
|
+
#J(t, e) {
|
|
2893
|
+
let { status: i2, allowStale: s = this.allowStale } = e, n2 = this.#s.get(t);
|
|
2894
|
+
if (n2 === void 0 || !s && this.#p(n2)) {
|
|
2895
|
+
i2 && (i2.peek = n2 === void 0 ? "miss" : "stale");
|
|
2896
|
+
return;
|
|
2897
|
+
}
|
|
2898
|
+
let o2 = this.#t[n2], r = this.#e(o2) ? o2.__staleWhileFetching : o2;
|
|
2899
|
+
return i2 && (r !== void 0 ? (i2.peek = "hit", i2.value = r) : i2.peek = "miss"), r;
|
|
2893
2900
|
}
|
|
2894
|
-
#
|
|
2901
|
+
#P(t, e, i2, s) {
|
|
2895
2902
|
let n2 = e === void 0 ? void 0 : this.#t[e];
|
|
2896
2903
|
if (this.#e(n2)) return n2;
|
|
2897
|
-
let o2 = new
|
|
2898
|
-
|
|
2899
|
-
let
|
|
2900
|
-
let { aborted: l } = o2.signal, S = i2.ignoreFetchAbort &&
|
|
2901
|
-
if (i2.status && (l && !
|
|
2902
|
-
let
|
|
2903
|
-
return (
|
|
2904
|
-
},
|
|
2905
|
-
let { aborted: l } = o2.signal, S = l && i2.allowStaleOnFetchAbort,
|
|
2906
|
-
if (this.#t[e] ===
|
|
2907
|
-
if (
|
|
2908
|
-
},
|
|
2909
|
-
let l = this.#
|
|
2910
|
-
l && l instanceof Promise && l.then((S) =>
|
|
2911
|
-
(!i2.ignoreFetchAbort || i2.allowStaleOnFetchAbort) && (
|
|
2904
|
+
let o2 = new AbortController(), { signal: r } = i2;
|
|
2905
|
+
r?.addEventListener("abort", () => o2.abort(r.reason), { signal: o2.signal });
|
|
2906
|
+
let h2 = { signal: o2.signal, options: i2, context: s }, a2 = (w, y = false) => {
|
|
2907
|
+
let { aborted: l } = o2.signal, S = i2.ignoreFetchAbort && w !== void 0, _ = i2.ignoreFetchAbort || !!(i2.allowStaleOnFetchAbort && w !== void 0);
|
|
2908
|
+
if (i2.status && (l && !y ? (i2.status.fetchAborted = true, i2.status.fetchError = o2.signal.reason, S && (i2.status.fetchAbortIgnored = true)) : i2.status.fetchResolved = true), l && !S && !y) return f(o2.signal.reason, _);
|
|
2909
|
+
let b = m, g = this.#t[e];
|
|
2910
|
+
return (g === m || g === void 0 && S && y) && (w === void 0 ? b.__staleWhileFetching !== void 0 ? this.#t[e] = b.__staleWhileFetching : this.#z(t, "fetch") : (i2.status && (i2.status.fetchUpdated = true), this.#W(t, w, h2.options))), w;
|
|
2911
|
+
}, d = (w) => (i2.status && (i2.status.fetchRejected = true, i2.status.fetchError = w), f(w, false)), f = (w, y) => {
|
|
2912
|
+
let { aborted: l } = o2.signal, S = l && i2.allowStaleOnFetchAbort, _ = S || i2.allowStaleOnFetchRejection, b = _ || i2.noDeleteOnFetchRejection, g = m;
|
|
2913
|
+
if (this.#t[e] === m && (!b || !y && g.__staleWhileFetching === void 0 ? this.#z(t, "fetch") : S || (this.#t[e] = g.__staleWhileFetching)), _) return i2.status && g.__staleWhileFetching !== void 0 && (i2.status.returnedStale = true), g.__staleWhileFetching;
|
|
2914
|
+
if (g.__returned === g) throw w;
|
|
2915
|
+
}, p = (w, y) => {
|
|
2916
|
+
let l = this.#M?.(t, n2, h2);
|
|
2917
|
+
l && l instanceof Promise && l.then((S) => w(S === void 0 ? void 0 : S), y), o2.signal.addEventListener("abort", () => {
|
|
2918
|
+
(!i2.ignoreFetchAbort || i2.allowStaleOnFetchAbort) && (w(void 0), i2.allowStaleOnFetchAbort && (w = (S) => a2(S, true)));
|
|
2912
2919
|
});
|
|
2913
2920
|
};
|
|
2914
2921
|
i2.status && (i2.status.fetchDispatched = true);
|
|
2915
|
-
let
|
|
2916
|
-
return e === void 0 ? (this
|
|
2922
|
+
let m = new Promise(p).then(a2, d), T = Object.assign(m, { __abortController: o2, __staleWhileFetching: n2, __returned: void 0 });
|
|
2923
|
+
return e === void 0 ? (this.#W(t, T, { ...h2.options, status: void 0 }), e = this.#s.get(t)) : this.#t[e] = T, T;
|
|
2917
2924
|
}
|
|
2918
2925
|
#e(t) {
|
|
2919
|
-
if (!this.#
|
|
2926
|
+
if (!this.#O) return false;
|
|
2920
2927
|
let e = t;
|
|
2921
|
-
return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof
|
|
2922
|
-
}
|
|
2923
|
-
|
|
2924
|
-
let
|
|
2925
|
-
|
|
2926
|
-
let
|
|
2927
|
-
|
|
2928
|
+
return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof AbortController;
|
|
2929
|
+
}
|
|
2930
|
+
fetch(t, e = {}) {
|
|
2931
|
+
let i2 = u2.tracing.hasSubscribers, { status: s = D() ? {} : void 0 } = e;
|
|
2932
|
+
e.status = s, s && e.context && (s.context = e.context);
|
|
2933
|
+
let n2 = this.#q(t, e);
|
|
2934
|
+
return s && D() && i2 && (s.trace = true, u2.tracing.tracePromise(() => n2, s).catch(() => {
|
|
2935
|
+
})), n2;
|
|
2936
|
+
}
|
|
2937
|
+
async #q(t, e = {}) {
|
|
2938
|
+
let { allowStale: i2 = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n2 = this.noDeleteOnStaleGet, ttl: o2 = this.ttl, noDisposeOnSet: r = this.noDisposeOnSet, size: h2 = 0, sizeCalculation: a2 = this.sizeCalculation, noUpdateTTL: d = this.noUpdateTTL, noDeleteOnFetchRejection: f = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: p = this.allowStaleOnFetchRejection, ignoreFetchAbort: m = this.ignoreFetchAbort, allowStaleOnFetchAbort: T = this.allowStaleOnFetchAbort, context: w, forceRefresh: y = false, status: l, signal: S } = e;
|
|
2939
|
+
if (l && (l.op = "fetch", l.key = t, y && (l.forceRefresh = true)), !this.#O) return l && (l.fetch = "get"), this.#x(t, { allowStale: i2, updateAgeOnGet: s, noDeleteOnStaleGet: n2, status: l });
|
|
2940
|
+
let _ = { allowStale: i2, updateAgeOnGet: s, noDeleteOnStaleGet: n2, ttl: o2, noDisposeOnSet: r, size: h2, sizeCalculation: a2, noUpdateTTL: d, noDeleteOnFetchRejection: f, allowStaleOnFetchRejection: p, allowStaleOnFetchAbort: T, ignoreFetchAbort: m, status: l, signal: S }, b = this.#s.get(t);
|
|
2941
|
+
if (b === void 0) {
|
|
2928
2942
|
l && (l.fetch = "miss");
|
|
2929
|
-
let
|
|
2930
|
-
return
|
|
2943
|
+
let g = this.#P(t, b, _, w);
|
|
2944
|
+
return g.__returned = g;
|
|
2931
2945
|
} else {
|
|
2932
|
-
let
|
|
2933
|
-
if (this.#e(
|
|
2934
|
-
let E = i2 &&
|
|
2935
|
-
return l && (l.fetch = "inflight", E && (l.returnedStale = true)), E ?
|
|
2936
|
-
}
|
|
2937
|
-
let
|
|
2938
|
-
if (!
|
|
2939
|
-
let
|
|
2940
|
-
return l && (l.fetch =
|
|
2941
|
-
}
|
|
2942
|
-
}
|
|
2943
|
-
|
|
2944
|
-
let i2 =
|
|
2946
|
+
let g = this.#t[b];
|
|
2947
|
+
if (this.#e(g)) {
|
|
2948
|
+
let E = i2 && g.__staleWhileFetching !== void 0;
|
|
2949
|
+
return l && (l.fetch = "inflight", E && (l.returnedStale = true)), E ? g.__staleWhileFetching : g.__returned = g;
|
|
2950
|
+
}
|
|
2951
|
+
let A = this.#p(b);
|
|
2952
|
+
if (!y && !A) return l && (l.fetch = "hit"), this.#L(b), s && this.#R(b), l && this.#E(l, b), g;
|
|
2953
|
+
let v = this.#P(t, b, _, w), z = v.__staleWhileFetching !== void 0 && i2;
|
|
2954
|
+
return l && (l.fetch = A ? "stale" : "refresh", z && A && (l.returnedStale = true)), z ? v.__staleWhileFetching : v.__returned = v;
|
|
2955
|
+
}
|
|
2956
|
+
}
|
|
2957
|
+
forceFetch(t, e = {}) {
|
|
2958
|
+
let i2 = u2.tracing.hasSubscribers, { status: s = D() ? {} : void 0 } = e;
|
|
2959
|
+
e.status = s, s && e.context && (s.context = e.context);
|
|
2960
|
+
let n2 = this.#K(t, e);
|
|
2961
|
+
return s && D() && i2 && (s.trace = true, u2.tracing.tracePromise(() => n2, s).catch(() => {
|
|
2962
|
+
})), n2;
|
|
2963
|
+
}
|
|
2964
|
+
async #K(t, e = {}) {
|
|
2965
|
+
let i2 = await this.#q(t, e);
|
|
2945
2966
|
if (i2 === void 0) throw new Error("fetch() returned undefined");
|
|
2946
2967
|
return i2;
|
|
2947
2968
|
}
|
|
2948
2969
|
memo(t, e = {}) {
|
|
2949
|
-
let i2 =
|
|
2970
|
+
let { status: i2 = u2.metrics.hasSubscribers ? {} : void 0 } = e;
|
|
2971
|
+
e.status = i2, i2 && (i2.op = "memo", i2.key = t, e.context && (i2.context = e.context));
|
|
2972
|
+
let s = this.#Q(t, e);
|
|
2973
|
+
return i2 && (i2.value = s), u2.metrics.hasSubscribers && u2.metrics.publish(i2), s;
|
|
2974
|
+
}
|
|
2975
|
+
#Q(t, e = {}) {
|
|
2976
|
+
let i2 = this.#j;
|
|
2950
2977
|
if (!i2) throw new Error("no memoMethod provided to constructor");
|
|
2951
|
-
let { context: s,
|
|
2952
|
-
|
|
2953
|
-
let
|
|
2954
|
-
|
|
2978
|
+
let { context: s, status: n2, forceRefresh: o2, ...r } = e;
|
|
2979
|
+
n2 && o2 && (n2.forceRefresh = true);
|
|
2980
|
+
let h2 = this.#x(t, r), a2 = o2 || h2 === void 0;
|
|
2981
|
+
if (n2 && (n2.memo = a2 ? "miss" : "hit", a2 || (n2.value = h2)), !a2) return h2;
|
|
2982
|
+
let d = i2(t, h2, { options: r, context: s });
|
|
2983
|
+
return n2 && (n2.value = d), this.#W(t, d, r), d;
|
|
2955
2984
|
}
|
|
2956
2985
|
get(t, e = {}) {
|
|
2957
|
-
let {
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2986
|
+
let { status: i2 = u2.metrics.hasSubscribers ? {} : void 0 } = e;
|
|
2987
|
+
e.status = i2, i2 && (i2.op = "get", i2.key = t);
|
|
2988
|
+
let s = this.#x(t, e);
|
|
2989
|
+
return i2 && (s !== void 0 && (i2.value = s), u2.metrics.hasSubscribers && u2.metrics.publish(i2)), s;
|
|
2990
|
+
}
|
|
2991
|
+
#x(t, e = {}) {
|
|
2992
|
+
let { allowStale: i2 = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n2 = this.noDeleteOnStaleGet, status: o2 } = e, r = this.#s.get(t);
|
|
2993
|
+
if (r === void 0) {
|
|
2994
|
+
o2 && (o2.get = "miss");
|
|
2995
|
+
return;
|
|
2996
|
+
}
|
|
2997
|
+
let h2 = this.#t[r], a2 = this.#e(h2);
|
|
2998
|
+
return o2 && this.#E(o2, r), this.#p(r) ? a2 ? (o2 && (o2.get = "stale-fetching"), i2 && h2.__staleWhileFetching !== void 0 ? (o2 && (o2.returnedStale = true), h2.__staleWhileFetching) : void 0) : (n2 || this.#z(t, "expire"), o2 && (o2.get = "stale"), i2 ? (o2 && (o2.returnedStale = true), h2) : void 0) : (o2 && (o2.get = a2 ? "fetching" : "hit"), this.#L(r), s && this.#R(r), a2 ? h2.__staleWhileFetching : h2);
|
|
2962
2999
|
}
|
|
2963
|
-
#
|
|
2964
|
-
this.#u[e] = t, this.#
|
|
3000
|
+
#B(t, e) {
|
|
3001
|
+
this.#u[e] = t, this.#l[t] = e;
|
|
2965
3002
|
}
|
|
2966
|
-
#
|
|
2967
|
-
t !== this.#h && (t === this.#
|
|
3003
|
+
#L(t) {
|
|
3004
|
+
t !== this.#h && (t === this.#a ? this.#a = this.#l[t] : this.#B(this.#u[t], this.#l[t]), this.#B(this.#h, t), this.#h = t);
|
|
2968
3005
|
}
|
|
2969
3006
|
delete(t) {
|
|
2970
|
-
return this.#
|
|
3007
|
+
return this.#z(t, "delete");
|
|
2971
3008
|
}
|
|
2972
|
-
#
|
|
3009
|
+
#z(t, e) {
|
|
3010
|
+
u2.metrics.hasSubscribers && u2.metrics.publish({ op: "delete", delete: e, key: t });
|
|
2973
3011
|
let i2 = false;
|
|
2974
3012
|
if (this.#n !== 0) {
|
|
2975
3013
|
let s = this.#s.get(t);
|
|
2976
|
-
if (s !== void 0) if (this.#g?.[s] && (clearTimeout(this.#g?.[s]), this.#g[s] = void 0), i2 = true, this.#n === 1) this
|
|
3014
|
+
if (s !== void 0) if (this.#g?.[s] && (clearTimeout(this.#g?.[s]), this.#g[s] = void 0), i2 = true, this.#n === 1) this.#$(e);
|
|
2977
3015
|
else {
|
|
2978
|
-
this.#
|
|
3016
|
+
this.#C(s);
|
|
2979
3017
|
let n2 = this.#t[s];
|
|
2980
|
-
if (this.#e(n2) ? n2.__abortController.abort(new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#
|
|
2981
|
-
else if (s === this.#
|
|
3018
|
+
if (this.#e(n2) ? n2.__abortController.abort(new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#m?.(n2, t, e), this.#f && this.#r?.push([n2, t, e])), this.#s.delete(t), this.#i[s] = void 0, this.#t[s] = void 0, s === this.#h) this.#h = this.#u[s];
|
|
3019
|
+
else if (s === this.#a) this.#a = this.#l[s];
|
|
2982
3020
|
else {
|
|
2983
3021
|
let o2 = this.#u[s];
|
|
2984
|
-
this.#
|
|
2985
|
-
let
|
|
2986
|
-
this.#u[
|
|
3022
|
+
this.#l[o2] = this.#l[s];
|
|
3023
|
+
let r = this.#l[s];
|
|
3024
|
+
this.#u[r] = this.#u[s];
|
|
2987
3025
|
}
|
|
2988
|
-
this.#n--, this.#
|
|
3026
|
+
this.#n--, this.#y.push(s);
|
|
2989
3027
|
}
|
|
2990
3028
|
}
|
|
2991
3029
|
if (this.#f && this.#r?.length) {
|
|
2992
3030
|
let s = this.#r, n2;
|
|
2993
|
-
for (; n2 = s?.shift(); ) this.#
|
|
3031
|
+
for (; n2 = s?.shift(); ) this.#w?.(...n2);
|
|
2994
3032
|
}
|
|
2995
3033
|
return i2;
|
|
2996
3034
|
}
|
|
2997
3035
|
clear() {
|
|
2998
|
-
return this
|
|
3036
|
+
return this.#$("delete");
|
|
2999
3037
|
}
|
|
3000
|
-
|
|
3001
|
-
for (let e of this.#
|
|
3038
|
+
#$(t) {
|
|
3039
|
+
for (let e of this.#v({ allowStale: true })) {
|
|
3002
3040
|
let i2 = this.#t[e];
|
|
3003
3041
|
if (this.#e(i2)) i2.__abortController.abort(new Error("deleted"));
|
|
3004
3042
|
else {
|
|
3005
3043
|
let s = this.#i[e];
|
|
3006
|
-
this.#T && this.#
|
|
3044
|
+
this.#T && this.#m?.(i2, s, t), this.#f && this.#r?.push([i2, s, t]);
|
|
3007
3045
|
}
|
|
3008
3046
|
}
|
|
3009
|
-
if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#
|
|
3010
|
-
this.#d.fill(0), this.#
|
|
3047
|
+
if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#F) {
|
|
3048
|
+
this.#d.fill(0), this.#F.fill(0);
|
|
3011
3049
|
for (let e of this.#g ?? []) e !== void 0 && clearTimeout(e);
|
|
3012
3050
|
this.#g?.fill(void 0);
|
|
3013
3051
|
}
|
|
3014
|
-
if (this.#
|
|
3052
|
+
if (this.#_ && this.#_.fill(0), this.#a = 0, this.#h = 0, this.#y.length = 0, this.#b = 0, this.#n = 0, this.#f && this.#r) {
|
|
3015
3053
|
let e = this.#r, i2;
|
|
3016
|
-
for (; i2 = e?.shift(); ) this.#
|
|
3054
|
+
for (; i2 = e?.shift(); ) this.#w?.(...i2);
|
|
3017
3055
|
}
|
|
3018
3056
|
}
|
|
3019
3057
|
};
|
|
3020
|
-
exports.LRUCache =
|
|
3058
|
+
exports.LRUCache = x;
|
|
3021
3059
|
}
|
|
3022
3060
|
});
|
|
3023
3061
|
|
|
@@ -26122,9 +26160,9 @@ var parseClass = (glob, position) => {
|
|
|
26122
26160
|
// node_modules/minimatch/dist/esm/unescape.js
|
|
26123
26161
|
var unescape2 = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
|
|
26124
26162
|
if (magicalBraces) {
|
|
26125
|
-
return windowsPathsNoEscape ? s.replace(/\[([
|
|
26163
|
+
return windowsPathsNoEscape ? s.replace(/\[([^/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1");
|
|
26126
26164
|
}
|
|
26127
|
-
return windowsPathsNoEscape ? s.replace(/\[([
|
|
26165
|
+
return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
|
|
26128
26166
|
};
|
|
26129
26167
|
|
|
26130
26168
|
// node_modules/minimatch/dist/esm/ast.js
|
|
@@ -26244,13 +26282,7 @@ var AST = class {
|
|
|
26244
26282
|
}
|
|
26245
26283
|
// reconstructs the pattern
|
|
26246
26284
|
toString() {
|
|
26247
|
-
|
|
26248
|
-
return this.#toString;
|
|
26249
|
-
if (!this.type) {
|
|
26250
|
-
return this.#toString = this.#parts.map((p) => String(p)).join("");
|
|
26251
|
-
} else {
|
|
26252
|
-
return this.#toString = this.type + "(" + this.#parts.map((p) => String(p)).join("|") + ")";
|
|
26253
|
-
}
|
|
26285
|
+
return this.#toString !== void 0 ? this.#toString : !this.type ? this.#toString = this.#parts.map((p) => String(p)).join("") : this.#toString = this.type + "(" + this.#parts.map((p) => String(p)).join("|") + ")";
|
|
26254
26286
|
}
|
|
26255
26287
|
#fillNegs() {
|
|
26256
26288
|
if (this !== this.#root)
|
|
@@ -26793,7 +26825,7 @@ var minimatch = (p, pattern, options = {}) => {
|
|
|
26793
26825
|
}
|
|
26794
26826
|
return new Minimatch(pattern, options).match(p);
|
|
26795
26827
|
};
|
|
26796
|
-
var starDotExtRE = /^\*+([
|
|
26828
|
+
var starDotExtRE = /^\*+([^+@!?*[(]*)$/;
|
|
26797
26829
|
var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
|
|
26798
26830
|
var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
|
|
26799
26831
|
var starDotExtTestNocase = (ext2) => {
|
|
@@ -26812,7 +26844,7 @@ var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
|
|
|
26812
26844
|
var starRE = /^\*+$/;
|
|
26813
26845
|
var starTest = (f) => f.length !== 0 && !f.startsWith(".");
|
|
26814
26846
|
var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
|
|
26815
|
-
var qmarksRE = /^\?+([
|
|
26847
|
+
var qmarksRE = /^\?+([^+@!?*[(]*)?$/;
|
|
26816
26848
|
var qmarksTestNocase = ([$0, ext2 = ""]) => {
|
|
26817
26849
|
const noext = qmarksTestNoExt([$0]);
|
|
26818
26850
|
if (!ext2)
|
|
@@ -27031,10 +27063,10 @@ var Minimatch = class {
|
|
|
27031
27063
|
// of patterns that we have to process.
|
|
27032
27064
|
preprocess(globParts) {
|
|
27033
27065
|
if (this.options.noglobstar) {
|
|
27034
|
-
for (
|
|
27035
|
-
for (let j = 0; j <
|
|
27036
|
-
if (
|
|
27037
|
-
|
|
27066
|
+
for (const partset of globParts) {
|
|
27067
|
+
for (let j = 0; j < partset.length; j++) {
|
|
27068
|
+
if (partset[j] === "**") {
|
|
27069
|
+
partset[j] = "*";
|
|
27038
27070
|
}
|
|
27039
27071
|
}
|
|
27040
27072
|
}
|
|
@@ -27112,7 +27144,7 @@ var Minimatch = class {
|
|
|
27112
27144
|
let dd = 0;
|
|
27113
27145
|
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
27114
27146
|
const p = parts[dd - 1];
|
|
27115
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
27147
|
+
if (p && p !== "." && p !== ".." && p !== "**" && !(this.isWindows && /^[a-z]:$/i.test(p))) {
|
|
27116
27148
|
didSomething = true;
|
|
27117
27149
|
parts.splice(dd - 1, 2);
|
|
27118
27150
|
dd -= 2;
|
|
@@ -27528,7 +27560,7 @@ var Minimatch = class {
|
|
|
27528
27560
|
re = "^(?!" + re + ").+$";
|
|
27529
27561
|
try {
|
|
27530
27562
|
this.regexp = new RegExp(re, [...flags].join(""));
|
|
27531
|
-
} catch
|
|
27563
|
+
} catch {
|
|
27532
27564
|
this.regexp = false;
|
|
27533
27565
|
}
|
|
27534
27566
|
return this.regexp;
|
|
@@ -27536,7 +27568,7 @@ var Minimatch = class {
|
|
|
27536
27568
|
slashSplit(p) {
|
|
27537
27569
|
if (this.preserveMultipleSlashes) {
|
|
27538
27570
|
return p.split("/");
|
|
27539
|
-
} else if (this.isWindows && /^\/\/[
|
|
27571
|
+
} else if (this.isWindows && /^\/\/[^/]+/.test(p)) {
|
|
27540
27572
|
return ["", ...p.split(/\/+/)];
|
|
27541
27573
|
} else {
|
|
27542
27574
|
return p.split(/\/+/);
|
|
@@ -27567,8 +27599,7 @@ var Minimatch = class {
|
|
|
27567
27599
|
filename = ff[i2];
|
|
27568
27600
|
}
|
|
27569
27601
|
}
|
|
27570
|
-
for (
|
|
27571
|
-
const pattern = set2[i2];
|
|
27602
|
+
for (const pattern of set2) {
|
|
27572
27603
|
let file = ff;
|
|
27573
27604
|
if (options.matchBase && pattern.length === 1) {
|
|
27574
27605
|
file = [filename];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semantic-release-lerna",
|
|
3
|
-
"version": "2.18.
|
|
3
|
+
"version": "2.18.4",
|
|
4
4
|
"description": "semantic-release plugin to publish lerna monorepo packages to npm",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"npm",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@actions/core": "^3.0.
|
|
40
|
+
"@actions/core": "^3.0.1",
|
|
41
41
|
"@semantic-release/error": "^4.0.0",
|
|
42
42
|
"conventional-changelog-angular": "^7.0.0 || ^8.0.0",
|
|
43
43
|
"conventional-changelog-writer": "^7.0.0 || ^8.0.0",
|