coc-pyright 1.1.235 → 1.1.251
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/lib/index.js +203 -141
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -76,7 +76,7 @@ var require_re = __commonJS({
|
|
|
76
76
|
var R = 0;
|
|
77
77
|
var createToken = (name, value, isGlobal) => {
|
|
78
78
|
const index = R++;
|
|
79
|
-
debug(index, value);
|
|
79
|
+
debug(name, index, value);
|
|
80
80
|
t[name] = index;
|
|
81
81
|
src[index] = value;
|
|
82
82
|
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
@@ -122,8 +122,8 @@ var require_re = __commonJS({
|
|
|
122
122
|
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
123
123
|
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
124
124
|
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
125
|
-
createToken("GTE0", "^\\s*>=\\s*0
|
|
126
|
-
createToken("GTE0PRE", "^\\s*>=\\s*0
|
|
125
|
+
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
126
|
+
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
|
|
@@ -131,9 +131,9 @@ var require_re = __commonJS({
|
|
|
131
131
|
var require_parse_options = __commonJS({
|
|
132
132
|
"node_modules/semver/internal/parse-options.js"(exports, module2) {
|
|
133
133
|
var opts = ["includePrerelease", "loose", "rtl"];
|
|
134
|
-
var parseOptions = (options) => !options ? {} : typeof options !== "object" ? { loose: true } : opts.filter((k) => options[k]).reduce((
|
|
135
|
-
|
|
136
|
-
return
|
|
134
|
+
var parseOptions = (options) => !options ? {} : typeof options !== "object" ? { loose: true } : opts.filter((k) => options[k]).reduce((o, k) => {
|
|
135
|
+
o[k] = true;
|
|
136
|
+
return o;
|
|
137
137
|
}, {});
|
|
138
138
|
module2.exports = parseOptions;
|
|
139
139
|
}
|
|
@@ -363,7 +363,7 @@ var require_semver = __commonJS({
|
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
if (identifier) {
|
|
366
|
-
if (this.prerelease[0] ===
|
|
366
|
+
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
367
367
|
if (isNaN(this.prerelease[1])) {
|
|
368
368
|
this.prerelease = [identifier, 0];
|
|
369
369
|
}
|
|
@@ -450,7 +450,7 @@ var require_inc = __commonJS({
|
|
|
450
450
|
options = void 0;
|
|
451
451
|
}
|
|
452
452
|
try {
|
|
453
|
-
return new SemVer2(version, options).inc(release, identifier).version;
|
|
453
|
+
return new SemVer2(version instanceof SemVer2 ? version.version : version, options).inc(release, identifier).version;
|
|
454
454
|
} catch (er) {
|
|
455
455
|
return null;
|
|
456
456
|
}
|
|
@@ -650,16 +650,20 @@ var require_cmp = __commonJS({
|
|
|
650
650
|
var cmp = (a, op, b, loose) => {
|
|
651
651
|
switch (op) {
|
|
652
652
|
case "===":
|
|
653
|
-
if (typeof a === "object")
|
|
653
|
+
if (typeof a === "object") {
|
|
654
654
|
a = a.version;
|
|
655
|
-
|
|
655
|
+
}
|
|
656
|
+
if (typeof b === "object") {
|
|
656
657
|
b = b.version;
|
|
658
|
+
}
|
|
657
659
|
return a === b;
|
|
658
660
|
case "!==":
|
|
659
|
-
if (typeof a === "object")
|
|
661
|
+
if (typeof a === "object") {
|
|
660
662
|
a = a.version;
|
|
661
|
-
|
|
663
|
+
}
|
|
664
|
+
if (typeof b === "object") {
|
|
662
665
|
b = b.version;
|
|
666
|
+
}
|
|
663
667
|
return a !== b;
|
|
664
668
|
case "":
|
|
665
669
|
case "=":
|
|
@@ -713,8 +717,9 @@ var require_coerce = __commonJS({
|
|
|
713
717
|
}
|
|
714
718
|
re[t.COERCERTL].lastIndex = -1;
|
|
715
719
|
}
|
|
716
|
-
if (match === null)
|
|
720
|
+
if (match === null) {
|
|
717
721
|
return null;
|
|
722
|
+
}
|
|
718
723
|
return parse(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options);
|
|
719
724
|
};
|
|
720
725
|
module2.exports = coerce;
|
|
@@ -1395,16 +1400,16 @@ var require_range = __commonJS({
|
|
|
1395
1400
|
this.loose = !!options.loose;
|
|
1396
1401
|
this.includePrerelease = !!options.includePrerelease;
|
|
1397
1402
|
this.raw = range;
|
|
1398
|
-
this.set = range.split(
|
|
1403
|
+
this.set = range.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
1399
1404
|
if (!this.set.length) {
|
|
1400
1405
|
throw new TypeError(`Invalid SemVer Range: ${range}`);
|
|
1401
1406
|
}
|
|
1402
1407
|
if (this.set.length > 1) {
|
|
1403
1408
|
const first = this.set[0];
|
|
1404
1409
|
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
1405
|
-
if (this.set.length === 0)
|
|
1410
|
+
if (this.set.length === 0) {
|
|
1406
1411
|
this.set = [first];
|
|
1407
|
-
else if (this.set.length > 1) {
|
|
1412
|
+
} else if (this.set.length > 1) {
|
|
1408
1413
|
for (const c of this.set) {
|
|
1409
1414
|
if (c.length === 1 && isAny(c[0])) {
|
|
1410
1415
|
this.set = [c];
|
|
@@ -1429,28 +1434,37 @@ var require_range = __commonJS({
|
|
|
1429
1434
|
const memoOpts = Object.keys(this.options).join(",");
|
|
1430
1435
|
const memoKey = `parseRange:${memoOpts}:${range}`;
|
|
1431
1436
|
const cached = cache.get(memoKey);
|
|
1432
|
-
if (cached)
|
|
1437
|
+
if (cached) {
|
|
1433
1438
|
return cached;
|
|
1439
|
+
}
|
|
1434
1440
|
const loose = this.options.loose;
|
|
1435
1441
|
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
1436
1442
|
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
1437
1443
|
debug("hyphen replace", range);
|
|
1438
1444
|
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
1439
|
-
debug("comparator trim", range
|
|
1445
|
+
debug("comparator trim", range);
|
|
1440
1446
|
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
1441
1447
|
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
1442
1448
|
range = range.split(/\s+/).join(" ");
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1449
|
+
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
1450
|
+
if (loose) {
|
|
1451
|
+
rangeList = rangeList.filter((comp) => {
|
|
1452
|
+
debug("loose invalid filter", comp, this.options);
|
|
1453
|
+
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
1454
|
+
});
|
|
1455
|
+
}
|
|
1456
|
+
debug("range list", rangeList);
|
|
1446
1457
|
const rangeMap = /* @__PURE__ */ new Map();
|
|
1447
|
-
|
|
1448
|
-
|
|
1458
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
1459
|
+
for (const comp of comparators) {
|
|
1460
|
+
if (isNullSet(comp)) {
|
|
1449
1461
|
return [comp];
|
|
1462
|
+
}
|
|
1450
1463
|
rangeMap.set(comp.value, comp);
|
|
1451
1464
|
}
|
|
1452
|
-
if (rangeMap.size > 1 && rangeMap.has(""))
|
|
1465
|
+
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
1453
1466
|
rangeMap.delete("");
|
|
1467
|
+
}
|
|
1454
1468
|
const result = [...rangeMap.values()];
|
|
1455
1469
|
cache.set(memoKey, result);
|
|
1456
1470
|
return result;
|
|
@@ -1529,8 +1543,8 @@ var require_range = __commonJS({
|
|
|
1529
1543
|
return comp;
|
|
1530
1544
|
};
|
|
1531
1545
|
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
1532
|
-
var replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((
|
|
1533
|
-
return replaceTilde(
|
|
1546
|
+
var replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => {
|
|
1547
|
+
return replaceTilde(c, options);
|
|
1534
1548
|
}).join(" ");
|
|
1535
1549
|
var replaceTilde = (comp, options) => {
|
|
1536
1550
|
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
@@ -1553,8 +1567,8 @@ var require_range = __commonJS({
|
|
|
1553
1567
|
return ret;
|
|
1554
1568
|
});
|
|
1555
1569
|
};
|
|
1556
|
-
var replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((
|
|
1557
|
-
return replaceCaret(
|
|
1570
|
+
var replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => {
|
|
1571
|
+
return replaceCaret(c, options);
|
|
1558
1572
|
}).join(" ");
|
|
1559
1573
|
var replaceCaret = (comp, options) => {
|
|
1560
1574
|
debug("caret", comp, options);
|
|
@@ -1602,8 +1616,8 @@ var require_range = __commonJS({
|
|
|
1602
1616
|
};
|
|
1603
1617
|
var replaceXRanges = (comp, options) => {
|
|
1604
1618
|
debug("replaceXRanges", comp, options);
|
|
1605
|
-
return comp.split(/\s+/).map((
|
|
1606
|
-
return replaceXRange(
|
|
1619
|
+
return comp.split(/\s+/).map((c) => {
|
|
1620
|
+
return replaceXRange(c, options);
|
|
1607
1621
|
}).join(" ");
|
|
1608
1622
|
};
|
|
1609
1623
|
var replaceXRange = (comp, options) => {
|
|
@@ -1648,8 +1662,9 @@ var require_range = __commonJS({
|
|
|
1648
1662
|
m = +m + 1;
|
|
1649
1663
|
}
|
|
1650
1664
|
}
|
|
1651
|
-
if (gtlt === "<")
|
|
1665
|
+
if (gtlt === "<") {
|
|
1652
1666
|
pr = "-0";
|
|
1667
|
+
}
|
|
1653
1668
|
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
1654
1669
|
} else if (xm) {
|
|
1655
1670
|
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
@@ -1946,8 +1961,9 @@ var require_min_version = __commonJS({
|
|
|
1946
1961
|
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
1947
1962
|
}
|
|
1948
1963
|
});
|
|
1949
|
-
if (setMin && (!minver || gt(minver, setMin)))
|
|
1964
|
+
if (setMin && (!minver || gt(minver, setMin))) {
|
|
1950
1965
|
minver = setMin;
|
|
1966
|
+
}
|
|
1951
1967
|
}
|
|
1952
1968
|
if (minver && range.test(minver)) {
|
|
1953
1969
|
return minver;
|
|
@@ -2079,37 +2095,40 @@ var require_simplify = __commonJS({
|
|
|
2079
2095
|
var compare = require_compare();
|
|
2080
2096
|
module2.exports = (versions, range, options) => {
|
|
2081
2097
|
const set = [];
|
|
2082
|
-
let
|
|
2098
|
+
let first = null;
|
|
2083
2099
|
let prev = null;
|
|
2084
2100
|
const v = versions.sort((a, b) => compare(a, b, options));
|
|
2085
2101
|
for (const version of v) {
|
|
2086
2102
|
const included = satisfies(version, range, options);
|
|
2087
2103
|
if (included) {
|
|
2088
2104
|
prev = version;
|
|
2089
|
-
if (!
|
|
2090
|
-
|
|
2105
|
+
if (!first) {
|
|
2106
|
+
first = version;
|
|
2107
|
+
}
|
|
2091
2108
|
} else {
|
|
2092
2109
|
if (prev) {
|
|
2093
|
-
set.push([
|
|
2110
|
+
set.push([first, prev]);
|
|
2094
2111
|
}
|
|
2095
2112
|
prev = null;
|
|
2096
|
-
|
|
2113
|
+
first = null;
|
|
2097
2114
|
}
|
|
2098
2115
|
}
|
|
2099
|
-
if (
|
|
2100
|
-
set.push([
|
|
2116
|
+
if (first) {
|
|
2117
|
+
set.push([first, null]);
|
|
2118
|
+
}
|
|
2101
2119
|
const ranges = [];
|
|
2102
|
-
for (const [
|
|
2103
|
-
if (
|
|
2104
|
-
ranges.push(
|
|
2105
|
-
else if (!max &&
|
|
2120
|
+
for (const [min, max] of set) {
|
|
2121
|
+
if (min === max) {
|
|
2122
|
+
ranges.push(min);
|
|
2123
|
+
} else if (!max && min === v[0]) {
|
|
2106
2124
|
ranges.push("*");
|
|
2107
|
-
else if (!max)
|
|
2108
|
-
ranges.push(`>=${
|
|
2109
|
-
else if (
|
|
2125
|
+
} else if (!max) {
|
|
2126
|
+
ranges.push(`>=${min}`);
|
|
2127
|
+
} else if (min === v[0]) {
|
|
2110
2128
|
ranges.push(`<=${max}`);
|
|
2111
|
-
else
|
|
2112
|
-
ranges.push(`${
|
|
2129
|
+
} else {
|
|
2130
|
+
ranges.push(`${min} - ${max}`);
|
|
2131
|
+
}
|
|
2113
2132
|
}
|
|
2114
2133
|
const simplified = ranges.join(" || ");
|
|
2115
2134
|
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
@@ -2127,8 +2146,9 @@ var require_subset = __commonJS({
|
|
|
2127
2146
|
var satisfies = require_satisfies();
|
|
2128
2147
|
var compare = require_compare();
|
|
2129
2148
|
var subset = (sub, dom, options = {}) => {
|
|
2130
|
-
if (sub === dom)
|
|
2149
|
+
if (sub === dom) {
|
|
2131
2150
|
return true;
|
|
2151
|
+
}
|
|
2132
2152
|
sub = new Range11(sub, options);
|
|
2133
2153
|
dom = new Range11(dom, options);
|
|
2134
2154
|
let sawNonNull = false;
|
|
@@ -2137,59 +2157,70 @@ var require_subset = __commonJS({
|
|
|
2137
2157
|
for (const simpleDom of dom.set) {
|
|
2138
2158
|
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
2139
2159
|
sawNonNull = sawNonNull || isSub !== null;
|
|
2140
|
-
if (isSub)
|
|
2160
|
+
if (isSub) {
|
|
2141
2161
|
continue OUTER;
|
|
2162
|
+
}
|
|
2142
2163
|
}
|
|
2143
|
-
if (sawNonNull)
|
|
2164
|
+
if (sawNonNull) {
|
|
2144
2165
|
return false;
|
|
2166
|
+
}
|
|
2145
2167
|
}
|
|
2146
2168
|
return true;
|
|
2147
2169
|
};
|
|
2148
2170
|
var simpleSubset = (sub, dom, options) => {
|
|
2149
|
-
if (sub === dom)
|
|
2171
|
+
if (sub === dom) {
|
|
2150
2172
|
return true;
|
|
2173
|
+
}
|
|
2151
2174
|
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
2152
|
-
if (dom.length === 1 && dom[0].semver === ANY)
|
|
2175
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
2153
2176
|
return true;
|
|
2154
|
-
else if (options.includePrerelease)
|
|
2177
|
+
} else if (options.includePrerelease) {
|
|
2155
2178
|
sub = [new Comparator(">=0.0.0-0")];
|
|
2156
|
-
else
|
|
2179
|
+
} else {
|
|
2157
2180
|
sub = [new Comparator(">=0.0.0")];
|
|
2181
|
+
}
|
|
2158
2182
|
}
|
|
2159
2183
|
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
2160
|
-
if (options.includePrerelease)
|
|
2184
|
+
if (options.includePrerelease) {
|
|
2161
2185
|
return true;
|
|
2162
|
-
else
|
|
2186
|
+
} else {
|
|
2163
2187
|
dom = [new Comparator(">=0.0.0")];
|
|
2188
|
+
}
|
|
2164
2189
|
}
|
|
2165
2190
|
const eqSet = /* @__PURE__ */ new Set();
|
|
2166
2191
|
let gt, lt2;
|
|
2167
2192
|
for (const c of sub) {
|
|
2168
|
-
if (c.operator === ">" || c.operator === ">=")
|
|
2193
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
2169
2194
|
gt = higherGT(gt, c, options);
|
|
2170
|
-
else if (c.operator === "<" || c.operator === "<=")
|
|
2195
|
+
} else if (c.operator === "<" || c.operator === "<=") {
|
|
2171
2196
|
lt2 = lowerLT(lt2, c, options);
|
|
2172
|
-
else
|
|
2197
|
+
} else {
|
|
2173
2198
|
eqSet.add(c.semver);
|
|
2199
|
+
}
|
|
2174
2200
|
}
|
|
2175
|
-
if (eqSet.size > 1)
|
|
2201
|
+
if (eqSet.size > 1) {
|
|
2176
2202
|
return null;
|
|
2203
|
+
}
|
|
2177
2204
|
let gtltComp;
|
|
2178
2205
|
if (gt && lt2) {
|
|
2179
2206
|
gtltComp = compare(gt.semver, lt2.semver, options);
|
|
2180
|
-
if (gtltComp > 0)
|
|
2207
|
+
if (gtltComp > 0) {
|
|
2181
2208
|
return null;
|
|
2182
|
-
else if (gtltComp === 0 && (gt.operator !== ">=" || lt2.operator !== "<="))
|
|
2209
|
+
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt2.operator !== "<=")) {
|
|
2183
2210
|
return null;
|
|
2211
|
+
}
|
|
2184
2212
|
}
|
|
2185
2213
|
for (const eq of eqSet) {
|
|
2186
|
-
if (gt && !satisfies(eq, String(gt), options))
|
|
2214
|
+
if (gt && !satisfies(eq, String(gt), options)) {
|
|
2187
2215
|
return null;
|
|
2188
|
-
|
|
2216
|
+
}
|
|
2217
|
+
if (lt2 && !satisfies(eq, String(lt2), options)) {
|
|
2189
2218
|
return null;
|
|
2219
|
+
}
|
|
2190
2220
|
for (const c of dom) {
|
|
2191
|
-
if (!satisfies(eq, String(c), options))
|
|
2221
|
+
if (!satisfies(eq, String(c), options)) {
|
|
2192
2222
|
return false;
|
|
2223
|
+
}
|
|
2193
2224
|
}
|
|
2194
2225
|
return true;
|
|
2195
2226
|
}
|
|
@@ -2211,10 +2242,12 @@ var require_subset = __commonJS({
|
|
|
2211
2242
|
}
|
|
2212
2243
|
if (c.operator === ">" || c.operator === ">=") {
|
|
2213
2244
|
higher = higherGT(gt, c, options);
|
|
2214
|
-
if (higher === c && higher !== gt)
|
|
2245
|
+
if (higher === c && higher !== gt) {
|
|
2215
2246
|
return false;
|
|
2216
|
-
|
|
2247
|
+
}
|
|
2248
|
+
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
|
|
2217
2249
|
return false;
|
|
2250
|
+
}
|
|
2218
2251
|
}
|
|
2219
2252
|
if (lt2) {
|
|
2220
2253
|
if (needDomLTPre) {
|
|
@@ -2224,31 +2257,39 @@ var require_subset = __commonJS({
|
|
|
2224
2257
|
}
|
|
2225
2258
|
if (c.operator === "<" || c.operator === "<=") {
|
|
2226
2259
|
lower = lowerLT(lt2, c, options);
|
|
2227
|
-
if (lower === c && lower !== lt2)
|
|
2260
|
+
if (lower === c && lower !== lt2) {
|
|
2228
2261
|
return false;
|
|
2229
|
-
|
|
2262
|
+
}
|
|
2263
|
+
} else if (lt2.operator === "<=" && !satisfies(lt2.semver, String(c), options)) {
|
|
2230
2264
|
return false;
|
|
2265
|
+
}
|
|
2231
2266
|
}
|
|
2232
|
-
if (!c.operator && (lt2 || gt) && gtltComp !== 0)
|
|
2267
|
+
if (!c.operator && (lt2 || gt) && gtltComp !== 0) {
|
|
2233
2268
|
return false;
|
|
2269
|
+
}
|
|
2234
2270
|
}
|
|
2235
|
-
if (gt && hasDomLT && !lt2 && gtltComp !== 0)
|
|
2271
|
+
if (gt && hasDomLT && !lt2 && gtltComp !== 0) {
|
|
2236
2272
|
return false;
|
|
2237
|
-
|
|
2273
|
+
}
|
|
2274
|
+
if (lt2 && hasDomGT && !gt && gtltComp !== 0) {
|
|
2238
2275
|
return false;
|
|
2239
|
-
|
|
2276
|
+
}
|
|
2277
|
+
if (needDomGTPre || needDomLTPre) {
|
|
2240
2278
|
return false;
|
|
2279
|
+
}
|
|
2241
2280
|
return true;
|
|
2242
2281
|
};
|
|
2243
2282
|
var higherGT = (a, b, options) => {
|
|
2244
|
-
if (!a)
|
|
2283
|
+
if (!a) {
|
|
2245
2284
|
return b;
|
|
2285
|
+
}
|
|
2246
2286
|
const comp = compare(a.semver, b.semver, options);
|
|
2247
2287
|
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
2248
2288
|
};
|
|
2249
2289
|
var lowerLT = (a, b, options) => {
|
|
2250
|
-
if (!a)
|
|
2290
|
+
if (!a) {
|
|
2251
2291
|
return b;
|
|
2292
|
+
}
|
|
2252
2293
|
const comp = compare(a.semver, b.semver, options);
|
|
2253
2294
|
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
2254
2295
|
};
|
|
@@ -3325,7 +3366,6 @@ var require_fs = __commonJS({
|
|
|
3325
3366
|
api.forEach((method2) => {
|
|
3326
3367
|
exports[method2] = u(fs6[method2]);
|
|
3327
3368
|
});
|
|
3328
|
-
exports.realpath.native = u(fs6.realpath.native);
|
|
3329
3369
|
exports.exists = function(filename, callback) {
|
|
3330
3370
|
if (typeof callback === "function") {
|
|
3331
3371
|
return fs6.exists(filename, callback);
|
|
@@ -3372,6 +3412,11 @@ var require_fs = __commonJS({
|
|
|
3372
3412
|
});
|
|
3373
3413
|
};
|
|
3374
3414
|
}
|
|
3415
|
+
if (typeof fs6.realpath.native === "function") {
|
|
3416
|
+
exports.realpath.native = u(fs6.realpath.native);
|
|
3417
|
+
} else {
|
|
3418
|
+
process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?", "Warning", "fs-extra-WARN0003");
|
|
3419
|
+
}
|
|
3375
3420
|
}
|
|
3376
3421
|
});
|
|
3377
3422
|
|
|
@@ -3646,9 +3691,7 @@ var require_copy = __commonJS({
|
|
|
3646
3691
|
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
|
3647
3692
|
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
|
3648
3693
|
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`);
|
|
3694
|
+
process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269", "Warning", "fs-extra-WARN0001");
|
|
3652
3695
|
}
|
|
3653
3696
|
stat.checkPaths(src, dest, "copy", opts, (err, stats) => {
|
|
3654
3697
|
if (err)
|
|
@@ -3867,9 +3910,7 @@ var require_copy_sync = __commonJS({
|
|
|
3867
3910
|
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
|
3868
3911
|
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
|
3869
3912
|
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`);
|
|
3913
|
+
process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269", "Warning", "fs-extra-WARN0002");
|
|
3873
3914
|
}
|
|
3874
3915
|
const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
3875
3916
|
stat.checkParentPathsSync(src, srcStat, dest, "copy");
|
|
@@ -4911,6 +4952,7 @@ var require_move = __commonJS({
|
|
|
4911
4952
|
cb = opts;
|
|
4912
4953
|
opts = {};
|
|
4913
4954
|
}
|
|
4955
|
+
opts = opts || {};
|
|
4914
4956
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
4915
4957
|
stat.checkPaths(src, dest, "move", opts, (err, stats) => {
|
|
4916
4958
|
if (err)
|
|
@@ -20199,11 +20241,15 @@ var require_minimatch = __commonJS({
|
|
|
20199
20241
|
"node_modules/minimatch/minimatch.js"(exports, module2) {
|
|
20200
20242
|
module2.exports = minimatch;
|
|
20201
20243
|
minimatch.Minimatch = Minimatch2;
|
|
20202
|
-
var path10 = {
|
|
20203
|
-
|
|
20204
|
-
|
|
20205
|
-
|
|
20206
|
-
|
|
20244
|
+
var path10 = function() {
|
|
20245
|
+
try {
|
|
20246
|
+
return require("path");
|
|
20247
|
+
} catch (e) {
|
|
20248
|
+
}
|
|
20249
|
+
}() || {
|
|
20250
|
+
sep: "/"
|
|
20251
|
+
};
|
|
20252
|
+
minimatch.sep = path10.sep;
|
|
20207
20253
|
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch2.GLOBSTAR = {};
|
|
20208
20254
|
var expand = require_brace_expansion();
|
|
20209
20255
|
var plTypes = {
|
|
@@ -20233,58 +20279,68 @@ var require_minimatch = __commonJS({
|
|
|
20233
20279
|
};
|
|
20234
20280
|
}
|
|
20235
20281
|
function ext(a, b) {
|
|
20236
|
-
a = a || {};
|
|
20237
20282
|
b = b || {};
|
|
20238
20283
|
var t = {};
|
|
20239
|
-
Object.keys(b).forEach(function(k) {
|
|
20240
|
-
t[k] = b[k];
|
|
20241
|
-
});
|
|
20242
20284
|
Object.keys(a).forEach(function(k) {
|
|
20243
20285
|
t[k] = a[k];
|
|
20244
20286
|
});
|
|
20287
|
+
Object.keys(b).forEach(function(k) {
|
|
20288
|
+
t[k] = b[k];
|
|
20289
|
+
});
|
|
20245
20290
|
return t;
|
|
20246
20291
|
}
|
|
20247
20292
|
minimatch.defaults = function(def) {
|
|
20248
|
-
if (!def || !Object.keys(def).length)
|
|
20293
|
+
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
|
20249
20294
|
return minimatch;
|
|
20295
|
+
}
|
|
20250
20296
|
var orig = minimatch;
|
|
20251
20297
|
var m = function minimatch2(p, pattern, options) {
|
|
20252
|
-
return orig
|
|
20298
|
+
return orig(p, pattern, ext(def, options));
|
|
20253
20299
|
};
|
|
20254
20300
|
m.Minimatch = function Minimatch3(pattern, options) {
|
|
20255
20301
|
return new orig.Minimatch(pattern, ext(def, options));
|
|
20256
20302
|
};
|
|
20303
|
+
m.Minimatch.defaults = function defaults(options) {
|
|
20304
|
+
return orig.defaults(ext(def, options)).Minimatch;
|
|
20305
|
+
};
|
|
20306
|
+
m.filter = function filter2(pattern, options) {
|
|
20307
|
+
return orig.filter(pattern, ext(def, options));
|
|
20308
|
+
};
|
|
20309
|
+
m.defaults = function defaults(options) {
|
|
20310
|
+
return orig.defaults(ext(def, options));
|
|
20311
|
+
};
|
|
20312
|
+
m.makeRe = function makeRe2(pattern, options) {
|
|
20313
|
+
return orig.makeRe(pattern, ext(def, options));
|
|
20314
|
+
};
|
|
20315
|
+
m.braceExpand = function braceExpand2(pattern, options) {
|
|
20316
|
+
return orig.braceExpand(pattern, ext(def, options));
|
|
20317
|
+
};
|
|
20318
|
+
m.match = function(list, pattern, options) {
|
|
20319
|
+
return orig.match(list, pattern, ext(def, options));
|
|
20320
|
+
};
|
|
20257
20321
|
return m;
|
|
20258
20322
|
};
|
|
20259
20323
|
Minimatch2.defaults = function(def) {
|
|
20260
|
-
if (!def || !Object.keys(def).length)
|
|
20261
|
-
return Minimatch2;
|
|
20262
20324
|
return minimatch.defaults(def).Minimatch;
|
|
20263
20325
|
};
|
|
20264
20326
|
function minimatch(p, pattern, options) {
|
|
20265
|
-
|
|
20266
|
-
throw new TypeError("glob pattern string required");
|
|
20267
|
-
}
|
|
20327
|
+
assertValidPattern(pattern);
|
|
20268
20328
|
if (!options)
|
|
20269
20329
|
options = {};
|
|
20270
20330
|
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
20271
20331
|
return false;
|
|
20272
20332
|
}
|
|
20273
|
-
if (pattern.trim() === "")
|
|
20274
|
-
return p === "";
|
|
20275
20333
|
return new Minimatch2(pattern, options).match(p);
|
|
20276
20334
|
}
|
|
20277
20335
|
function Minimatch2(pattern, options) {
|
|
20278
20336
|
if (!(this instanceof Minimatch2)) {
|
|
20279
20337
|
return new Minimatch2(pattern, options);
|
|
20280
20338
|
}
|
|
20281
|
-
|
|
20282
|
-
throw new TypeError("glob pattern string required");
|
|
20283
|
-
}
|
|
20339
|
+
assertValidPattern(pattern);
|
|
20284
20340
|
if (!options)
|
|
20285
20341
|
options = {};
|
|
20286
20342
|
pattern = pattern.trim();
|
|
20287
|
-
if (path10.sep !== "/") {
|
|
20343
|
+
if (!options.allowWindowsEscape && path10.sep !== "/") {
|
|
20288
20344
|
pattern = pattern.split(path10.sep).join("/");
|
|
20289
20345
|
}
|
|
20290
20346
|
this.options = options;
|
|
@@ -20294,14 +20350,13 @@ var require_minimatch = __commonJS({
|
|
|
20294
20350
|
this.negate = false;
|
|
20295
20351
|
this.comment = false;
|
|
20296
20352
|
this.empty = false;
|
|
20353
|
+
this.partial = !!options.partial;
|
|
20297
20354
|
this.make();
|
|
20298
20355
|
}
|
|
20299
20356
|
Minimatch2.prototype.debug = function() {
|
|
20300
20357
|
};
|
|
20301
20358
|
Minimatch2.prototype.make = make;
|
|
20302
20359
|
function make() {
|
|
20303
|
-
if (this._made)
|
|
20304
|
-
return;
|
|
20305
20360
|
var pattern = this.pattern;
|
|
20306
20361
|
var options = this.options;
|
|
20307
20362
|
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
@@ -20315,7 +20370,9 @@ var require_minimatch = __commonJS({
|
|
|
20315
20370
|
this.parseNegate();
|
|
20316
20371
|
var set = this.globSet = this.braceExpand();
|
|
20317
20372
|
if (options.debug)
|
|
20318
|
-
this.debug =
|
|
20373
|
+
this.debug = function debug() {
|
|
20374
|
+
console.error.apply(console, arguments);
|
|
20375
|
+
};
|
|
20319
20376
|
this.debug(this.pattern, set);
|
|
20320
20377
|
set = this.globParts = set.map(function(s) {
|
|
20321
20378
|
return s.split(slashSplit);
|
|
@@ -20360,23 +20417,32 @@ var require_minimatch = __commonJS({
|
|
|
20360
20417
|
}
|
|
20361
20418
|
}
|
|
20362
20419
|
pattern = typeof pattern === "undefined" ? this.pattern : pattern;
|
|
20363
|
-
|
|
20364
|
-
|
|
20365
|
-
}
|
|
20366
|
-
if (options.nobrace || !pattern.match(/\{.*\}/)) {
|
|
20420
|
+
assertValidPattern(pattern);
|
|
20421
|
+
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
20367
20422
|
return [pattern];
|
|
20368
20423
|
}
|
|
20369
20424
|
return expand(pattern);
|
|
20370
20425
|
}
|
|
20426
|
+
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
20427
|
+
var assertValidPattern = function(pattern) {
|
|
20428
|
+
if (typeof pattern !== "string") {
|
|
20429
|
+
throw new TypeError("invalid pattern");
|
|
20430
|
+
}
|
|
20431
|
+
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
20432
|
+
throw new TypeError("pattern is too long");
|
|
20433
|
+
}
|
|
20434
|
+
};
|
|
20371
20435
|
Minimatch2.prototype.parse = parse;
|
|
20372
20436
|
var SUBPARSE = {};
|
|
20373
20437
|
function parse(pattern, isSub) {
|
|
20374
|
-
|
|
20375
|
-
throw new TypeError("pattern is too long");
|
|
20376
|
-
}
|
|
20438
|
+
assertValidPattern(pattern);
|
|
20377
20439
|
var options = this.options;
|
|
20378
|
-
if (
|
|
20379
|
-
|
|
20440
|
+
if (pattern === "**") {
|
|
20441
|
+
if (!options.noglobstar)
|
|
20442
|
+
return GLOBSTAR;
|
|
20443
|
+
else
|
|
20444
|
+
pattern = "*";
|
|
20445
|
+
}
|
|
20380
20446
|
if (pattern === "")
|
|
20381
20447
|
return "";
|
|
20382
20448
|
var re = "";
|
|
@@ -20417,8 +20483,9 @@ var require_minimatch = __commonJS({
|
|
|
20417
20483
|
continue;
|
|
20418
20484
|
}
|
|
20419
20485
|
switch (c) {
|
|
20420
|
-
case "/":
|
|
20486
|
+
case "/": {
|
|
20421
20487
|
return false;
|
|
20488
|
+
}
|
|
20422
20489
|
case "\\":
|
|
20423
20490
|
clearStateChar();
|
|
20424
20491
|
escaping = true;
|
|
@@ -20502,17 +20569,15 @@ var require_minimatch = __commonJS({
|
|
|
20502
20569
|
escaping = false;
|
|
20503
20570
|
continue;
|
|
20504
20571
|
}
|
|
20505
|
-
|
|
20506
|
-
|
|
20507
|
-
|
|
20508
|
-
|
|
20509
|
-
|
|
20510
|
-
|
|
20511
|
-
|
|
20512
|
-
|
|
20513
|
-
|
|
20514
|
-
continue;
|
|
20515
|
-
}
|
|
20572
|
+
var cs = pattern.substring(classStart + 1, i);
|
|
20573
|
+
try {
|
|
20574
|
+
RegExp("[" + cs + "]");
|
|
20575
|
+
} catch (er) {
|
|
20576
|
+
var sp = this.parse(cs, SUBPARSE);
|
|
20577
|
+
re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
|
|
20578
|
+
hasMagic = hasMagic || sp[1];
|
|
20579
|
+
inClass = false;
|
|
20580
|
+
continue;
|
|
20516
20581
|
}
|
|
20517
20582
|
hasMagic = true;
|
|
20518
20583
|
inClass = false;
|
|
@@ -20554,8 +20619,8 @@ var require_minimatch = __commonJS({
|
|
|
20554
20619
|
}
|
|
20555
20620
|
var addPatternStart = false;
|
|
20556
20621
|
switch (re.charAt(0)) {
|
|
20557
|
-
case ".":
|
|
20558
20622
|
case "[":
|
|
20623
|
+
case ".":
|
|
20559
20624
|
case "(":
|
|
20560
20625
|
addPatternStart = true;
|
|
20561
20626
|
}
|
|
@@ -20642,8 +20707,9 @@ var require_minimatch = __commonJS({
|
|
|
20642
20707
|
}
|
|
20643
20708
|
return list;
|
|
20644
20709
|
};
|
|
20645
|
-
Minimatch2.prototype.match = match
|
|
20646
|
-
|
|
20710
|
+
Minimatch2.prototype.match = function match(f, partial) {
|
|
20711
|
+
if (typeof partial === "undefined")
|
|
20712
|
+
partial = this.partial;
|
|
20647
20713
|
this.debug("match", f, this.pattern);
|
|
20648
20714
|
if (this.comment)
|
|
20649
20715
|
return false;
|
|
@@ -20682,7 +20748,7 @@ var require_minimatch = __commonJS({
|
|
|
20682
20748
|
if (options.flipNegate)
|
|
20683
20749
|
return false;
|
|
20684
20750
|
return this.negate;
|
|
20685
|
-
}
|
|
20751
|
+
};
|
|
20686
20752
|
Minimatch2.prototype.matchOne = function(file, pattern, partial) {
|
|
20687
20753
|
var options = this.options;
|
|
20688
20754
|
this.debug("matchOne", { "this": this, file, pattern });
|
|
@@ -20730,11 +20796,7 @@ var require_minimatch = __commonJS({
|
|
|
20730
20796
|
}
|
|
20731
20797
|
var hit;
|
|
20732
20798
|
if (typeof p === "string") {
|
|
20733
|
-
|
|
20734
|
-
hit = f.toLowerCase() === p.toLowerCase();
|
|
20735
|
-
} else {
|
|
20736
|
-
hit = f === p;
|
|
20737
|
-
}
|
|
20799
|
+
hit = f === p;
|
|
20738
20800
|
this.debug("string match", p, f, hit);
|
|
20739
20801
|
} else {
|
|
20740
20802
|
hit = f.match(p);
|
|
@@ -20748,8 +20810,7 @@ var require_minimatch = __commonJS({
|
|
|
20748
20810
|
} else if (fi === fl) {
|
|
20749
20811
|
return partial;
|
|
20750
20812
|
} else if (pi === pl) {
|
|
20751
|
-
|
|
20752
|
-
return emptyFileEnd;
|
|
20813
|
+
return fi === fl - 1 && file[fi] === "";
|
|
20753
20814
|
}
|
|
20754
20815
|
throw new Error("wtf?");
|
|
20755
20816
|
};
|
|
@@ -21230,7 +21291,8 @@ var _PythonSettings = class {
|
|
|
21230
21291
|
}
|
|
21231
21292
|
resolvePythonFromVENV() {
|
|
21232
21293
|
function pythonBinFromPath(p) {
|
|
21233
|
-
|
|
21294
|
+
const fullPath = process.platform === "win32" ? import_path.default.join(p, "Scripts", "python.exe") : import_path.default.join(p, "bin", "python");
|
|
21295
|
+
return import_fs_extra.default.existsSync(fullPath) ? import_fs_extra.default.realpathSync(fullPath) : void 0;
|
|
21234
21296
|
}
|
|
21235
21297
|
try {
|
|
21236
21298
|
if (process.env.VIRTUAL_ENV && import_fs_extra.default.existsSync(import_path.default.join(process.env.VIRTUAL_ENV, "pyvenv.cfg"))) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coc-pyright",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.251",
|
|
4
4
|
"description": "Pyright extension for coc.nvim, static type checker for Python",
|
|
5
5
|
"author": "Heyward Fann <fannheyward@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1403,6 +1403,6 @@
|
|
|
1403
1403
|
]
|
|
1404
1404
|
},
|
|
1405
1405
|
"dependencies": {
|
|
1406
|
-
"pyright": "^1.1.
|
|
1406
|
+
"pyright": "^1.1.251"
|
|
1407
1407
|
}
|
|
1408
1408
|
}
|