ueberdb2 4.2.86 → 4.2.88
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 +66 -44
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -218614,51 +218614,61 @@ const coerce$2 = (version, options) => {
|
|
|
218614
218614
|
|
|
218615
218615
|
return parse$7(`${major}.${minor}.${patch}${prerelease}${build}`, options)
|
|
218616
218616
|
};
|
|
218617
|
-
var coerce_1 = coerce$2;
|
|
218618
|
-
|
|
218619
|
-
this.max = 1000;
|
|
218620
|
-
this.map = new Map();
|
|
218621
|
-
}
|
|
218617
|
+
var coerce_1 = coerce$2;var lrucache;
|
|
218618
|
+
var hasRequiredLrucache;
|
|
218622
218619
|
|
|
218623
|
-
|
|
218624
|
-
|
|
218625
|
-
|
|
218626
|
-
|
|
218627
|
-
|
|
218628
|
-
|
|
218629
|
-
|
|
218630
|
-
|
|
218631
|
-
return value
|
|
218632
|
-
}
|
|
218633
|
-
}
|
|
218620
|
+
function requireLrucache () {
|
|
218621
|
+
if (hasRequiredLrucache) return lrucache;
|
|
218622
|
+
hasRequiredLrucache = 1;
|
|
218623
|
+
class LRUCache {
|
|
218624
|
+
constructor () {
|
|
218625
|
+
this.max = 1000;
|
|
218626
|
+
this.map = new Map();
|
|
218627
|
+
}
|
|
218634
218628
|
|
|
218635
|
-
|
|
218636
|
-
|
|
218637
|
-
|
|
218629
|
+
get (key) {
|
|
218630
|
+
const value = this.map.get(key);
|
|
218631
|
+
if (value === undefined) {
|
|
218632
|
+
return undefined
|
|
218633
|
+
} else {
|
|
218634
|
+
// Remove the key from the map and add it to the end
|
|
218635
|
+
this.map.delete(key);
|
|
218636
|
+
this.map.set(key, value);
|
|
218637
|
+
return value
|
|
218638
|
+
}
|
|
218639
|
+
}
|
|
218638
218640
|
|
|
218639
|
-
|
|
218640
|
-
|
|
218641
|
+
delete (key) {
|
|
218642
|
+
return this.map.delete(key)
|
|
218643
|
+
}
|
|
218641
218644
|
|
|
218642
|
-
|
|
218643
|
-
|
|
218644
|
-
if (this.map.size >= this.max) {
|
|
218645
|
-
const firstKey = this.map.keys().next().value;
|
|
218646
|
-
this.delete(firstKey);
|
|
218647
|
-
}
|
|
218645
|
+
set (key, value) {
|
|
218646
|
+
const deleted = this.delete(key);
|
|
218648
218647
|
|
|
218649
|
-
|
|
218650
|
-
|
|
218648
|
+
if (!deleted && value !== undefined) {
|
|
218649
|
+
// If cache is full, delete the least recently used item
|
|
218650
|
+
if (this.map.size >= this.max) {
|
|
218651
|
+
const firstKey = this.map.keys().next().value;
|
|
218652
|
+
this.delete(firstKey);
|
|
218653
|
+
}
|
|
218651
218654
|
|
|
218652
|
-
|
|
218653
|
-
|
|
218654
|
-
|
|
218655
|
+
this.map.set(key, value);
|
|
218656
|
+
}
|
|
218657
|
+
|
|
218658
|
+
return this
|
|
218659
|
+
}
|
|
218660
|
+
}
|
|
218655
218661
|
|
|
218656
|
-
|
|
218662
|
+
lrucache = LRUCache;
|
|
218663
|
+
return lrucache;
|
|
218664
|
+
}var range;
|
|
218657
218665
|
var hasRequiredRange;
|
|
218658
218666
|
|
|
218659
218667
|
function requireRange () {
|
|
218660
218668
|
if (hasRequiredRange) return range;
|
|
218661
218669
|
hasRequiredRange = 1;
|
|
218670
|
+
const SPACE_CHARACTERS = /\s+/g;
|
|
218671
|
+
|
|
218662
218672
|
// hoisted class for cyclic dependency
|
|
218663
218673
|
class Range {
|
|
218664
218674
|
constructor (range, options) {
|
|
@@ -218679,7 +218689,7 @@ function requireRange () {
|
|
|
218679
218689
|
// just put it in the set and return
|
|
218680
218690
|
this.raw = range.value;
|
|
218681
218691
|
this.set = [[range]];
|
|
218682
|
-
this.
|
|
218692
|
+
this.formatted = undefined;
|
|
218683
218693
|
return this
|
|
218684
218694
|
}
|
|
218685
218695
|
|
|
@@ -218690,10 +218700,7 @@ function requireRange () {
|
|
|
218690
218700
|
// First reduce all whitespace as much as possible so we do not have to rely
|
|
218691
218701
|
// on potentially slow regexes like \s*. This is then stored and used for
|
|
218692
218702
|
// future error messages as well.
|
|
218693
|
-
this.raw = range
|
|
218694
|
-
.trim()
|
|
218695
|
-
.split(/\s+/)
|
|
218696
|
-
.join(' ');
|
|
218703
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, ' ');
|
|
218697
218704
|
|
|
218698
218705
|
// First, split on ||
|
|
218699
218706
|
this.set = this.raw
|
|
@@ -218727,14 +218734,29 @@ function requireRange () {
|
|
|
218727
218734
|
}
|
|
218728
218735
|
}
|
|
218729
218736
|
|
|
218730
|
-
this.
|
|
218737
|
+
this.formatted = undefined;
|
|
218738
|
+
}
|
|
218739
|
+
|
|
218740
|
+
get range () {
|
|
218741
|
+
if (this.formatted === undefined) {
|
|
218742
|
+
this.formatted = '';
|
|
218743
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
218744
|
+
if (i > 0) {
|
|
218745
|
+
this.formatted += '||';
|
|
218746
|
+
}
|
|
218747
|
+
const comps = this.set[i];
|
|
218748
|
+
for (let k = 0; k < comps.length; k++) {
|
|
218749
|
+
if (k > 0) {
|
|
218750
|
+
this.formatted += ' ';
|
|
218751
|
+
}
|
|
218752
|
+
this.formatted += comps[k].toString().trim();
|
|
218753
|
+
}
|
|
218754
|
+
}
|
|
218755
|
+
}
|
|
218756
|
+
return this.formatted
|
|
218731
218757
|
}
|
|
218732
218758
|
|
|
218733
218759
|
format () {
|
|
218734
|
-
this.range = this.set
|
|
218735
|
-
.map((comps) => comps.join(' ').trim())
|
|
218736
|
-
.join('||')
|
|
218737
|
-
.trim();
|
|
218738
218760
|
return this.range
|
|
218739
218761
|
}
|
|
218740
218762
|
|
|
@@ -218859,7 +218881,7 @@ function requireRange () {
|
|
|
218859
218881
|
|
|
218860
218882
|
range = Range;
|
|
218861
218883
|
|
|
218862
|
-
const LRU =
|
|
218884
|
+
const LRU = requireLrucache();
|
|
218863
218885
|
const cache = new LRU();
|
|
218864
218886
|
|
|
218865
218887
|
const parseOptions = parseOptions_1;
|
package/package.json
CHANGED
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"redis": "^4.6.15",
|
|
52
52
|
"rethinkdb": "^2.4.2",
|
|
53
53
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
54
|
-
"semver": "^7.6.
|
|
54
|
+
"semver": "^7.6.3",
|
|
55
55
|
"simple-git": "^3.25.0",
|
|
56
56
|
"surrealdb.js": "^0.11.1",
|
|
57
|
-
"typescript": "^5.5.
|
|
58
|
-
"vitest": "^2.0.
|
|
57
|
+
"typescript": "^5.5.4",
|
|
58
|
+
"vitest": "^2.0.4",
|
|
59
59
|
"wtfnode": "^0.9.3",
|
|
60
60
|
"rollup": "^4.19.0"
|
|
61
61
|
},
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"url": "https://github.com/ether/ueberDB.git"
|
|
65
65
|
},
|
|
66
66
|
"main": "./dist/index.js",
|
|
67
|
-
"version": "4.2.
|
|
67
|
+
"version": "4.2.88",
|
|
68
68
|
"bugs": {
|
|
69
69
|
"url": "https://github.com/ether/ueberDB/issues"
|
|
70
70
|
},
|