@jsse/eslint-config 0.1.20 → 0.1.22
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/LICENSE +21 -21
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +256 -170
- package/dist/index.d.cts +530 -330
- package/dist/index.d.ts +530 -330
- package/dist/index.js +257 -171
- package/package.json +27 -28
package/dist/index.js
CHANGED
|
@@ -24,9 +24,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
mod
|
|
25
25
|
));
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/globals@15.
|
|
27
|
+
// node_modules/.pnpm/globals@15.9.0/node_modules/globals/globals.json
|
|
28
28
|
var require_globals = __commonJS({
|
|
29
|
-
"node_modules/.pnpm/globals@15.
|
|
29
|
+
"node_modules/.pnpm/globals@15.9.0/node_modules/globals/globals.json"(exports, module) {
|
|
30
30
|
module.exports = {
|
|
31
31
|
amd: {
|
|
32
32
|
define: false,
|
|
@@ -62,6 +62,9 @@ var require_globals = __commonJS({
|
|
|
62
62
|
AbstractRange: false,
|
|
63
63
|
Accelerometer: false,
|
|
64
64
|
addEventListener: false,
|
|
65
|
+
ai: false,
|
|
66
|
+
AI: false,
|
|
67
|
+
AITextSession: false,
|
|
65
68
|
alert: false,
|
|
66
69
|
AnalyserNode: false,
|
|
67
70
|
Animation: false,
|
|
@@ -131,6 +134,7 @@ var require_globals = __commonJS({
|
|
|
131
134
|
CDATASection: false,
|
|
132
135
|
ChannelMergerNode: false,
|
|
133
136
|
ChannelSplitterNode: false,
|
|
137
|
+
ChapterInformation: false,
|
|
134
138
|
CharacterBoundsUpdateEvent: false,
|
|
135
139
|
CharacterData: false,
|
|
136
140
|
clearInterval: false,
|
|
@@ -195,6 +199,7 @@ var require_globals = __commonJS({
|
|
|
195
199
|
CSSNamespaceRule: false,
|
|
196
200
|
CSSNumericArray: false,
|
|
197
201
|
CSSNumericValue: false,
|
|
202
|
+
CSSPageDescriptors: false,
|
|
198
203
|
CSSPageRule: false,
|
|
199
204
|
CSSPerspective: false,
|
|
200
205
|
CSSPositionTryDescriptors: false,
|
|
@@ -2647,6 +2652,7 @@ var require_globals = __commonJS({
|
|
|
2647
2652
|
AbortController: false,
|
|
2648
2653
|
AbortSignal: false,
|
|
2649
2654
|
addEventListener: false,
|
|
2655
|
+
ai: false,
|
|
2650
2656
|
atob: false,
|
|
2651
2657
|
AudioData: false,
|
|
2652
2658
|
AudioDecoder: false,
|
|
@@ -2957,9 +2963,9 @@ var require_globals = __commonJS({
|
|
|
2957
2963
|
}
|
|
2958
2964
|
});
|
|
2959
2965
|
|
|
2960
|
-
// node_modules/.pnpm/globals@15.
|
|
2966
|
+
// node_modules/.pnpm/globals@15.9.0/node_modules/globals/index.js
|
|
2961
2967
|
var require_globals2 = __commonJS({
|
|
2962
|
-
"node_modules/.pnpm/globals@15.
|
|
2968
|
+
"node_modules/.pnpm/globals@15.9.0/node_modules/globals/index.js"(exports, module) {
|
|
2963
2969
|
"use strict";
|
|
2964
2970
|
module.exports = require_globals();
|
|
2965
2971
|
}
|
|
@@ -2973,7 +2979,7 @@ import process5 from "process";
|
|
|
2973
2979
|
import path3, { dirname as dirname3, win32, join as join2 } from "path";
|
|
2974
2980
|
import process2 from "process";
|
|
2975
2981
|
|
|
2976
|
-
// node_modules/.pnpm/acorn@8.
|
|
2982
|
+
// node_modules/.pnpm/acorn@8.12.1/node_modules/acorn/dist/acorn.mjs
|
|
2977
2983
|
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
2978
2984
|
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
|
|
2979
2985
|
var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
|
|
@@ -3521,7 +3527,7 @@ Parser.tokenizer = function tokenizer(input, options) {
|
|
|
3521
3527
|
};
|
|
3522
3528
|
Object.defineProperties(Parser.prototype, prototypeAccessors);
|
|
3523
3529
|
var pp$9 = Parser.prototype;
|
|
3524
|
-
var literal = /^(?:'((
|
|
3530
|
+
var literal = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
3525
3531
|
pp$9.strictDirective = function(start) {
|
|
3526
3532
|
if (this.options.ecmaVersion < 5) {
|
|
3527
3533
|
return false;
|
|
@@ -3880,16 +3886,21 @@ pp$8.parseForStatement = function(node) {
|
|
|
3880
3886
|
return this.parseFor(node, init$1);
|
|
3881
3887
|
}
|
|
3882
3888
|
var startsWithLet = this.isContextual("let"), isForOf = false;
|
|
3889
|
+
var containsEsc = this.containsEsc;
|
|
3883
3890
|
var refDestructuringErrors = new DestructuringErrors();
|
|
3884
|
-
var
|
|
3891
|
+
var initPos = this.start;
|
|
3892
|
+
var init = awaitAt > -1 ? this.parseExprSubscripts(refDestructuringErrors, "await") : this.parseExpression(true, refDestructuringErrors);
|
|
3885
3893
|
if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
|
|
3886
|
-
if (
|
|
3894
|
+
if (awaitAt > -1) {
|
|
3887
3895
|
if (this.type === types$1._in) {
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3896
|
+
this.unexpected(awaitAt);
|
|
3897
|
+
}
|
|
3898
|
+
node.await = true;
|
|
3899
|
+
} else if (isForOf && this.options.ecmaVersion >= 8) {
|
|
3900
|
+
if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") {
|
|
3901
|
+
this.unexpected();
|
|
3902
|
+
} else if (this.options.ecmaVersion >= 9) {
|
|
3903
|
+
node.await = false;
|
|
3893
3904
|
}
|
|
3894
3905
|
}
|
|
3895
3906
|
if (startsWithLet && isForOf) {
|
|
@@ -5240,7 +5251,7 @@ pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forIni
|
|
|
5240
5251
|
this.checkExpressionErrors(refDestructuringErrors, true);
|
|
5241
5252
|
if (update) {
|
|
5242
5253
|
this.checkLValSimple(node.argument);
|
|
5243
|
-
} else if (this.strict && node.operator === "delete" && node.argument
|
|
5254
|
+
} else if (this.strict && node.operator === "delete" && isLocalVariableAccess(node.argument)) {
|
|
5244
5255
|
this.raiseRecoverable(node.start, "Deleting local variable in strict mode");
|
|
5245
5256
|
} else if (node.operator === "delete" && isPrivateFieldAccess(node.argument)) {
|
|
5246
5257
|
this.raiseRecoverable(node.start, "Private fields can not be deleted");
|
|
@@ -5281,8 +5292,11 @@ pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forIni
|
|
|
5281
5292
|
return expr;
|
|
5282
5293
|
}
|
|
5283
5294
|
};
|
|
5295
|
+
function isLocalVariableAccess(node) {
|
|
5296
|
+
return node.type === "Identifier" || node.type === "ParenthesizedExpression" && isLocalVariableAccess(node.expression);
|
|
5297
|
+
}
|
|
5284
5298
|
function isPrivateFieldAccess(node) {
|
|
5285
|
-
return node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || node.type === "ChainExpression" && isPrivateFieldAccess(node.expression);
|
|
5299
|
+
return node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) || node.type === "ParenthesizedExpression" && isPrivateFieldAccess(node.expression);
|
|
5286
5300
|
}
|
|
5287
5301
|
pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) {
|
|
5288
5302
|
var startPos = this.start, startLoc = this.startLoc;
|
|
@@ -5668,7 +5682,7 @@ pp$5.parseTemplateElement = function(ref2) {
|
|
|
5668
5682
|
this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
|
|
5669
5683
|
}
|
|
5670
5684
|
elem.value = {
|
|
5671
|
-
raw: this.value,
|
|
5685
|
+
raw: this.value.replace(/\r\n?/g, "\n"),
|
|
5672
5686
|
cooked: null
|
|
5673
5687
|
};
|
|
5674
5688
|
} else {
|
|
@@ -6262,6 +6276,23 @@ var ecmaVersion;
|
|
|
6262
6276
|
var i;
|
|
6263
6277
|
var list;
|
|
6264
6278
|
var pp$1 = Parser.prototype;
|
|
6279
|
+
var BranchID = function BranchID2(parent, base) {
|
|
6280
|
+
this.parent = parent;
|
|
6281
|
+
this.base = base || this;
|
|
6282
|
+
};
|
|
6283
|
+
BranchID.prototype.separatedFrom = function separatedFrom(alt) {
|
|
6284
|
+
for (var self = this; self; self = self.parent) {
|
|
6285
|
+
for (var other = alt; other; other = other.parent) {
|
|
6286
|
+
if (self.base === other.base && self !== other) {
|
|
6287
|
+
return true;
|
|
6288
|
+
}
|
|
6289
|
+
}
|
|
6290
|
+
}
|
|
6291
|
+
return false;
|
|
6292
|
+
};
|
|
6293
|
+
BranchID.prototype.sibling = function sibling() {
|
|
6294
|
+
return new BranchID(this.parent, this.base);
|
|
6295
|
+
};
|
|
6265
6296
|
var RegExpValidationState = function RegExpValidationState2(parser) {
|
|
6266
6297
|
this.parser = parser;
|
|
6267
6298
|
this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : "");
|
|
@@ -6278,8 +6309,9 @@ var RegExpValidationState = function RegExpValidationState2(parser) {
|
|
|
6278
6309
|
this.lastAssertionIsQuantifiable = false;
|
|
6279
6310
|
this.numCapturingParens = 0;
|
|
6280
6311
|
this.maxBackReference = 0;
|
|
6281
|
-
this.groupNames =
|
|
6312
|
+
this.groupNames = /* @__PURE__ */ Object.create(null);
|
|
6282
6313
|
this.backReferenceNames = [];
|
|
6314
|
+
this.branchID = null;
|
|
6283
6315
|
};
|
|
6284
6316
|
RegExpValidationState.prototype.reset = function reset(start, pattern, flags) {
|
|
6285
6317
|
var unicodeSets = flags.indexOf("v") !== -1;
|
|
@@ -6385,9 +6417,15 @@ pp$1.validateRegExpFlags = function(state) {
|
|
|
6385
6417
|
this.raise(state.start, "Invalid regular expression flag");
|
|
6386
6418
|
}
|
|
6387
6419
|
};
|
|
6420
|
+
function hasProp(obj) {
|
|
6421
|
+
for (var _ in obj) {
|
|
6422
|
+
return true;
|
|
6423
|
+
}
|
|
6424
|
+
return false;
|
|
6425
|
+
}
|
|
6388
6426
|
pp$1.validateRegExpPattern = function(state) {
|
|
6389
6427
|
this.regexp_pattern(state);
|
|
6390
|
-
if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames
|
|
6428
|
+
if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) {
|
|
6391
6429
|
state.switchN = true;
|
|
6392
6430
|
this.regexp_pattern(state);
|
|
6393
6431
|
}
|
|
@@ -6399,8 +6437,9 @@ pp$1.regexp_pattern = function(state) {
|
|
|
6399
6437
|
state.lastAssertionIsQuantifiable = false;
|
|
6400
6438
|
state.numCapturingParens = 0;
|
|
6401
6439
|
state.maxBackReference = 0;
|
|
6402
|
-
state.groupNames
|
|
6440
|
+
state.groupNames = /* @__PURE__ */ Object.create(null);
|
|
6403
6441
|
state.backReferenceNames.length = 0;
|
|
6442
|
+
state.branchID = null;
|
|
6404
6443
|
this.regexp_disjunction(state);
|
|
6405
6444
|
if (state.pos !== state.source.length) {
|
|
6406
6445
|
if (state.eat(
|
|
@@ -6424,19 +6463,29 @@ pp$1.regexp_pattern = function(state) {
|
|
|
6424
6463
|
}
|
|
6425
6464
|
for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) {
|
|
6426
6465
|
var name = list[i];
|
|
6427
|
-
if (state.groupNames
|
|
6466
|
+
if (!state.groupNames[name]) {
|
|
6428
6467
|
state.raise("Invalid named capture referenced");
|
|
6429
6468
|
}
|
|
6430
6469
|
}
|
|
6431
6470
|
};
|
|
6432
6471
|
pp$1.regexp_disjunction = function(state) {
|
|
6472
|
+
var trackDisjunction = this.options.ecmaVersion >= 16;
|
|
6473
|
+
if (trackDisjunction) {
|
|
6474
|
+
state.branchID = new BranchID(state.branchID, null);
|
|
6475
|
+
}
|
|
6433
6476
|
this.regexp_alternative(state);
|
|
6434
6477
|
while (state.eat(
|
|
6435
6478
|
124
|
|
6436
6479
|
/* | */
|
|
6437
6480
|
)) {
|
|
6481
|
+
if (trackDisjunction) {
|
|
6482
|
+
state.branchID = state.branchID.sibling();
|
|
6483
|
+
}
|
|
6438
6484
|
this.regexp_alternative(state);
|
|
6439
6485
|
}
|
|
6486
|
+
if (trackDisjunction) {
|
|
6487
|
+
state.branchID = state.branchID.parent;
|
|
6488
|
+
}
|
|
6440
6489
|
if (this.regexp_eatQuantifier(state, true)) {
|
|
6441
6490
|
state.raise("Nothing to repeat");
|
|
6442
6491
|
}
|
|
@@ -6695,14 +6744,28 @@ pp$1.regexp_groupSpecifier = function(state) {
|
|
|
6695
6744
|
63
|
|
6696
6745
|
/* ? */
|
|
6697
6746
|
)) {
|
|
6698
|
-
if (this.regexp_eatGroupName(state)) {
|
|
6699
|
-
|
|
6747
|
+
if (!this.regexp_eatGroupName(state)) {
|
|
6748
|
+
state.raise("Invalid group");
|
|
6749
|
+
}
|
|
6750
|
+
var trackDisjunction = this.options.ecmaVersion >= 16;
|
|
6751
|
+
var known = state.groupNames[state.lastStringValue];
|
|
6752
|
+
if (known) {
|
|
6753
|
+
if (trackDisjunction) {
|
|
6754
|
+
for (var i = 0, list = known; i < list.length; i += 1) {
|
|
6755
|
+
var altID = list[i];
|
|
6756
|
+
if (!altID.separatedFrom(state.branchID)) {
|
|
6757
|
+
state.raise("Duplicate capture group name");
|
|
6758
|
+
}
|
|
6759
|
+
}
|
|
6760
|
+
} else {
|
|
6700
6761
|
state.raise("Duplicate capture group name");
|
|
6701
6762
|
}
|
|
6702
|
-
state.groupNames.push(state.lastStringValue);
|
|
6703
|
-
return;
|
|
6704
6763
|
}
|
|
6705
|
-
|
|
6764
|
+
if (trackDisjunction) {
|
|
6765
|
+
(known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID);
|
|
6766
|
+
} else {
|
|
6767
|
+
state.groupNames[state.lastStringValue] = true;
|
|
6768
|
+
}
|
|
6706
6769
|
}
|
|
6707
6770
|
};
|
|
6708
6771
|
pp$1.regexp_eatGroupName = function(state) {
|
|
@@ -8155,6 +8218,16 @@ pp.readInvalidTemplateToken = function() {
|
|
|
8155
8218
|
}
|
|
8156
8219
|
case "`":
|
|
8157
8220
|
return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos));
|
|
8221
|
+
case "\r":
|
|
8222
|
+
if (this.input[this.pos + 1] === "\n") {
|
|
8223
|
+
++this.pos;
|
|
8224
|
+
}
|
|
8225
|
+
case "\n":
|
|
8226
|
+
case "\u2028":
|
|
8227
|
+
case "\u2029":
|
|
8228
|
+
++this.curLine;
|
|
8229
|
+
this.lineStart = this.pos + 1;
|
|
8230
|
+
break;
|
|
8158
8231
|
}
|
|
8159
8232
|
}
|
|
8160
8233
|
this.raise(this.start, "Unterminated template");
|
|
@@ -8223,6 +8296,10 @@ pp.readEscapedChar = function(inTemplate) {
|
|
|
8223
8296
|
return String.fromCharCode(octal);
|
|
8224
8297
|
}
|
|
8225
8298
|
if (isNewLine(ch)) {
|
|
8299
|
+
if (this.options.locations) {
|
|
8300
|
+
this.lineStart = this.pos;
|
|
8301
|
+
++this.curLine;
|
|
8302
|
+
}
|
|
8226
8303
|
return "";
|
|
8227
8304
|
}
|
|
8228
8305
|
return String.fromCharCode(ch);
|
|
@@ -8273,7 +8350,7 @@ pp.readWord = function() {
|
|
|
8273
8350
|
}
|
|
8274
8351
|
return this.finishToken(type, word);
|
|
8275
8352
|
};
|
|
8276
|
-
var version = "8.
|
|
8353
|
+
var version = "8.12.1";
|
|
8277
8354
|
Parser.acorn = {
|
|
8278
8355
|
Parser,
|
|
8279
8356
|
version,
|
|
@@ -8296,9 +8373,9 @@ Parser.acorn = {
|
|
|
8296
8373
|
nonASCIIwhitespace
|
|
8297
8374
|
};
|
|
8298
8375
|
|
|
8299
|
-
// node_modules/.pnpm/mlly@1.
|
|
8376
|
+
// node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs
|
|
8300
8377
|
import { builtinModules, createRequire } from "module";
|
|
8301
|
-
import fs, { realpathSync, statSync,
|
|
8378
|
+
import fs, { realpathSync, statSync, promises } from "fs";
|
|
8302
8379
|
|
|
8303
8380
|
// node_modules/.pnpm/ufo@1.5.3/node_modules/ufo/dist/index.mjs
|
|
8304
8381
|
var r = String.fromCharCode;
|
|
@@ -8353,7 +8430,7 @@ var isAbsolute = function(p) {
|
|
|
8353
8430
|
return _IS_ABSOLUTE_RE.test(p);
|
|
8354
8431
|
};
|
|
8355
8432
|
|
|
8356
|
-
// node_modules/.pnpm/mlly@1.
|
|
8433
|
+
// node_modules/.pnpm/mlly@1.7.1/node_modules/mlly/dist/index.mjs
|
|
8357
8434
|
import { fileURLToPath as fileURLToPath$1, URL as URL$1, pathToFileURL as pathToFileURL$1 } from "url";
|
|
8358
8435
|
import assert from "assert";
|
|
8359
8436
|
import process$1 from "process";
|
|
@@ -8483,21 +8560,21 @@ codes.ERR_INVALID_PACKAGE_CONFIG = createError(
|
|
|
8483
8560
|
codes.ERR_INVALID_PACKAGE_TARGET = createError(
|
|
8484
8561
|
"ERR_INVALID_PACKAGE_TARGET",
|
|
8485
8562
|
/**
|
|
8486
|
-
* @param {string}
|
|
8563
|
+
* @param {string} packagePath
|
|
8487
8564
|
* @param {string} key
|
|
8488
8565
|
* @param {unknown} target
|
|
8489
8566
|
* @param {boolean} [isImport=false]
|
|
8490
8567
|
* @param {string} [base]
|
|
8491
8568
|
*/
|
|
8492
|
-
(
|
|
8493
|
-
const
|
|
8569
|
+
(packagePath, key, target, isImport = false, base = void 0) => {
|
|
8570
|
+
const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
|
|
8494
8571
|
if (key === ".") {
|
|
8495
8572
|
assert(isImport === false);
|
|
8496
|
-
return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${
|
|
8573
|
+
return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`;
|
|
8497
8574
|
}
|
|
8498
8575
|
return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(
|
|
8499
8576
|
target
|
|
8500
|
-
)} defined for '${key}' in the package config ${
|
|
8577
|
+
)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`;
|
|
8501
8578
|
},
|
|
8502
8579
|
Error
|
|
8503
8580
|
);
|
|
@@ -8533,14 +8610,14 @@ codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(
|
|
|
8533
8610
|
codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError(
|
|
8534
8611
|
"ERR_PACKAGE_PATH_NOT_EXPORTED",
|
|
8535
8612
|
/**
|
|
8536
|
-
* @param {string}
|
|
8613
|
+
* @param {string} packagePath
|
|
8537
8614
|
* @param {string} subpath
|
|
8538
8615
|
* @param {string} [base]
|
|
8539
8616
|
*/
|
|
8540
|
-
(
|
|
8617
|
+
(packagePath, subpath, base = void 0) => {
|
|
8541
8618
|
if (subpath === ".")
|
|
8542
|
-
return `No "exports" main defined in ${
|
|
8543
|
-
return `Package subpath '${subpath}' is not defined by "exports" in ${
|
|
8619
|
+
return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
8620
|
+
return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
8544
8621
|
},
|
|
8545
8622
|
Error
|
|
8546
8623
|
);
|
|
@@ -8549,14 +8626,19 @@ codes.ERR_UNSUPPORTED_DIR_IMPORT = createError(
|
|
|
8549
8626
|
"Directory import '%s' is not supported resolving ES modules imported from %s",
|
|
8550
8627
|
Error
|
|
8551
8628
|
);
|
|
8629
|
+
codes.ERR_UNSUPPORTED_RESOLVE_REQUEST = createError(
|
|
8630
|
+
"ERR_UNSUPPORTED_RESOLVE_REQUEST",
|
|
8631
|
+
'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',
|
|
8632
|
+
TypeError
|
|
8633
|
+
);
|
|
8552
8634
|
codes.ERR_UNKNOWN_FILE_EXTENSION = createError(
|
|
8553
8635
|
"ERR_UNKNOWN_FILE_EXTENSION",
|
|
8554
8636
|
/**
|
|
8555
|
-
* @param {string}
|
|
8637
|
+
* @param {string} extension
|
|
8556
8638
|
* @param {string} path
|
|
8557
8639
|
*/
|
|
8558
|
-
(
|
|
8559
|
-
return `Unknown file extension "${
|
|
8640
|
+
(extension, path4) => {
|
|
8641
|
+
return `Unknown file extension "${extension}" for ${path4}`;
|
|
8560
8642
|
},
|
|
8561
8643
|
TypeError
|
|
8562
8644
|
);
|
|
@@ -8579,18 +8661,18 @@ codes.ERR_INVALID_ARG_VALUE = createError(
|
|
|
8579
8661
|
// Note: extra classes have been shaken out.
|
|
8580
8662
|
// , RangeError
|
|
8581
8663
|
);
|
|
8582
|
-
function createError(sym, value,
|
|
8664
|
+
function createError(sym, value, constructor) {
|
|
8583
8665
|
messages.set(sym, value);
|
|
8584
|
-
return makeNodeErrorWithCode(
|
|
8666
|
+
return makeNodeErrorWithCode(constructor, sym);
|
|
8585
8667
|
}
|
|
8586
8668
|
function makeNodeErrorWithCode(Base, key) {
|
|
8587
8669
|
return NodeError;
|
|
8588
|
-
function NodeError(...
|
|
8670
|
+
function NodeError(...parameters) {
|
|
8589
8671
|
const limit = Error.stackTraceLimit;
|
|
8590
8672
|
if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;
|
|
8591
8673
|
const error = new Base();
|
|
8592
8674
|
if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit;
|
|
8593
|
-
const message = getMessage(key,
|
|
8675
|
+
const message = getMessage(key, parameters, error);
|
|
8594
8676
|
Object.defineProperties(error, {
|
|
8595
8677
|
// Note: no need to implement `kIsNodeError` symbol, would be hard,
|
|
8596
8678
|
// probably.
|
|
@@ -8628,10 +8710,10 @@ function isErrorStackTraceLimitWritable() {
|
|
|
8628
8710
|
}
|
|
8629
8711
|
return own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
|
|
8630
8712
|
}
|
|
8631
|
-
function hideStackFrames(
|
|
8632
|
-
const hidden = nodeInternalPrefix +
|
|
8633
|
-
Object.defineProperty(
|
|
8634
|
-
return
|
|
8713
|
+
function hideStackFrames(wrappedFunction) {
|
|
8714
|
+
const hidden = nodeInternalPrefix + wrappedFunction.name;
|
|
8715
|
+
Object.defineProperty(wrappedFunction, "name", { value: hidden });
|
|
8716
|
+
return wrappedFunction;
|
|
8635
8717
|
}
|
|
8636
8718
|
var captureLargerStackTrace = hideStackFrames(
|
|
8637
8719
|
/**
|
|
@@ -8650,27 +8732,27 @@ var captureLargerStackTrace = hideStackFrames(
|
|
|
8650
8732
|
return error;
|
|
8651
8733
|
}
|
|
8652
8734
|
);
|
|
8653
|
-
function getMessage(key,
|
|
8735
|
+
function getMessage(key, parameters, self) {
|
|
8654
8736
|
const message = messages.get(key);
|
|
8655
8737
|
assert(message !== void 0, "expected `message` to be found");
|
|
8656
8738
|
if (typeof message === "function") {
|
|
8657
8739
|
assert(
|
|
8658
|
-
message.length <=
|
|
8740
|
+
message.length <= parameters.length,
|
|
8659
8741
|
// Default options do not count.
|
|
8660
|
-
`Code: ${key}; The provided arguments length (${
|
|
8742
|
+
`Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`
|
|
8661
8743
|
);
|
|
8662
|
-
return Reflect.apply(message, self,
|
|
8744
|
+
return Reflect.apply(message, self, parameters);
|
|
8663
8745
|
}
|
|
8664
8746
|
const regex = /%[dfijoOs]/g;
|
|
8665
8747
|
let expectedLength = 0;
|
|
8666
8748
|
while (regex.exec(message) !== null) expectedLength++;
|
|
8667
8749
|
assert(
|
|
8668
|
-
expectedLength ===
|
|
8669
|
-
`Code: ${key}; The provided arguments length (${
|
|
8750
|
+
expectedLength === parameters.length,
|
|
8751
|
+
`Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`
|
|
8670
8752
|
);
|
|
8671
|
-
if (
|
|
8672
|
-
|
|
8673
|
-
return Reflect.apply(format2, null,
|
|
8753
|
+
if (parameters.length === 0) return message;
|
|
8754
|
+
parameters.unshift(message);
|
|
8755
|
+
return Reflect.apply(format2, null, parameters);
|
|
8674
8756
|
}
|
|
8675
8757
|
function determineSpecificType(value) {
|
|
8676
8758
|
if (value === null || value === void 0) {
|
|
@@ -8694,8 +8776,6 @@ function determineSpecificType(value) {
|
|
|
8694
8776
|
var hasOwnProperty$1 = {}.hasOwnProperty;
|
|
8695
8777
|
var { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes;
|
|
8696
8778
|
var cache = /* @__PURE__ */ new Map();
|
|
8697
|
-
var reader = { read };
|
|
8698
|
-
var packageJsonReader = reader;
|
|
8699
8779
|
function read(jsonPath, { base, specifier }) {
|
|
8700
8780
|
const existing = cache.get(jsonPath);
|
|
8701
8781
|
if (existing) {
|
|
@@ -8761,21 +8841,20 @@ function read(jsonPath, { base, specifier }) {
|
|
|
8761
8841
|
return result;
|
|
8762
8842
|
}
|
|
8763
8843
|
function getPackageScopeConfig(resolved) {
|
|
8764
|
-
let packageJSONUrl = new URL
|
|
8844
|
+
let packageJSONUrl = new URL("package.json", resolved);
|
|
8765
8845
|
while (true) {
|
|
8766
8846
|
const packageJSONPath2 = packageJSONUrl.pathname;
|
|
8767
8847
|
if (packageJSONPath2.endsWith("node_modules/package.json")) {
|
|
8768
8848
|
break;
|
|
8769
8849
|
}
|
|
8770
|
-
const packageConfig =
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
);
|
|
8850
|
+
const packageConfig = read(fileURLToPath$1(packageJSONUrl), {
|
|
8851
|
+
specifier: resolved
|
|
8852
|
+
});
|
|
8774
8853
|
if (packageConfig.exists) {
|
|
8775
8854
|
return packageConfig;
|
|
8776
8855
|
}
|
|
8777
8856
|
const lastPackageJSONUrl = packageJSONUrl;
|
|
8778
|
-
packageJSONUrl = new URL
|
|
8857
|
+
packageJSONUrl = new URL("../package.json", packageJSONUrl);
|
|
8779
8858
|
if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) {
|
|
8780
8859
|
break;
|
|
8781
8860
|
}
|
|
@@ -8784,16 +8863,11 @@ function getPackageScopeConfig(resolved) {
|
|
|
8784
8863
|
return {
|
|
8785
8864
|
pjsonPath: packageJSONPath,
|
|
8786
8865
|
exists: false,
|
|
8787
|
-
|
|
8788
|
-
name: void 0,
|
|
8789
|
-
type: "none",
|
|
8790
|
-
exports: void 0,
|
|
8791
|
-
imports: void 0
|
|
8866
|
+
type: "none"
|
|
8792
8867
|
};
|
|
8793
8868
|
}
|
|
8794
8869
|
function getPackageType(url) {
|
|
8795
|
-
|
|
8796
|
-
return packageConfig.type;
|
|
8870
|
+
return getPackageScopeConfig(url).type;
|
|
8797
8871
|
}
|
|
8798
8872
|
var { ERR_UNKNOWN_FILE_EXTENSION } = codes;
|
|
8799
8873
|
var hasOwnProperty2 = {}.hasOwnProperty;
|
|
@@ -8843,28 +8917,28 @@ function extname2(url) {
|
|
|
8843
8917
|
return "";
|
|
8844
8918
|
}
|
|
8845
8919
|
function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
|
|
8846
|
-
const
|
|
8847
|
-
if (
|
|
8920
|
+
const value = extname2(url);
|
|
8921
|
+
if (value === ".js") {
|
|
8848
8922
|
const packageType = getPackageType(url);
|
|
8849
8923
|
if (packageType !== "none") {
|
|
8850
8924
|
return packageType;
|
|
8851
8925
|
}
|
|
8852
8926
|
return "commonjs";
|
|
8853
8927
|
}
|
|
8854
|
-
if (
|
|
8928
|
+
if (value === "") {
|
|
8855
8929
|
const packageType = getPackageType(url);
|
|
8856
8930
|
if (packageType === "none" || packageType === "commonjs") {
|
|
8857
8931
|
return "commonjs";
|
|
8858
8932
|
}
|
|
8859
8933
|
return "module";
|
|
8860
8934
|
}
|
|
8861
|
-
const format3 = extensionFormatMap[
|
|
8935
|
+
const format3 = extensionFormatMap[value];
|
|
8862
8936
|
if (format3) return format3;
|
|
8863
8937
|
if (ignoreErrors) {
|
|
8864
8938
|
return void 0;
|
|
8865
8939
|
}
|
|
8866
8940
|
const filepath = fileURLToPath$1(url);
|
|
8867
|
-
throw new ERR_UNKNOWN_FILE_EXTENSION(
|
|
8941
|
+
throw new ERR_UNKNOWN_FILE_EXTENSION(value, filepath);
|
|
8868
8942
|
}
|
|
8869
8943
|
function getHttpProtocolModuleFormat() {
|
|
8870
8944
|
}
|
|
@@ -8884,14 +8958,15 @@ var {
|
|
|
8884
8958
|
ERR_MODULE_NOT_FOUND,
|
|
8885
8959
|
ERR_PACKAGE_IMPORT_NOT_DEFINED,
|
|
8886
8960
|
ERR_PACKAGE_PATH_NOT_EXPORTED,
|
|
8887
|
-
ERR_UNSUPPORTED_DIR_IMPORT
|
|
8961
|
+
ERR_UNSUPPORTED_DIR_IMPORT,
|
|
8962
|
+
ERR_UNSUPPORTED_RESOLVE_REQUEST
|
|
8888
8963
|
} = codes;
|
|
8889
8964
|
var own = {}.hasOwnProperty;
|
|
8890
8965
|
var invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i;
|
|
8891
8966
|
var deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i;
|
|
8892
8967
|
var invalidPackageNameRegEx = /^\.|%|\\/;
|
|
8893
8968
|
var patternRegEx = /\*/g;
|
|
8894
|
-
var
|
|
8969
|
+
var encodedSeparatorRegEx = /%2f|%5c/i;
|
|
8895
8970
|
var emittedPackageWarnings = /* @__PURE__ */ new Set();
|
|
8896
8971
|
var doubleSlashRegEx = /[/\\]{2}/;
|
|
8897
8972
|
function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) {
|
|
@@ -8913,21 +8988,21 @@ function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
|
|
|
8913
8988
|
const format3 = defaultGetFormatWithoutErrors(url, { parentURL: base.href });
|
|
8914
8989
|
if (format3 !== "module") return;
|
|
8915
8990
|
const urlPath = fileURLToPath$1(url.href);
|
|
8916
|
-
const
|
|
8991
|
+
const packagePath = fileURLToPath$1(new URL$1(".", packageJsonUrl));
|
|
8917
8992
|
const basePath = fileURLToPath$1(base);
|
|
8918
8993
|
if (!main) {
|
|
8919
8994
|
process$1.emitWarning(
|
|
8920
|
-
`No "main" or "exports" field defined in the package.json for ${
|
|
8921
|
-
|
|
8995
|
+
`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(
|
|
8996
|
+
packagePath.length
|
|
8922
8997
|
)}", imported from ${basePath}.
|
|
8923
8998
|
Default "index" lookups for the main are deprecated for ES modules.`,
|
|
8924
8999
|
"DeprecationWarning",
|
|
8925
9000
|
"DEP0151"
|
|
8926
9001
|
);
|
|
8927
|
-
} else if (path2.resolve(
|
|
9002
|
+
} else if (path2.resolve(packagePath, main) !== urlPath) {
|
|
8928
9003
|
process$1.emitWarning(
|
|
8929
|
-
`Package ${
|
|
8930
|
-
|
|
9004
|
+
`Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(
|
|
9005
|
+
packagePath.length
|
|
8931
9006
|
)}", imported from ${basePath}.
|
|
8932
9007
|
Automatic extension resolution of the "main" field is deprecated for ES modules.`,
|
|
8933
9008
|
"DeprecationWarning",
|
|
@@ -8939,7 +9014,6 @@ function tryStatSync(path4) {
|
|
|
8939
9014
|
try {
|
|
8940
9015
|
return statSync(path4);
|
|
8941
9016
|
} catch {
|
|
8942
|
-
return new Stats();
|
|
8943
9017
|
}
|
|
8944
9018
|
}
|
|
8945
9019
|
function fileExists(url) {
|
|
@@ -8993,7 +9067,7 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
|
8993
9067
|
);
|
|
8994
9068
|
}
|
|
8995
9069
|
function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
8996
|
-
if (
|
|
9070
|
+
if (encodedSeparatorRegEx.exec(resolved.pathname) !== null) {
|
|
8997
9071
|
throw new ERR_INVALID_MODULE_SPECIFIER(
|
|
8998
9072
|
resolved.pathname,
|
|
8999
9073
|
'must not include encoded "/" or "\\" characters',
|
|
@@ -9015,12 +9089,12 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
|
9015
9089
|
const stats = tryStatSync(
|
|
9016
9090
|
filePath.endsWith("/") ? filePath.slice(-1) : filePath
|
|
9017
9091
|
);
|
|
9018
|
-
if (stats.isDirectory()) {
|
|
9092
|
+
if (stats && stats.isDirectory()) {
|
|
9019
9093
|
const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, fileURLToPath$1(base));
|
|
9020
9094
|
error.url = String(resolved);
|
|
9021
9095
|
throw error;
|
|
9022
9096
|
}
|
|
9023
|
-
if (!stats.isFile()) {
|
|
9097
|
+
if (!stats || !stats.isFile()) {
|
|
9024
9098
|
const error = new ERR_MODULE_NOT_FOUND(
|
|
9025
9099
|
filePath || resolved.pathname,
|
|
9026
9100
|
base && fileURLToPath$1(base),
|
|
@@ -9270,13 +9344,13 @@ function isConditionalExportsMainSugar(exports, packageJsonUrl, base) {
|
|
|
9270
9344
|
const keys = Object.getOwnPropertyNames(exports);
|
|
9271
9345
|
let isConditionalSugar = false;
|
|
9272
9346
|
let i = 0;
|
|
9273
|
-
let
|
|
9274
|
-
while (++
|
|
9275
|
-
const key = keys[
|
|
9276
|
-
const
|
|
9347
|
+
let keyIndex = -1;
|
|
9348
|
+
while (++keyIndex < keys.length) {
|
|
9349
|
+
const key = keys[keyIndex];
|
|
9350
|
+
const currentIsConditionalSugar = key === "" || key[0] !== ".";
|
|
9277
9351
|
if (i++ === 0) {
|
|
9278
|
-
isConditionalSugar =
|
|
9279
|
-
} else if (isConditionalSugar !==
|
|
9352
|
+
isConditionalSugar = currentIsConditionalSugar;
|
|
9353
|
+
} else if (isConditionalSugar !== currentIsConditionalSugar) {
|
|
9280
9354
|
throw new ERR_INVALID_PACKAGE_CONFIG(
|
|
9281
9355
|
fileURLToPath$1(packageJsonUrl),
|
|
9282
9356
|
base,
|
|
@@ -9505,7 +9579,7 @@ function packageResolve(specifier, base, conditions) {
|
|
|
9505
9579
|
let lastPath;
|
|
9506
9580
|
do {
|
|
9507
9581
|
const stat = tryStatSync(packageJsonPath.slice(0, -13));
|
|
9508
|
-
if (!stat.isDirectory()) {
|
|
9582
|
+
if (!stat || !stat.isDirectory()) {
|
|
9509
9583
|
lastPath = packageJsonPath;
|
|
9510
9584
|
packageJsonUrl = new URL$1(
|
|
9511
9585
|
(isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json",
|
|
@@ -9514,10 +9588,7 @@ function packageResolve(specifier, base, conditions) {
|
|
|
9514
9588
|
packageJsonPath = fileURLToPath$1(packageJsonUrl);
|
|
9515
9589
|
continue;
|
|
9516
9590
|
}
|
|
9517
|
-
const packageConfig2 =
|
|
9518
|
-
base,
|
|
9519
|
-
specifier
|
|
9520
|
-
});
|
|
9591
|
+
const packageConfig2 = read(packageJsonPath, { base, specifier });
|
|
9521
9592
|
if (packageConfig2.exports !== void 0 && packageConfig2.exports !== null) {
|
|
9522
9593
|
return packageExportsResolve(
|
|
9523
9594
|
packageJsonUrl,
|
|
@@ -9550,19 +9621,29 @@ function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {
|
|
|
9550
9621
|
}
|
|
9551
9622
|
function moduleResolve(specifier, base, conditions, preserveSymlinks) {
|
|
9552
9623
|
const protocol = base.protocol;
|
|
9553
|
-
const
|
|
9624
|
+
const isData = protocol === "data:";
|
|
9625
|
+
const isRemote = isData || protocol === "http:" || protocol === "https:";
|
|
9554
9626
|
let resolved;
|
|
9555
9627
|
if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) {
|
|
9556
|
-
|
|
9557
|
-
|
|
9628
|
+
try {
|
|
9629
|
+
resolved = new URL$1(specifier, base);
|
|
9630
|
+
} catch (error_) {
|
|
9631
|
+
const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base);
|
|
9632
|
+
error.cause = error_;
|
|
9633
|
+
throw error;
|
|
9634
|
+
}
|
|
9635
|
+
} else if (protocol === "file:" && specifier[0] === "#") {
|
|
9558
9636
|
resolved = packageImportsResolve(specifier, base, conditions);
|
|
9559
9637
|
} else {
|
|
9560
9638
|
try {
|
|
9561
9639
|
resolved = new URL$1(specifier);
|
|
9562
|
-
} catch {
|
|
9563
|
-
if (!
|
|
9564
|
-
|
|
9640
|
+
} catch (error_) {
|
|
9641
|
+
if (isRemote && !builtinModules.includes(specifier)) {
|
|
9642
|
+
const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base);
|
|
9643
|
+
error.cause = error_;
|
|
9644
|
+
throw error;
|
|
9565
9645
|
}
|
|
9646
|
+
resolved = packageResolve(specifier, base, conditions);
|
|
9566
9647
|
}
|
|
9567
9648
|
}
|
|
9568
9649
|
assert(resolved !== void 0, "expected to be defined");
|
|
@@ -9738,10 +9819,10 @@ function isLagerLevel(level) {
|
|
|
9738
9819
|
return level === "trace" || level === "debug" || level === "info" || level === "warn" || level === "error" || level === "fatal";
|
|
9739
9820
|
}
|
|
9740
9821
|
var Lager = class {
|
|
9822
|
+
_level = "info";
|
|
9823
|
+
id = "lager";
|
|
9824
|
+
levelNo = levels[this._level];
|
|
9741
9825
|
constructor(options) {
|
|
9742
|
-
this._level = "info";
|
|
9743
|
-
this.id = "lager";
|
|
9744
|
-
this.levelNo = levels[this._level];
|
|
9745
9826
|
const { level, id } = {
|
|
9746
9827
|
level: "info",
|
|
9747
9828
|
id: "lager",
|
|
@@ -9853,6 +9934,8 @@ var GLOB_EXCLUDE = [
|
|
|
9853
9934
|
"**/.vitepress/cache",
|
|
9854
9935
|
"**/*.bak",
|
|
9855
9936
|
"**/*.min.*",
|
|
9937
|
+
"**/.yarn",
|
|
9938
|
+
"**/.pnp.*",
|
|
9856
9939
|
"**/auto-import?(s).d.ts",
|
|
9857
9940
|
"**/bun.lockb",
|
|
9858
9941
|
"**/CHANGELOG*.md",
|
|
@@ -10387,23 +10470,6 @@ var jsdoc = async () => {
|
|
|
10387
10470
|
];
|
|
10388
10471
|
};
|
|
10389
10472
|
|
|
10390
|
-
// src/configs/tsdoc.ts
|
|
10391
|
-
var tsdoc = async () => {
|
|
10392
|
-
const { pluginTsdoc } = await importPluginTsdoc();
|
|
10393
|
-
return [
|
|
10394
|
-
{
|
|
10395
|
-
files: ["*.ts", "*.tsx"],
|
|
10396
|
-
name: "jsse/tsdoc",
|
|
10397
|
-
plugins: {
|
|
10398
|
-
tsdoc: pluginTsdoc
|
|
10399
|
-
},
|
|
10400
|
-
rules: {
|
|
10401
|
-
"tsdoc/syntax": "warn"
|
|
10402
|
-
}
|
|
10403
|
-
}
|
|
10404
|
-
];
|
|
10405
|
-
};
|
|
10406
|
-
|
|
10407
10473
|
// src/configs/jsonc.ts
|
|
10408
10474
|
var jsonc = async (options) => {
|
|
10409
10475
|
const { overrides = {}, stylistic: stylistic2 = true } = options ?? {};
|
|
@@ -11024,6 +11090,33 @@ var n = async () => {
|
|
|
11024
11090
|
];
|
|
11025
11091
|
};
|
|
11026
11092
|
|
|
11093
|
+
// src/configs/no-only-tests.ts
|
|
11094
|
+
var noOnlyTests = async (options = {}) => {
|
|
11095
|
+
const { isInEditor: isInEditor2 = false, overrides = {} } = options;
|
|
11096
|
+
const pluginNoOnlyTests = await interopDefault2(
|
|
11097
|
+
// @ts-expect-error - types are incorrect/missing
|
|
11098
|
+
import("eslint-plugin-no-only-tests")
|
|
11099
|
+
);
|
|
11100
|
+
return [
|
|
11101
|
+
{
|
|
11102
|
+
name: "jsse/no-only-tests/setup",
|
|
11103
|
+
plugins: {
|
|
11104
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
11105
|
+
"no-only-tests": pluginNoOnlyTests
|
|
11106
|
+
}
|
|
11107
|
+
},
|
|
11108
|
+
{
|
|
11109
|
+
files: GLOB_TESTS,
|
|
11110
|
+
name: "jsse/no-only-tests/rules",
|
|
11111
|
+
rules: {
|
|
11112
|
+
"no-only-tests/no-only-tests": isInEditor2 ? "off" : isCI() ? "error" : "warn",
|
|
11113
|
+
"unicorn/no-null": "off",
|
|
11114
|
+
...overrides
|
|
11115
|
+
}
|
|
11116
|
+
}
|
|
11117
|
+
];
|
|
11118
|
+
};
|
|
11119
|
+
|
|
11027
11120
|
// src/configs/perfectionist.ts
|
|
11028
11121
|
var perfectionist = async () => {
|
|
11029
11122
|
return [
|
|
@@ -11754,33 +11847,6 @@ var tailwind = async (options) => {
|
|
|
11754
11847
|
];
|
|
11755
11848
|
};
|
|
11756
11849
|
|
|
11757
|
-
// src/configs/no-only-tests.ts
|
|
11758
|
-
var noOnlyTests = async (options = {}) => {
|
|
11759
|
-
const { isInEditor: isInEditor2 = false, overrides = {} } = options;
|
|
11760
|
-
const pluginNoOnlyTests = await interopDefault2(
|
|
11761
|
-
// @ts-expect-error - types are incorrect/missing
|
|
11762
|
-
import("eslint-plugin-no-only-tests")
|
|
11763
|
-
);
|
|
11764
|
-
return [
|
|
11765
|
-
{
|
|
11766
|
-
name: "jsse/no-only-tests/setup",
|
|
11767
|
-
plugins: {
|
|
11768
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
11769
|
-
"no-only-tests": pluginNoOnlyTests
|
|
11770
|
-
}
|
|
11771
|
-
},
|
|
11772
|
-
{
|
|
11773
|
-
files: GLOB_TESTS,
|
|
11774
|
-
name: "jsse/no-only-tests/rules",
|
|
11775
|
-
rules: {
|
|
11776
|
-
"no-only-tests/no-only-tests": isInEditor2 ? "off" : isCI() ? "error" : "warn",
|
|
11777
|
-
"unicorn/no-null": "off",
|
|
11778
|
-
...overrides
|
|
11779
|
-
}
|
|
11780
|
-
}
|
|
11781
|
-
];
|
|
11782
|
-
};
|
|
11783
|
-
|
|
11784
11850
|
// src/configs/ts/typescript.ts
|
|
11785
11851
|
var typescript = async (options) => {
|
|
11786
11852
|
const {
|
|
@@ -11796,9 +11862,9 @@ var typescript = async (options) => {
|
|
|
11796
11862
|
const tsPrefixTo = prefix?.to ?? "@typescript-eslint";
|
|
11797
11863
|
const tsrules = {
|
|
11798
11864
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
11799
|
-
...default8.configs["eslint-recommended"]
|
|
11865
|
+
...(default8.configs["eslint-recommended"]?.overrides ?? [])[0]?.rules,
|
|
11800
11866
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
11801
|
-
...default8.configs.strict
|
|
11867
|
+
...default8.configs.strict?.rules,
|
|
11802
11868
|
"no-invalid-this": "off",
|
|
11803
11869
|
...typescriptRules(
|
|
11804
11870
|
typeAware !== false && tsconfigPath ? { typeAware: true } : { typeAware: false }
|
|
@@ -11860,12 +11926,29 @@ var typescript = async (options) => {
|
|
|
11860
11926
|
];
|
|
11861
11927
|
};
|
|
11862
11928
|
|
|
11929
|
+
// src/configs/tsdoc.ts
|
|
11930
|
+
var tsdoc = async () => {
|
|
11931
|
+
const { pluginTsdoc } = await importPluginTsdoc();
|
|
11932
|
+
return [
|
|
11933
|
+
{
|
|
11934
|
+
files: ["*.ts", "*.tsx"],
|
|
11935
|
+
name: "jsse/tsdoc",
|
|
11936
|
+
plugins: {
|
|
11937
|
+
tsdoc: pluginTsdoc
|
|
11938
|
+
},
|
|
11939
|
+
rules: {
|
|
11940
|
+
"tsdoc/syntax": "warn"
|
|
11941
|
+
}
|
|
11942
|
+
}
|
|
11943
|
+
];
|
|
11944
|
+
};
|
|
11945
|
+
|
|
11863
11946
|
// src/configs/unicorn.ts
|
|
11864
11947
|
function unicornOff() {
|
|
11865
11948
|
return {
|
|
11866
11949
|
"unicorn/catch-error-name": "off",
|
|
11867
11950
|
"unicorn/consistent-destructuring": "off",
|
|
11868
|
-
"unicorn/no-array-for-each": "off",
|
|
11951
|
+
// "unicorn/no-array-for-each": "off",
|
|
11869
11952
|
"unicorn/no-array-reduce": "off",
|
|
11870
11953
|
"unicorn/no-nested-ternary": "off",
|
|
11871
11954
|
// conflicts with prettier
|
|
@@ -11878,7 +11961,11 @@ function unicornOff() {
|
|
|
11878
11961
|
};
|
|
11879
11962
|
}
|
|
11880
11963
|
function unicornRecommended() {
|
|
11881
|
-
|
|
11964
|
+
const rules = default6.configs.recommended.rules;
|
|
11965
|
+
if (rules === void 0) {
|
|
11966
|
+
throw new Error("Expected rules to be defined in unicorn plugin");
|
|
11967
|
+
}
|
|
11968
|
+
return rules;
|
|
11882
11969
|
}
|
|
11883
11970
|
var unicorn = async () => {
|
|
11884
11971
|
return [
|
|
@@ -12262,35 +12349,34 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
12262
12349
|
if (off && off.length > 0) {
|
|
12263
12350
|
log.debug("Turning off rules", off);
|
|
12264
12351
|
const currentlyActiveRules = /* @__PURE__ */ new Set();
|
|
12265
|
-
|
|
12266
|
-
Object.keys(config.rules ?? {})
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
off.forEach((rule) => {
|
|
12352
|
+
for (const config of combinedConfigs) {
|
|
12353
|
+
for (const rule of Object.keys(config.rules ?? {}))
|
|
12354
|
+
currentlyActiveRules.add(rule);
|
|
12355
|
+
}
|
|
12356
|
+
for (const rule of off) {
|
|
12271
12357
|
if (!currentlyActiveRules.has(rule)) {
|
|
12272
12358
|
log.info(
|
|
12273
12359
|
`Rule \`${rule}\` is not active in the current config, you can remove it from the off list`
|
|
12274
12360
|
);
|
|
12275
12361
|
}
|
|
12276
|
-
}
|
|
12277
|
-
|
|
12278
|
-
Object.keys(config.rules ?? {})
|
|
12362
|
+
}
|
|
12363
|
+
for (const config of combinedConfigs) {
|
|
12364
|
+
for (const rule of Object.keys(config.rules ?? {})) {
|
|
12279
12365
|
if (off.includes(rule) && config.rules) {
|
|
12280
12366
|
config.rules[rule] = "off";
|
|
12281
12367
|
}
|
|
12282
|
-
}
|
|
12283
|
-
}
|
|
12368
|
+
}
|
|
12369
|
+
}
|
|
12284
12370
|
}
|
|
12285
12371
|
if (normalizedOptions.rootId !== "jsse") {
|
|
12286
|
-
|
|
12372
|
+
for (const config of combinedConfigs) {
|
|
12287
12373
|
if (config.name && config.name.startsWith("jsse/")) {
|
|
12288
12374
|
config.name = config.name.replace(
|
|
12289
12375
|
"jsse/",
|
|
12290
12376
|
`${normalizedOptions.rootId}:`
|
|
12291
12377
|
);
|
|
12292
12378
|
}
|
|
12293
|
-
}
|
|
12379
|
+
}
|
|
12294
12380
|
}
|
|
12295
12381
|
if (normalizedOptions.preReturn) {
|
|
12296
12382
|
log.debug("Running preReturn");
|