@jsse/eslint-config 0.0.11 → 0.1.2
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/cli.cjs +8 -3
- package/dist/cli.js +8 -3
- package/dist/index.cjs +411 -305
- package/dist/index.d.cts +43 -33
- package/dist/index.d.ts +43 -33
- package/dist/index.js +365 -260
- package/package.json +40 -37
package/dist/index.js
CHANGED
|
@@ -4,7 +4,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
7
|
var __commonJS = (cb, mod) => function __require() {
|
|
9
8
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
9
|
};
|
|
@@ -24,36 +23,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
23
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
24
|
mod
|
|
26
25
|
));
|
|
27
|
-
var __publicField = (obj, key, value) => {
|
|
28
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
29
|
-
return value;
|
|
30
|
-
};
|
|
31
|
-
var __accessCheck = (obj, member, msg) => {
|
|
32
|
-
if (!member.has(obj))
|
|
33
|
-
throw TypeError("Cannot " + msg);
|
|
34
|
-
};
|
|
35
|
-
var __privateGet = (obj, member, getter) => {
|
|
36
|
-
__accessCheck(obj, member, "read from private field");
|
|
37
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
38
|
-
};
|
|
39
|
-
var __privateAdd = (obj, member, value) => {
|
|
40
|
-
if (member.has(obj))
|
|
41
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
42
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
43
|
-
};
|
|
44
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
45
|
-
__accessCheck(obj, member, "write to private field");
|
|
46
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
47
|
-
return value;
|
|
48
|
-
};
|
|
49
|
-
var __privateWrapper = (obj, member, setter, getter) => ({
|
|
50
|
-
set _(value) {
|
|
51
|
-
__privateSet(obj, member, value, setter);
|
|
52
|
-
},
|
|
53
|
-
get _() {
|
|
54
|
-
return __privateGet(obj, member, getter);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
26
|
|
|
58
27
|
// node_modules/.pnpm/natural-compare@1.4.0/node_modules/natural-compare/index.js
|
|
59
28
|
var require_natural_compare = __commonJS({
|
|
@@ -334,9 +303,9 @@ var require_eslint_plugin_sort_keys = __commonJS({
|
|
|
334
303
|
}
|
|
335
304
|
});
|
|
336
305
|
|
|
337
|
-
// node_modules/.pnpm/globals@
|
|
306
|
+
// node_modules/.pnpm/globals@14.0.0/node_modules/globals/globals.json
|
|
338
307
|
var require_globals = __commonJS({
|
|
339
|
-
"node_modules/.pnpm/globals@
|
|
308
|
+
"node_modules/.pnpm/globals@14.0.0/node_modules/globals/globals.json"(exports, module) {
|
|
340
309
|
module.exports = {
|
|
341
310
|
builtin: {
|
|
342
311
|
AggregateError: false,
|
|
@@ -1438,6 +1407,30 @@ var require_globals = __commonJS({
|
|
|
1438
1407
|
XPathEvaluator: false,
|
|
1439
1408
|
XPathExpression: false,
|
|
1440
1409
|
XPathResult: false,
|
|
1410
|
+
XRAnchor: false,
|
|
1411
|
+
XRBoundedReferenceSpace: false,
|
|
1412
|
+
XRCPUDepthInformation: false,
|
|
1413
|
+
XRDepthInformation: false,
|
|
1414
|
+
XRFrame: false,
|
|
1415
|
+
XRInputSource: false,
|
|
1416
|
+
XRInputSourceArray: false,
|
|
1417
|
+
XRInputSourceEvent: false,
|
|
1418
|
+
XRInputSourcesChangeEvent: false,
|
|
1419
|
+
XRPose: false,
|
|
1420
|
+
XRReferenceSpace: false,
|
|
1421
|
+
XRReferenceSpaceEvent: false,
|
|
1422
|
+
XRRenderState: false,
|
|
1423
|
+
XRRigidTransform: false,
|
|
1424
|
+
XRSession: false,
|
|
1425
|
+
XRSessionEvent: false,
|
|
1426
|
+
XRSpace: false,
|
|
1427
|
+
XRSystem: false,
|
|
1428
|
+
XRView: false,
|
|
1429
|
+
XRViewerPose: false,
|
|
1430
|
+
XRViewport: false,
|
|
1431
|
+
XRWebGLBinding: false,
|
|
1432
|
+
XRWebGLDepthInformation: false,
|
|
1433
|
+
XRWebGLLayer: false,
|
|
1441
1434
|
XSLTProcessor: false
|
|
1442
1435
|
},
|
|
1443
1436
|
worker: {
|
|
@@ -2314,9 +2307,9 @@ var require_globals = __commonJS({
|
|
|
2314
2307
|
}
|
|
2315
2308
|
});
|
|
2316
2309
|
|
|
2317
|
-
// node_modules/.pnpm/globals@
|
|
2310
|
+
// node_modules/.pnpm/globals@14.0.0/node_modules/globals/index.js
|
|
2318
2311
|
var require_globals2 = __commonJS({
|
|
2319
|
-
"node_modules/.pnpm/globals@
|
|
2312
|
+
"node_modules/.pnpm/globals@14.0.0/node_modules/globals/index.js"(exports, module) {
|
|
2320
2313
|
"use strict";
|
|
2321
2314
|
module.exports = require_globals();
|
|
2322
2315
|
}
|
|
@@ -2727,8 +2720,7 @@ function javascript(options = {}) {
|
|
|
2727
2720
|
}
|
|
2728
2721
|
|
|
2729
2722
|
// src/configs/jsdoc.ts
|
|
2730
|
-
function jsdoc(
|
|
2731
|
-
const { stylistic: stylistic2 = true } = options;
|
|
2723
|
+
function jsdoc() {
|
|
2732
2724
|
return [
|
|
2733
2725
|
{
|
|
2734
2726
|
name: "jsse:jsdoc",
|
|
@@ -2738,11 +2730,13 @@ function jsdoc(options = {}) {
|
|
|
2738
2730
|
},
|
|
2739
2731
|
rules: {
|
|
2740
2732
|
"jsdoc/check-access": "warn",
|
|
2733
|
+
"jsdoc/check-alignment": "warn",
|
|
2741
2734
|
"jsdoc/check-param-names": "warn",
|
|
2742
2735
|
"jsdoc/check-property-names": "warn",
|
|
2743
2736
|
"jsdoc/check-types": "warn",
|
|
2744
2737
|
"jsdoc/empty-tags": "warn",
|
|
2745
2738
|
"jsdoc/implements-on-classes": "warn",
|
|
2739
|
+
"jsdoc/multiline-blocks": "warn",
|
|
2746
2740
|
"jsdoc/no-defaults": "warn",
|
|
2747
2741
|
"jsdoc/no-multi-asterisks": "warn",
|
|
2748
2742
|
"jsdoc/require-param-name": "warn",
|
|
@@ -2751,11 +2745,7 @@ function jsdoc(options = {}) {
|
|
|
2751
2745
|
"jsdoc/require-property-name": "warn",
|
|
2752
2746
|
"jsdoc/require-returns-check": "warn",
|
|
2753
2747
|
"jsdoc/require-returns-description": "warn",
|
|
2754
|
-
"jsdoc/require-yields-check": "warn"
|
|
2755
|
-
...stylistic2 ? {
|
|
2756
|
-
"jsdoc/check-alignment": "warn",
|
|
2757
|
-
"jsdoc/multiline-blocks": "warn"
|
|
2758
|
-
} : {}
|
|
2748
|
+
"jsdoc/require-yields-check": "warn"
|
|
2759
2749
|
}
|
|
2760
2750
|
}
|
|
2761
2751
|
];
|
|
@@ -2833,11 +2823,11 @@ function jsonc(options = {}) {
|
|
|
2833
2823
|
];
|
|
2834
2824
|
}
|
|
2835
2825
|
|
|
2836
|
-
// src/configs/
|
|
2826
|
+
// src/configs/n.ts
|
|
2837
2827
|
function node() {
|
|
2838
2828
|
return [
|
|
2839
2829
|
{
|
|
2840
|
-
name: "jsse:
|
|
2830
|
+
name: "jsse:n",
|
|
2841
2831
|
plugins: {
|
|
2842
2832
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
2843
2833
|
node: default6
|
|
@@ -3517,6 +3507,10 @@ function renameRules(rules, from, to) {
|
|
|
3517
3507
|
})
|
|
3518
3508
|
);
|
|
3519
3509
|
}
|
|
3510
|
+
async function interopDefault(m) {
|
|
3511
|
+
const resolved = await m;
|
|
3512
|
+
return resolved.default || resolved;
|
|
3513
|
+
}
|
|
3520
3514
|
function isCI() {
|
|
3521
3515
|
return !!process3.env.CI;
|
|
3522
3516
|
}
|
|
@@ -3579,6 +3573,7 @@ function typescriptRulesTypeAware() {
|
|
|
3579
3573
|
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
|
3580
3574
|
"@typescript-eslint/no-unnecessary-type-arguments": "off",
|
|
3581
3575
|
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
3576
|
+
"@typescript-eslint/no-useless-template-literals": "error",
|
|
3582
3577
|
"no-throw-literal": "off",
|
|
3583
3578
|
"@typescript-eslint/no-throw-literal": "error",
|
|
3584
3579
|
"@typescript-eslint/no-unsafe-argument": "error",
|
|
@@ -3983,7 +3978,7 @@ function typescriptRules(props) {
|
|
|
3983
3978
|
}
|
|
3984
3979
|
|
|
3985
3980
|
// src/configs/ts/typescript.ts
|
|
3986
|
-
function typescript(options) {
|
|
3981
|
+
async function typescript(options) {
|
|
3987
3982
|
const {
|
|
3988
3983
|
componentExts = [],
|
|
3989
3984
|
overrides = {},
|
|
@@ -4016,6 +4011,7 @@ function typescript(options) {
|
|
|
4016
4011
|
[tsPrefixTo]: default3
|
|
4017
4012
|
}
|
|
4018
4013
|
},
|
|
4014
|
+
// ...tseslint.configs.recommended,
|
|
4019
4015
|
{
|
|
4020
4016
|
// use ts parser for js files as well!
|
|
4021
4017
|
files: [GLOB_SRC, ...componentExts.map((ext) => `**/*.${ext}`)],
|
|
@@ -4180,10 +4176,10 @@ import gitignore from "eslint-config-flat-gitignore";
|
|
|
4180
4176
|
import path3, { dirname as dirname3, win32, join as join2 } from "path";
|
|
4181
4177
|
import process4 from "process";
|
|
4182
4178
|
|
|
4183
|
-
// node_modules/.pnpm/acorn@8.
|
|
4179
|
+
// node_modules/.pnpm/acorn@8.11.3/node_modules/acorn/dist/acorn.mjs
|
|
4184
4180
|
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];
|
|
4185
|
-
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,
|
|
4186
|
-
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\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\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";
|
|
4181
|
+
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];
|
|
4182
|
+
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";
|
|
4187
4183
|
var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
|
|
4188
4184
|
var reservedWords = {
|
|
4189
4185
|
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
|
|
@@ -4410,8 +4406,9 @@ var hasOwn = Object.hasOwn || function(obj, propName) {
|
|
|
4410
4406
|
var isArray = Array.isArray || function(obj) {
|
|
4411
4407
|
return toString.call(obj) === "[object Array]";
|
|
4412
4408
|
};
|
|
4409
|
+
var regexpCache = /* @__PURE__ */ Object.create(null);
|
|
4413
4410
|
function wordsRegexp(words) {
|
|
4414
|
-
return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$");
|
|
4411
|
+
return regexpCache[words] || (regexpCache[words] = new RegExp("^(?:" + words.replace(/ /g, "|") + ")$"));
|
|
4415
4412
|
}
|
|
4416
4413
|
function codePointToString(code) {
|
|
4417
4414
|
if (code <= 65535) {
|
|
@@ -4457,11 +4454,11 @@ var defaultOptions = {
|
|
|
4457
4454
|
// Can be either `"script"` or `"module"`. This influences global
|
|
4458
4455
|
// strict mode and parsing of `import` and `export` declarations.
|
|
4459
4456
|
sourceType: "script",
|
|
4460
|
-
// `onInsertedSemicolon` can be a callback that will be called
|
|
4461
|
-
//
|
|
4462
|
-
//
|
|
4463
|
-
// enabled, it is given the location as a `{line,
|
|
4464
|
-
// as second argument.
|
|
4457
|
+
// `onInsertedSemicolon` can be a callback that will be called when
|
|
4458
|
+
// a semicolon is automatically inserted. It will be passed the
|
|
4459
|
+
// position of the inserted semicolon as an offset, and if
|
|
4460
|
+
// `locations` is enabled, it is given the location as a `{line,
|
|
4461
|
+
// column}` object as second argument.
|
|
4465
4462
|
onInsertedSemicolon: null,
|
|
4466
4463
|
// `onTrailingComma` is similar to `onInsertedSemicolon`, but for
|
|
4467
4464
|
// trailing commas.
|
|
@@ -4514,6 +4511,8 @@ var defaultOptions = {
|
|
|
4514
4511
|
// passed, the full `{line, column}` locations of the start and
|
|
4515
4512
|
// end of the comments. Note that you are not allowed to call the
|
|
4516
4513
|
// parser from the callback—that will corrupt its internal state.
|
|
4514
|
+
// When this option has an array as value, objects representing the
|
|
4515
|
+
// comments are pushed to it.
|
|
4517
4516
|
onComment: null,
|
|
4518
4517
|
// Nodes have their start and end characters offsets recorded in
|
|
4519
4518
|
// `start` and `end` properties (directly on the node, rather than
|
|
@@ -5739,8 +5738,6 @@ pp$8.checkPatternExport = function(exports, pat) {
|
|
|
5739
5738
|
this.checkPatternExport(exports, pat.left);
|
|
5740
5739
|
} else if (type === "RestElement") {
|
|
5741
5740
|
this.checkPatternExport(exports, pat.argument);
|
|
5742
|
-
} else if (type === "ParenthesizedExpression") {
|
|
5743
|
-
this.checkPatternExport(exports, pat.expression);
|
|
5744
5741
|
}
|
|
5745
5742
|
};
|
|
5746
5743
|
pp$8.checkVariableExport = function(exports, decls) {
|
|
@@ -6217,6 +6214,12 @@ types$1._function.updateContext = types$1._class.updateContext = function(prevTy
|
|
|
6217
6214
|
}
|
|
6218
6215
|
this.exprAllowed = false;
|
|
6219
6216
|
};
|
|
6217
|
+
types$1.colon.updateContext = function() {
|
|
6218
|
+
if (this.curContext().token === "function") {
|
|
6219
|
+
this.context.pop();
|
|
6220
|
+
}
|
|
6221
|
+
this.exprAllowed = true;
|
|
6222
|
+
};
|
|
6220
6223
|
types$1.backQuote.updateContext = function() {
|
|
6221
6224
|
if (this.curContext() === types.q_tmpl) {
|
|
6222
6225
|
this.context.pop();
|
|
@@ -6706,11 +6709,13 @@ pp$5.parseExprImport = function(forNew) {
|
|
|
6706
6709
|
if (this.containsEsc) {
|
|
6707
6710
|
this.raiseRecoverable(this.start, "Escape sequence in keyword import");
|
|
6708
6711
|
}
|
|
6709
|
-
|
|
6712
|
+
this.next();
|
|
6710
6713
|
if (this.type === types$1.parenL && !forNew) {
|
|
6711
6714
|
return this.parseDynamicImport(node2);
|
|
6712
6715
|
} else if (this.type === types$1.dot) {
|
|
6713
|
-
|
|
6716
|
+
var meta = this.startNodeAt(node2.start, node2.loc && node2.loc.start);
|
|
6717
|
+
meta.name = "import";
|
|
6718
|
+
node2.meta = this.finishNode(meta, "Identifier");
|
|
6714
6719
|
return this.parseImportMeta(node2);
|
|
6715
6720
|
} else {
|
|
6716
6721
|
this.unexpected();
|
|
@@ -6839,9 +6844,12 @@ pp$5.parseNew = function() {
|
|
|
6839
6844
|
this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
6840
6845
|
}
|
|
6841
6846
|
var node2 = this.startNode();
|
|
6842
|
-
|
|
6843
|
-
if (this.options.ecmaVersion >= 6 && this.
|
|
6844
|
-
|
|
6847
|
+
this.next();
|
|
6848
|
+
if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) {
|
|
6849
|
+
var meta = this.startNodeAt(node2.start, node2.loc && node2.loc.start);
|
|
6850
|
+
meta.name = "new";
|
|
6851
|
+
node2.meta = this.finishNode(meta, "Identifier");
|
|
6852
|
+
this.next();
|
|
6845
6853
|
var containsEsc = this.containsEsc;
|
|
6846
6854
|
node2.property = this.parseIdent(true);
|
|
6847
6855
|
if (node2.property.name !== "target") {
|
|
@@ -7217,6 +7225,7 @@ pp$5.parseIdentNode = function() {
|
|
|
7217
7225
|
if ((node2.name === "class" || node2.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
|
|
7218
7226
|
this.context.pop();
|
|
7219
7227
|
}
|
|
7228
|
+
this.type = types$1.name;
|
|
7220
7229
|
} else {
|
|
7221
7230
|
this.unexpected();
|
|
7222
7231
|
}
|
|
@@ -9489,7 +9498,7 @@ pp.readWord = function() {
|
|
|
9489
9498
|
}
|
|
9490
9499
|
return this.finishToken(type, word);
|
|
9491
9500
|
};
|
|
9492
|
-
var version = "8.
|
|
9501
|
+
var version = "8.11.3";
|
|
9493
9502
|
Parser.acorn = {
|
|
9494
9503
|
Parser,
|
|
9495
9504
|
version,
|
|
@@ -9512,34 +9521,44 @@ Parser.acorn = {
|
|
|
9512
9521
|
nonASCIIwhitespace
|
|
9513
9522
|
};
|
|
9514
9523
|
|
|
9515
|
-
// node_modules/.pnpm/mlly@1.
|
|
9524
|
+
// node_modules/.pnpm/mlly@1.5.0/node_modules/mlly/dist/index.mjs
|
|
9516
9525
|
import { builtinModules, createRequire } from "module";
|
|
9517
9526
|
import fs, { realpathSync, statSync, Stats, promises, existsSync } from "fs";
|
|
9518
9527
|
import { fileURLToPath as fileURLToPath$1, URL as URL$1, pathToFileURL } from "url";
|
|
9519
9528
|
|
|
9520
|
-
// node_modules/.pnpm/ufo@1.
|
|
9529
|
+
// node_modules/.pnpm/ufo@1.4.0/node_modules/ufo/dist/index.mjs
|
|
9521
9530
|
var r = String.fromCharCode;
|
|
9522
|
-
var TRAILING_SLASH_RE =
|
|
9523
|
-
|
|
9524
|
-
|
|
9531
|
+
var TRAILING_SLASH_RE = /\/$|\/\?|\/#/;
|
|
9532
|
+
var JOIN_LEADING_SLASH_RE = /^\.?\//;
|
|
9533
|
+
function hasTrailingSlash(input = "", respectQueryAndFragment) {
|
|
9534
|
+
if (!respectQueryAndFragment) {
|
|
9525
9535
|
return input.endsWith("/");
|
|
9526
9536
|
}
|
|
9527
9537
|
return TRAILING_SLASH_RE.test(input);
|
|
9528
9538
|
}
|
|
9529
|
-
function withTrailingSlash(input = "",
|
|
9530
|
-
if (!
|
|
9539
|
+
function withTrailingSlash(input = "", respectQueryAndFragment) {
|
|
9540
|
+
if (!respectQueryAndFragment) {
|
|
9531
9541
|
return input.endsWith("/") ? input : input + "/";
|
|
9532
9542
|
}
|
|
9533
9543
|
if (hasTrailingSlash(input, true)) {
|
|
9534
9544
|
return input || "/";
|
|
9535
9545
|
}
|
|
9536
|
-
|
|
9537
|
-
|
|
9546
|
+
let path4 = input;
|
|
9547
|
+
let fragment = "";
|
|
9548
|
+
const fragmentIndex = input.indexOf("#");
|
|
9549
|
+
if (fragmentIndex >= 0) {
|
|
9550
|
+
path4 = input.slice(0, fragmentIndex);
|
|
9551
|
+
fragment = input.slice(fragmentIndex);
|
|
9552
|
+
if (!path4) {
|
|
9553
|
+
return fragment;
|
|
9554
|
+
}
|
|
9555
|
+
}
|
|
9556
|
+
const [s0, ...s] = path4.split("?");
|
|
9557
|
+
return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
|
|
9538
9558
|
}
|
|
9539
9559
|
function isNonEmptyURL(url) {
|
|
9540
9560
|
return url && url !== "/";
|
|
9541
9561
|
}
|
|
9542
|
-
var JOIN_LEADING_SLASH_RE = /^\.?\//;
|
|
9543
9562
|
function joinURL(base, ...input) {
|
|
9544
9563
|
let url = base || "";
|
|
9545
9564
|
for (const segment of input.filter((url2) => isNonEmptyURL(url2))) {
|
|
@@ -9552,14 +9571,15 @@ function joinURL(base, ...input) {
|
|
|
9552
9571
|
}
|
|
9553
9572
|
return url;
|
|
9554
9573
|
}
|
|
9574
|
+
var protocolRelative = Symbol.for("ufo:protocolRelative");
|
|
9555
9575
|
|
|
9556
|
-
// node_modules/.pnpm/pathe@1.1.
|
|
9576
|
+
// node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
9557
9577
|
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
9558
9578
|
var isAbsolute = function(p) {
|
|
9559
9579
|
return _IS_ABSOLUTE_RE.test(p);
|
|
9560
9580
|
};
|
|
9561
9581
|
|
|
9562
|
-
// node_modules/.pnpm/mlly@1.
|
|
9582
|
+
// node_modules/.pnpm/mlly@1.5.0/node_modules/mlly/dist/index.mjs
|
|
9563
9583
|
import assert from "assert";
|
|
9564
9584
|
import process$1 from "process";
|
|
9565
9585
|
import path2, { dirname as dirname2 } from "path";
|
|
@@ -9569,7 +9589,6 @@ var BUILTIN_MODULES = new Set(builtinModules);
|
|
|
9569
9589
|
function normalizeSlash(string_) {
|
|
9570
9590
|
return string_.replace(/\\/g, "/");
|
|
9571
9591
|
}
|
|
9572
|
-
var isWindows = process$1.platform === "win32";
|
|
9573
9592
|
var own$1 = {}.hasOwnProperty;
|
|
9574
9593
|
var classRegExp = /^([A-Z][a-z\d]*)+$/;
|
|
9575
9594
|
var kTypes = /* @__PURE__ */ new Set([
|
|
@@ -9715,10 +9734,10 @@ codes.ERR_MODULE_NOT_FOUND = createError(
|
|
|
9715
9734
|
/**
|
|
9716
9735
|
* @param {string} path
|
|
9717
9736
|
* @param {string} base
|
|
9718
|
-
* @param {
|
|
9737
|
+
* @param {boolean} [exactUrl]
|
|
9719
9738
|
*/
|
|
9720
|
-
(path4, base,
|
|
9721
|
-
return `Cannot find ${
|
|
9739
|
+
(path4, base, exactUrl = false) => {
|
|
9740
|
+
return `Cannot find ${exactUrl ? "module" : "package"} '${path4}' imported from ${base}`;
|
|
9722
9741
|
},
|
|
9723
9742
|
Error
|
|
9724
9743
|
);
|
|
@@ -9788,24 +9807,6 @@ codes.ERR_INVALID_ARG_VALUE = createError(
|
|
|
9788
9807
|
// Note: extra classes have been shaken out.
|
|
9789
9808
|
// , RangeError
|
|
9790
9809
|
);
|
|
9791
|
-
codes.ERR_UNSUPPORTED_ESM_URL_SCHEME = createError(
|
|
9792
|
-
"ERR_UNSUPPORTED_ESM_URL_SCHEME",
|
|
9793
|
-
/**
|
|
9794
|
-
* @param {URL} url
|
|
9795
|
-
* @param {Array<string>} supported
|
|
9796
|
-
*/
|
|
9797
|
-
(url, supported) => {
|
|
9798
|
-
let message = `Only URLs with a scheme in: ${formatList(
|
|
9799
|
-
supported
|
|
9800
|
-
)} are supported by the default ESM loader`;
|
|
9801
|
-
if (isWindows && url.protocol.length === 2) {
|
|
9802
|
-
message += ". On Windows, absolute paths must be valid file:// URLs";
|
|
9803
|
-
}
|
|
9804
|
-
message += `. Received protocol '${url.protocol}'`;
|
|
9805
|
-
return message;
|
|
9806
|
-
},
|
|
9807
|
-
Error
|
|
9808
|
-
);
|
|
9809
9810
|
function createError(sym, value, def) {
|
|
9810
9811
|
messages.set(sym, value);
|
|
9811
9812
|
return makeNodeErrorWithCode(def, sym);
|
|
@@ -9923,96 +9924,98 @@ function determineSpecificType(value) {
|
|
|
9923
9924
|
}
|
|
9924
9925
|
return `type ${typeof value} (${inspected})`;
|
|
9925
9926
|
}
|
|
9927
|
+
var hasOwnProperty$1 = {}.hasOwnProperty;
|
|
9928
|
+
var { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes;
|
|
9929
|
+
var cache = /* @__PURE__ */ new Map();
|
|
9926
9930
|
var reader = { read };
|
|
9927
9931
|
var packageJsonReader = reader;
|
|
9928
|
-
function read(jsonPath) {
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
path2.toNamespacedPath(path2.join(path2.dirname(jsonPath), "package.json")),
|
|
9932
|
-
"utf8"
|
|
9933
|
-
);
|
|
9934
|
-
return { string };
|
|
9935
|
-
} catch (error) {
|
|
9936
|
-
const exception = (
|
|
9937
|
-
/** @type {ErrnoException} */
|
|
9938
|
-
error
|
|
9939
|
-
);
|
|
9940
|
-
if (exception.code === "ENOENT") {
|
|
9941
|
-
return { string: void 0 };
|
|
9942
|
-
}
|
|
9943
|
-
throw exception;
|
|
9944
|
-
}
|
|
9945
|
-
}
|
|
9946
|
-
var { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes;
|
|
9947
|
-
var packageJsonCache = /* @__PURE__ */ new Map();
|
|
9948
|
-
function getPackageConfig(path4, specifier, base) {
|
|
9949
|
-
const existing = packageJsonCache.get(path4);
|
|
9950
|
-
if (existing !== void 0) {
|
|
9932
|
+
function read(jsonPath, { base, specifier }) {
|
|
9933
|
+
const existing = cache.get(jsonPath);
|
|
9934
|
+
if (existing) {
|
|
9951
9935
|
return existing;
|
|
9952
9936
|
}
|
|
9953
|
-
|
|
9954
|
-
if (source === void 0) {
|
|
9955
|
-
const packageConfig2 = {
|
|
9956
|
-
pjsonPath: path4,
|
|
9957
|
-
exists: false,
|
|
9958
|
-
main: void 0,
|
|
9959
|
-
name: void 0,
|
|
9960
|
-
type: "none",
|
|
9961
|
-
exports: void 0,
|
|
9962
|
-
imports: void 0
|
|
9963
|
-
};
|
|
9964
|
-
packageJsonCache.set(path4, packageConfig2);
|
|
9965
|
-
return packageConfig2;
|
|
9966
|
-
}
|
|
9967
|
-
let packageJson;
|
|
9937
|
+
let string;
|
|
9968
9938
|
try {
|
|
9969
|
-
|
|
9939
|
+
string = fs.readFileSync(path2.toNamespacedPath(jsonPath), "utf8");
|
|
9970
9940
|
} catch (error) {
|
|
9971
9941
|
const exception = (
|
|
9972
9942
|
/** @type {ErrnoException} */
|
|
9973
9943
|
error
|
|
9974
9944
|
);
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
exception.message
|
|
9979
|
-
);
|
|
9945
|
+
if (exception.code !== "ENOENT") {
|
|
9946
|
+
throw exception;
|
|
9947
|
+
}
|
|
9980
9948
|
}
|
|
9981
|
-
const
|
|
9982
|
-
|
|
9983
|
-
pjsonPath:
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
// @ts-expect-error Assume `Record<string, unknown>`.
|
|
9991
|
-
imports: imports2 && typeof imports2 === "object" ? imports2 : void 0
|
|
9949
|
+
const result = {
|
|
9950
|
+
exists: false,
|
|
9951
|
+
pjsonPath: jsonPath,
|
|
9952
|
+
main: void 0,
|
|
9953
|
+
name: void 0,
|
|
9954
|
+
type: "none",
|
|
9955
|
+
// Ignore unknown types for forwards compatibility
|
|
9956
|
+
exports: void 0,
|
|
9957
|
+
imports: void 0
|
|
9992
9958
|
};
|
|
9993
|
-
|
|
9994
|
-
|
|
9959
|
+
if (string !== void 0) {
|
|
9960
|
+
let parsed;
|
|
9961
|
+
try {
|
|
9962
|
+
parsed = JSON.parse(string);
|
|
9963
|
+
} catch (error_) {
|
|
9964
|
+
const cause = (
|
|
9965
|
+
/** @type {ErrnoException} */
|
|
9966
|
+
error_
|
|
9967
|
+
);
|
|
9968
|
+
const error = new ERR_INVALID_PACKAGE_CONFIG$1(
|
|
9969
|
+
jsonPath,
|
|
9970
|
+
(base ? `"${specifier}" from ` : "") + fileURLToPath$1(base || specifier),
|
|
9971
|
+
cause.message
|
|
9972
|
+
);
|
|
9973
|
+
error.cause = cause;
|
|
9974
|
+
throw error;
|
|
9975
|
+
}
|
|
9976
|
+
result.exists = true;
|
|
9977
|
+
if (hasOwnProperty$1.call(parsed, "name") && typeof parsed.name === "string") {
|
|
9978
|
+
result.name = parsed.name;
|
|
9979
|
+
}
|
|
9980
|
+
if (hasOwnProperty$1.call(parsed, "main") && typeof parsed.main === "string") {
|
|
9981
|
+
result.main = parsed.main;
|
|
9982
|
+
}
|
|
9983
|
+
if (hasOwnProperty$1.call(parsed, "exports")) {
|
|
9984
|
+
result.exports = parsed.exports;
|
|
9985
|
+
}
|
|
9986
|
+
if (hasOwnProperty$1.call(parsed, "imports")) {
|
|
9987
|
+
result.imports = parsed.imports;
|
|
9988
|
+
}
|
|
9989
|
+
if (hasOwnProperty$1.call(parsed, "type") && (parsed.type === "commonjs" || parsed.type === "module")) {
|
|
9990
|
+
result.type = parsed.type;
|
|
9991
|
+
}
|
|
9992
|
+
}
|
|
9993
|
+
cache.set(jsonPath, result);
|
|
9994
|
+
return result;
|
|
9995
9995
|
}
|
|
9996
9996
|
function getPackageScopeConfig(resolved) {
|
|
9997
|
-
let
|
|
9997
|
+
let packageJSONUrl = new URL$1("package.json", resolved);
|
|
9998
9998
|
while (true) {
|
|
9999
|
-
const
|
|
10000
|
-
if (
|
|
9999
|
+
const packageJSONPath2 = packageJSONUrl.pathname;
|
|
10000
|
+
if (packageJSONPath2.endsWith("node_modules/package.json")) {
|
|
10001
10001
|
break;
|
|
10002
|
-
|
|
10003
|
-
|
|
10004
|
-
|
|
10002
|
+
}
|
|
10003
|
+
const packageConfig = packageJsonReader.read(
|
|
10004
|
+
fileURLToPath$1(packageJSONUrl),
|
|
10005
|
+
{ specifier: resolved }
|
|
10005
10006
|
);
|
|
10006
|
-
if (
|
|
10007
|
-
return
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
|
|
10007
|
+
if (packageConfig.exists) {
|
|
10008
|
+
return packageConfig;
|
|
10009
|
+
}
|
|
10010
|
+
const lastPackageJSONUrl = packageJSONUrl;
|
|
10011
|
+
packageJSONUrl = new URL$1("../package.json", packageJSONUrl);
|
|
10012
|
+
if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) {
|
|
10011
10013
|
break;
|
|
10014
|
+
}
|
|
10012
10015
|
}
|
|
10013
|
-
const
|
|
10014
|
-
|
|
10015
|
-
pjsonPath:
|
|
10016
|
+
const packageJSONPath = fileURLToPath$1(packageJSONUrl);
|
|
10017
|
+
return {
|
|
10018
|
+
pjsonPath: packageJSONPath,
|
|
10016
10019
|
exists: false,
|
|
10017
10020
|
main: void 0,
|
|
10018
10021
|
name: void 0,
|
|
@@ -10020,8 +10023,6 @@ function getPackageScopeConfig(resolved) {
|
|
|
10020
10023
|
exports: void 0,
|
|
10021
10024
|
imports: void 0
|
|
10022
10025
|
};
|
|
10023
|
-
packageJsonCache.set(packageJsonPath, packageConfig);
|
|
10024
|
-
return packageConfig;
|
|
10025
10026
|
}
|
|
10026
10027
|
function getPackageType(url) {
|
|
10027
10028
|
const packageConfig = getPackageScopeConfig(url);
|
|
@@ -10078,7 +10079,18 @@ function extname2(url) {
|
|
|
10078
10079
|
function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
|
|
10079
10080
|
const ext = extname2(url);
|
|
10080
10081
|
if (ext === ".js") {
|
|
10081
|
-
|
|
10082
|
+
const packageType = getPackageType(url);
|
|
10083
|
+
if (packageType !== "none") {
|
|
10084
|
+
return packageType;
|
|
10085
|
+
}
|
|
10086
|
+
return "commonjs";
|
|
10087
|
+
}
|
|
10088
|
+
if (ext === "") {
|
|
10089
|
+
const packageType = getPackageType(url);
|
|
10090
|
+
if (packageType === "none" || packageType === "commonjs") {
|
|
10091
|
+
return "commonjs";
|
|
10092
|
+
}
|
|
10093
|
+
return "module";
|
|
10082
10094
|
}
|
|
10083
10095
|
const format3 = extensionFormatMap[ext];
|
|
10084
10096
|
if (format3)
|
|
@@ -10092,10 +10104,11 @@ function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
|
|
|
10092
10104
|
function getHttpProtocolModuleFormat() {
|
|
10093
10105
|
}
|
|
10094
10106
|
function defaultGetFormatWithoutErrors(url, context) {
|
|
10095
|
-
|
|
10107
|
+
const protocol = url.protocol;
|
|
10108
|
+
if (!hasOwnProperty2.call(protocolHandlers, protocol)) {
|
|
10096
10109
|
return null;
|
|
10097
10110
|
}
|
|
10098
|
-
return protocolHandlers[
|
|
10111
|
+
return protocolHandlers[protocol](url, context, true) || null;
|
|
10099
10112
|
}
|
|
10100
10113
|
var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];
|
|
10101
10114
|
var {
|
|
@@ -10106,8 +10119,7 @@ var {
|
|
|
10106
10119
|
ERR_MODULE_NOT_FOUND,
|
|
10107
10120
|
ERR_PACKAGE_IMPORT_NOT_DEFINED,
|
|
10108
10121
|
ERR_PACKAGE_PATH_NOT_EXPORTED,
|
|
10109
|
-
ERR_UNSUPPORTED_DIR_IMPORT
|
|
10110
|
-
ERR_UNSUPPORTED_ESM_URL_SCHEME
|
|
10122
|
+
ERR_UNSUPPORTED_DIR_IMPORT
|
|
10111
10123
|
} = codes;
|
|
10112
10124
|
var own = {}.hasOwnProperty;
|
|
10113
10125
|
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;
|
|
@@ -10118,6 +10130,9 @@ var encodedSepRegEx = /%2f|%5c/i;
|
|
|
10118
10130
|
var emittedPackageWarnings = /* @__PURE__ */ new Set();
|
|
10119
10131
|
var doubleSlashRegEx = /[/\\]{2}/;
|
|
10120
10132
|
function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) {
|
|
10133
|
+
if (process$1.noDeprecation) {
|
|
10134
|
+
return;
|
|
10135
|
+
}
|
|
10121
10136
|
const pjsonPath = fileURLToPath$1(packageJsonUrl);
|
|
10122
10137
|
const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;
|
|
10123
10138
|
process$1.emitWarning(
|
|
@@ -10127,30 +10142,34 @@ function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, i
|
|
|
10127
10142
|
);
|
|
10128
10143
|
}
|
|
10129
10144
|
function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
|
|
10145
|
+
if (process$1.noDeprecation) {
|
|
10146
|
+
return;
|
|
10147
|
+
}
|
|
10130
10148
|
const format3 = defaultGetFormatWithoutErrors(url, { parentURL: base.href });
|
|
10131
10149
|
if (format3 !== "module")
|
|
10132
10150
|
return;
|
|
10133
|
-
const
|
|
10151
|
+
const urlPath = fileURLToPath$1(url.href);
|
|
10134
10152
|
const pkgPath = fileURLToPath$1(new URL$1(".", packageJsonUrl));
|
|
10135
10153
|
const basePath = fileURLToPath$1(base);
|
|
10136
|
-
if (main)
|
|
10154
|
+
if (!main) {
|
|
10137
10155
|
process$1.emitWarning(
|
|
10138
|
-
`
|
|
10156
|
+
`No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${urlPath.slice(
|
|
10139
10157
|
pkgPath.length
|
|
10140
10158
|
)}", imported from ${basePath}.
|
|
10141
|
-
|
|
10159
|
+
Default "index" lookups for the main are deprecated for ES modules.`,
|
|
10142
10160
|
"DeprecationWarning",
|
|
10143
10161
|
"DEP0151"
|
|
10144
10162
|
);
|
|
10145
|
-
else
|
|
10163
|
+
} else if (path2.resolve(pkgPath, main) !== urlPath) {
|
|
10146
10164
|
process$1.emitWarning(
|
|
10147
|
-
`
|
|
10165
|
+
`Package ${pkgPath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(
|
|
10148
10166
|
pkgPath.length
|
|
10149
10167
|
)}", imported from ${basePath}.
|
|
10150
|
-
|
|
10168
|
+
Automatic extension resolution of the "main" field is deprecated for ES modules.`,
|
|
10151
10169
|
"DeprecationWarning",
|
|
10152
10170
|
"DEP0151"
|
|
10153
10171
|
);
|
|
10172
|
+
}
|
|
10154
10173
|
}
|
|
10155
10174
|
function tryStatSync(path4) {
|
|
10156
10175
|
try {
|
|
@@ -10213,13 +10232,25 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
|
10213
10232
|
);
|
|
10214
10233
|
}
|
|
10215
10234
|
function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
10216
|
-
if (encodedSepRegEx.exec(resolved.pathname) !== null)
|
|
10235
|
+
if (encodedSepRegEx.exec(resolved.pathname) !== null) {
|
|
10217
10236
|
throw new ERR_INVALID_MODULE_SPECIFIER(
|
|
10218
10237
|
resolved.pathname,
|
|
10219
10238
|
'must not include encoded "/" or "\\" characters',
|
|
10220
10239
|
fileURLToPath$1(base)
|
|
10221
10240
|
);
|
|
10222
|
-
|
|
10241
|
+
}
|
|
10242
|
+
let filePath;
|
|
10243
|
+
try {
|
|
10244
|
+
filePath = fileURLToPath$1(resolved);
|
|
10245
|
+
} catch (error) {
|
|
10246
|
+
const cause = (
|
|
10247
|
+
/** @type {ErrnoException} */
|
|
10248
|
+
error
|
|
10249
|
+
);
|
|
10250
|
+
Object.defineProperty(cause, "input", { value: String(resolved) });
|
|
10251
|
+
Object.defineProperty(cause, "module", { value: String(base) });
|
|
10252
|
+
throw cause;
|
|
10253
|
+
}
|
|
10223
10254
|
const stats = tryStatSync(
|
|
10224
10255
|
filePath.endsWith("/") ? filePath.slice(-1) : filePath
|
|
10225
10256
|
);
|
|
@@ -10229,11 +10260,13 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
|
10229
10260
|
throw error;
|
|
10230
10261
|
}
|
|
10231
10262
|
if (!stats.isFile()) {
|
|
10232
|
-
|
|
10263
|
+
const error = new ERR_MODULE_NOT_FOUND(
|
|
10233
10264
|
filePath || resolved.pathname,
|
|
10234
10265
|
base && fileURLToPath$1(base),
|
|
10235
|
-
|
|
10266
|
+
true
|
|
10236
10267
|
);
|
|
10268
|
+
error.url = String(resolved);
|
|
10269
|
+
throw error;
|
|
10237
10270
|
}
|
|
10238
10271
|
if (!preserveSymlinks) {
|
|
10239
10272
|
const real = realpathSync(filePath);
|
|
@@ -10501,6 +10534,9 @@ function isConditionalExportsMainSugar(exports, packageJsonUrl, base) {
|
|
|
10501
10534
|
return isConditionalSugar;
|
|
10502
10535
|
}
|
|
10503
10536
|
function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
|
|
10537
|
+
if (process$1.noDeprecation) {
|
|
10538
|
+
return;
|
|
10539
|
+
}
|
|
10504
10540
|
const pjsonPath = fileURLToPath$1(pjsonUrl);
|
|
10505
10541
|
if (emittedPackageWarnings.has(pjsonPath + "|" + match))
|
|
10506
10542
|
return;
|
|
@@ -10732,7 +10768,10 @@ function packageResolve(specifier, base, conditions) {
|
|
|
10732
10768
|
packageJsonPath = fileURLToPath$1(packageJsonUrl);
|
|
10733
10769
|
continue;
|
|
10734
10770
|
}
|
|
10735
|
-
const packageConfig2 =
|
|
10771
|
+
const packageConfig2 = packageJsonReader.read(packageJsonPath, {
|
|
10772
|
+
base,
|
|
10773
|
+
specifier
|
|
10774
|
+
});
|
|
10736
10775
|
if (packageConfig2.exports !== void 0 && packageConfig2.exports !== null) {
|
|
10737
10776
|
return packageExportsResolve(
|
|
10738
10777
|
packageJsonUrl,
|
|
@@ -10747,7 +10786,7 @@ function packageResolve(specifier, base, conditions) {
|
|
|
10747
10786
|
}
|
|
10748
10787
|
return new URL$1(packageSubpath, packageJsonUrl);
|
|
10749
10788
|
} while (packageJsonPath.length !== lastPath.length);
|
|
10750
|
-
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath$1(base));
|
|
10789
|
+
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath$1(base), false);
|
|
10751
10790
|
}
|
|
10752
10791
|
function isRelativeSpecifier(specifier) {
|
|
10753
10792
|
if (specifier[0] === ".") {
|
|
@@ -10896,60 +10935,6 @@ function resolvePathSync(id, options) {
|
|
|
10896
10935
|
}
|
|
10897
10936
|
|
|
10898
10937
|
// node_modules/.pnpm/local-pkg@0.5.0/node_modules/local-pkg/dist/index.mjs
|
|
10899
|
-
var Node3 = class {
|
|
10900
|
-
constructor(value) {
|
|
10901
|
-
__publicField(this, "value");
|
|
10902
|
-
__publicField(this, "next");
|
|
10903
|
-
this.value = value;
|
|
10904
|
-
}
|
|
10905
|
-
};
|
|
10906
|
-
var _head, _tail, _size;
|
|
10907
|
-
var Queue = class {
|
|
10908
|
-
constructor() {
|
|
10909
|
-
__privateAdd(this, _head, void 0);
|
|
10910
|
-
__privateAdd(this, _tail, void 0);
|
|
10911
|
-
__privateAdd(this, _size, void 0);
|
|
10912
|
-
this.clear();
|
|
10913
|
-
}
|
|
10914
|
-
enqueue(value) {
|
|
10915
|
-
const node2 = new Node3(value);
|
|
10916
|
-
if (__privateGet(this, _head)) {
|
|
10917
|
-
__privateGet(this, _tail).next = node2;
|
|
10918
|
-
__privateSet(this, _tail, node2);
|
|
10919
|
-
} else {
|
|
10920
|
-
__privateSet(this, _head, node2);
|
|
10921
|
-
__privateSet(this, _tail, node2);
|
|
10922
|
-
}
|
|
10923
|
-
__privateWrapper(this, _size)._++;
|
|
10924
|
-
}
|
|
10925
|
-
dequeue() {
|
|
10926
|
-
const current2 = __privateGet(this, _head);
|
|
10927
|
-
if (!current2) {
|
|
10928
|
-
return;
|
|
10929
|
-
}
|
|
10930
|
-
__privateSet(this, _head, __privateGet(this, _head).next);
|
|
10931
|
-
__privateWrapper(this, _size)._--;
|
|
10932
|
-
return current2.value;
|
|
10933
|
-
}
|
|
10934
|
-
clear() {
|
|
10935
|
-
__privateSet(this, _head, void 0);
|
|
10936
|
-
__privateSet(this, _tail, void 0);
|
|
10937
|
-
__privateSet(this, _size, 0);
|
|
10938
|
-
}
|
|
10939
|
-
get size() {
|
|
10940
|
-
return __privateGet(this, _size);
|
|
10941
|
-
}
|
|
10942
|
-
*[Symbol.iterator]() {
|
|
10943
|
-
let current2 = __privateGet(this, _head);
|
|
10944
|
-
while (current2) {
|
|
10945
|
-
yield current2.value;
|
|
10946
|
-
current2 = current2.next;
|
|
10947
|
-
}
|
|
10948
|
-
}
|
|
10949
|
-
};
|
|
10950
|
-
_head = new WeakMap();
|
|
10951
|
-
_tail = new WeakMap();
|
|
10952
|
-
_size = new WeakMap();
|
|
10953
10938
|
var findUpStop = Symbol("findUpStop");
|
|
10954
10939
|
function _resolve2(path4, options = {}) {
|
|
10955
10940
|
if (options.platform === "auto" || !options.platform)
|
|
@@ -11044,6 +11029,119 @@ var slowRules = [
|
|
|
11044
11029
|
"@typescript-eslint/no-unsafe-return"
|
|
11045
11030
|
];
|
|
11046
11031
|
|
|
11032
|
+
// src/configs/md.ts
|
|
11033
|
+
function markdown(options = {}) {
|
|
11034
|
+
const { componentExts = [], overrides = {} } = options;
|
|
11035
|
+
const tsRulesOff = Object.fromEntries(
|
|
11036
|
+
// @ts-expect-error - undefined
|
|
11037
|
+
Object.keys(typescriptRulesTypeAware()).map((key) => [
|
|
11038
|
+
`@typescript-eslint/${key}`,
|
|
11039
|
+
"off"
|
|
11040
|
+
])
|
|
11041
|
+
);
|
|
11042
|
+
return [
|
|
11043
|
+
{
|
|
11044
|
+
name: "jsse:markdown:setup",
|
|
11045
|
+
plugins: {
|
|
11046
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
11047
|
+
markdown: default15
|
|
11048
|
+
}
|
|
11049
|
+
},
|
|
11050
|
+
{
|
|
11051
|
+
files: [GLOB_MARKDOWN],
|
|
11052
|
+
name: "jsse:markdown:processor",
|
|
11053
|
+
processor: "markdown/markdown"
|
|
11054
|
+
},
|
|
11055
|
+
{
|
|
11056
|
+
files: [
|
|
11057
|
+
GLOB_MARKDOWN_CODE,
|
|
11058
|
+
...componentExts.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)
|
|
11059
|
+
],
|
|
11060
|
+
languageOptions: {
|
|
11061
|
+
parserOptions: {
|
|
11062
|
+
ecmaFeatures: {
|
|
11063
|
+
impliedStrict: true
|
|
11064
|
+
}
|
|
11065
|
+
}
|
|
11066
|
+
},
|
|
11067
|
+
name: "jsse:markdown:rules",
|
|
11068
|
+
rules: {
|
|
11069
|
+
"@typescript-eslint/consistent-type-imports": "off",
|
|
11070
|
+
"@typescript-eslint/no-namespace": "off",
|
|
11071
|
+
"@typescript-eslint/no-redeclare": "off",
|
|
11072
|
+
"@typescript-eslint/no-require-imports": "off",
|
|
11073
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
11074
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
11075
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
11076
|
+
"no-alert": "off",
|
|
11077
|
+
"no-console": "off",
|
|
11078
|
+
"no-undef": "off",
|
|
11079
|
+
"no-unused-expressions": "off",
|
|
11080
|
+
"no-unused-vars": "off",
|
|
11081
|
+
"node/prefer-global/process": "off",
|
|
11082
|
+
// Type aware rules
|
|
11083
|
+
"object-curly-newline": "off",
|
|
11084
|
+
"style/comma-dangle": "off",
|
|
11085
|
+
"style/eol-last": "off",
|
|
11086
|
+
"unicode-bom": "off",
|
|
11087
|
+
"unused-imports/no-unused-imports": "off",
|
|
11088
|
+
"unused-imports/no-unused-vars": "off",
|
|
11089
|
+
...tsRulesOff,
|
|
11090
|
+
...overrides
|
|
11091
|
+
}
|
|
11092
|
+
}
|
|
11093
|
+
];
|
|
11094
|
+
}
|
|
11095
|
+
|
|
11096
|
+
// src/configs/yml.ts
|
|
11097
|
+
async function yml(options = {}) {
|
|
11098
|
+
const { files = [GLOB_YAML], overrides = {}, stylistic: stylistic2 = true } = options;
|
|
11099
|
+
const { indent = 2, quotes = "single" } = typeof stylistic2 === "boolean" ? {} : stylistic2;
|
|
11100
|
+
const [pluginYaml, parserYaml] = await Promise.all([
|
|
11101
|
+
interopDefault(import("eslint-plugin-yml")),
|
|
11102
|
+
interopDefault(import("yaml-eslint-parser"))
|
|
11103
|
+
]);
|
|
11104
|
+
return [
|
|
11105
|
+
{
|
|
11106
|
+
name: "jsse:yaml:setup",
|
|
11107
|
+
plugins: {
|
|
11108
|
+
yaml: pluginYaml
|
|
11109
|
+
}
|
|
11110
|
+
},
|
|
11111
|
+
{
|
|
11112
|
+
files,
|
|
11113
|
+
languageOptions: {
|
|
11114
|
+
parser: parserYaml
|
|
11115
|
+
},
|
|
11116
|
+
name: "antfu:yaml:rules",
|
|
11117
|
+
rules: {
|
|
11118
|
+
"style/spaced-comment": "off",
|
|
11119
|
+
"yaml/block-mapping": "error",
|
|
11120
|
+
"yaml/block-sequence": "error",
|
|
11121
|
+
"yaml/no-empty-key": "error",
|
|
11122
|
+
"yaml/no-empty-sequence-entry": "error",
|
|
11123
|
+
"yaml/no-irregular-whitespace": "error",
|
|
11124
|
+
"yaml/plain-scalar": "error",
|
|
11125
|
+
"yaml/vue-custom-block/no-parsing-error": "error",
|
|
11126
|
+
...stylistic2 ? {
|
|
11127
|
+
"yaml/block-mapping-question-indicator-newline": "error",
|
|
11128
|
+
"yaml/block-sequence-hyphen-indicator-newline": "error",
|
|
11129
|
+
"yaml/flow-mapping-curly-newline": "error",
|
|
11130
|
+
"yaml/flow-mapping-curly-spacing": "error",
|
|
11131
|
+
"yaml/flow-sequence-bracket-newline": "error",
|
|
11132
|
+
"yaml/flow-sequence-bracket-spacing": "error",
|
|
11133
|
+
"yaml/indent": ["error", indent === "tab" ? 2 : indent],
|
|
11134
|
+
"yaml/key-spacing": "error",
|
|
11135
|
+
"yaml/no-tab-indent": "error",
|
|
11136
|
+
"yaml/quotes": ["error", { avoidEscape: false, prefer: quotes }],
|
|
11137
|
+
"yaml/spaced-comment": "error"
|
|
11138
|
+
} : {},
|
|
11139
|
+
...overrides
|
|
11140
|
+
}
|
|
11141
|
+
}
|
|
11142
|
+
];
|
|
11143
|
+
}
|
|
11144
|
+
|
|
11047
11145
|
// src/factory.ts
|
|
11048
11146
|
var flatConfigProps = [
|
|
11049
11147
|
"files",
|
|
@@ -11063,6 +11161,7 @@ function defaultOptions2() {
|
|
|
11063
11161
|
gitignore: true,
|
|
11064
11162
|
isInEditor: isInEditor(),
|
|
11065
11163
|
jsonc: true,
|
|
11164
|
+
markdown: false,
|
|
11066
11165
|
off: [],
|
|
11067
11166
|
overrides: {},
|
|
11068
11167
|
prettier: true,
|
|
@@ -11095,7 +11194,7 @@ function normalizeOptions(options = {}) {
|
|
|
11095
11194
|
stylistic: stylisticOptions
|
|
11096
11195
|
};
|
|
11097
11196
|
}
|
|
11098
|
-
function jsse(options = {}, ...userConfigs) {
|
|
11197
|
+
async function jsse(options = {}, ...userConfigs) {
|
|
11099
11198
|
const normalizedOptions = normalizeOptions(options);
|
|
11100
11199
|
const {
|
|
11101
11200
|
componentExts,
|
|
@@ -11130,9 +11229,7 @@ function jsse(options = {}, ...userConfigs) {
|
|
|
11130
11229
|
}),
|
|
11131
11230
|
comments(),
|
|
11132
11231
|
node(),
|
|
11133
|
-
jsdoc(
|
|
11134
|
-
stylistic: stylisticOptions
|
|
11135
|
-
}),
|
|
11232
|
+
jsdoc(),
|
|
11136
11233
|
imports({
|
|
11137
11234
|
stylistic: stylisticOptions
|
|
11138
11235
|
}),
|
|
@@ -11140,24 +11237,31 @@ function jsse(options = {}, ...userConfigs) {
|
|
|
11140
11237
|
perfectionist()
|
|
11141
11238
|
);
|
|
11142
11239
|
if (enableTypeScript) {
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11240
|
+
const tscfg = await typescript({
|
|
11241
|
+
...typeof enableTypeScript === "boolean" ? {} : enableTypeScript,
|
|
11242
|
+
componentExts,
|
|
11243
|
+
overrides: overrides.typescript,
|
|
11244
|
+
prefix: {
|
|
11245
|
+
from: "@typescript-eslint",
|
|
11246
|
+
to: tsPrefix ?? "@typescript-eslint"
|
|
11247
|
+
},
|
|
11248
|
+
react: enableReact,
|
|
11249
|
+
typeAware
|
|
11250
|
+
});
|
|
11251
|
+
configs.push(tscfg);
|
|
11252
|
+
}
|
|
11253
|
+
if (normalizedOptions.markdown) {
|
|
11254
|
+
configs.push(markdown());
|
|
11255
|
+
}
|
|
11256
|
+
if (normalizedOptions.yaml) {
|
|
11257
|
+
const ymlConfig = await yml();
|
|
11258
|
+
configs.push(ymlConfig);
|
|
11156
11259
|
}
|
|
11157
11260
|
if (normalizedOptions.react) {
|
|
11158
11261
|
configs.push(
|
|
11159
11262
|
react({
|
|
11160
|
-
|
|
11263
|
+
// use react refresh if not explicitly disabled w/ 'false'
|
|
11264
|
+
reactRefresh: normalizedOptions.reactRefresh !== false
|
|
11161
11265
|
})
|
|
11162
11266
|
);
|
|
11163
11267
|
}
|
|
@@ -11253,6 +11357,7 @@ export {
|
|
|
11253
11357
|
eslintConfigPrettierRules,
|
|
11254
11358
|
ignores,
|
|
11255
11359
|
imports,
|
|
11360
|
+
interopDefault,
|
|
11256
11361
|
isCI,
|
|
11257
11362
|
isInEditor,
|
|
11258
11363
|
javascript,
|
|
@@ -11270,8 +11375,8 @@ export {
|
|
|
11270
11375
|
default5 as pluginJsdoc,
|
|
11271
11376
|
pluginJsonc,
|
|
11272
11377
|
default15 as pluginMarkdown,
|
|
11378
|
+
default6 as pluginN,
|
|
11273
11379
|
default7 as pluginNoOnlyTests,
|
|
11274
|
-
default6 as pluginNode,
|
|
11275
11380
|
default16 as pluginPerfectionist,
|
|
11276
11381
|
default8 as pluginReact,
|
|
11277
11382
|
default9 as pluginReactHooks,
|