@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.cjs
CHANGED
|
@@ -5,7 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
10
9
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
10
|
};
|
|
@@ -30,40 +29,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
29
|
mod
|
|
31
30
|
));
|
|
32
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
|
-
var __publicField = (obj, key, value) => {
|
|
34
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
35
|
-
return value;
|
|
36
|
-
};
|
|
37
|
-
var __accessCheck = (obj, member, msg) => {
|
|
38
|
-
if (!member.has(obj))
|
|
39
|
-
throw TypeError("Cannot " + msg);
|
|
40
|
-
};
|
|
41
|
-
var __privateGet = (obj, member, getter) => {
|
|
42
|
-
__accessCheck(obj, member, "read from private field");
|
|
43
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
44
|
-
};
|
|
45
|
-
var __privateAdd = (obj, member, value) => {
|
|
46
|
-
if (member.has(obj))
|
|
47
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
48
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
49
|
-
};
|
|
50
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
51
|
-
__accessCheck(obj, member, "write to private field");
|
|
52
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
53
|
-
return value;
|
|
54
|
-
};
|
|
55
|
-
var __privateWrapper = (obj, member, setter, getter) => ({
|
|
56
|
-
set _(value) {
|
|
57
|
-
__privateSet(obj, member, value, setter);
|
|
58
|
-
},
|
|
59
|
-
get _() {
|
|
60
|
-
return __privateGet(obj, member, getter);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
32
|
|
|
64
33
|
// node_modules/.pnpm/natural-compare@1.4.0/node_modules/natural-compare/index.js
|
|
65
34
|
var require_natural_compare = __commonJS({
|
|
66
|
-
"node_modules/.pnpm/natural-compare@1.4.0/node_modules/natural-compare/index.js"(
|
|
35
|
+
"node_modules/.pnpm/natural-compare@1.4.0/node_modules/natural-compare/index.js"(exports2, module2) {
|
|
67
36
|
"use strict";
|
|
68
37
|
var naturalCompare = function(a, b) {
|
|
69
38
|
var i, codeA, codeB = 1, posA = 0, posB = 0, alphabet = String.alphabet;
|
|
@@ -100,7 +69,7 @@ var require_natural_compare = __commonJS({
|
|
|
100
69
|
|
|
101
70
|
// node_modules/.pnpm/eslint-plugin-sort-keys@2.3.5/node_modules/eslint-plugin-sort-keys/rules/sort-keys-fix.js
|
|
102
71
|
var require_sort_keys_fix = __commonJS({
|
|
103
|
-
"node_modules/.pnpm/eslint-plugin-sort-keys@2.3.5/node_modules/eslint-plugin-sort-keys/rules/sort-keys-fix.js"(
|
|
72
|
+
"node_modules/.pnpm/eslint-plugin-sort-keys@2.3.5/node_modules/eslint-plugin-sort-keys/rules/sort-keys-fix.js"(exports2, module2) {
|
|
104
73
|
"use strict";
|
|
105
74
|
var naturalCompare = require_natural_compare();
|
|
106
75
|
module2.exports = {
|
|
@@ -332,7 +301,7 @@ var require_sort_keys_fix = __commonJS({
|
|
|
332
301
|
|
|
333
302
|
// node_modules/.pnpm/eslint-plugin-sort-keys@2.3.5/node_modules/eslint-plugin-sort-keys/index.js
|
|
334
303
|
var require_eslint_plugin_sort_keys = __commonJS({
|
|
335
|
-
"node_modules/.pnpm/eslint-plugin-sort-keys@2.3.5/node_modules/eslint-plugin-sort-keys/index.js"(
|
|
304
|
+
"node_modules/.pnpm/eslint-plugin-sort-keys@2.3.5/node_modules/eslint-plugin-sort-keys/index.js"(exports2, module2) {
|
|
336
305
|
"use strict";
|
|
337
306
|
module2.exports.rules = {
|
|
338
307
|
"sort-keys-fix": require_sort_keys_fix()
|
|
@@ -340,9 +309,9 @@ var require_eslint_plugin_sort_keys = __commonJS({
|
|
|
340
309
|
}
|
|
341
310
|
});
|
|
342
311
|
|
|
343
|
-
// node_modules/.pnpm/globals@
|
|
312
|
+
// node_modules/.pnpm/globals@14.0.0/node_modules/globals/globals.json
|
|
344
313
|
var require_globals = __commonJS({
|
|
345
|
-
"node_modules/.pnpm/globals@
|
|
314
|
+
"node_modules/.pnpm/globals@14.0.0/node_modules/globals/globals.json"(exports2, module2) {
|
|
346
315
|
module2.exports = {
|
|
347
316
|
builtin: {
|
|
348
317
|
AggregateError: false,
|
|
@@ -1444,6 +1413,30 @@ var require_globals = __commonJS({
|
|
|
1444
1413
|
XPathEvaluator: false,
|
|
1445
1414
|
XPathExpression: false,
|
|
1446
1415
|
XPathResult: false,
|
|
1416
|
+
XRAnchor: false,
|
|
1417
|
+
XRBoundedReferenceSpace: false,
|
|
1418
|
+
XRCPUDepthInformation: false,
|
|
1419
|
+
XRDepthInformation: false,
|
|
1420
|
+
XRFrame: false,
|
|
1421
|
+
XRInputSource: false,
|
|
1422
|
+
XRInputSourceArray: false,
|
|
1423
|
+
XRInputSourceEvent: false,
|
|
1424
|
+
XRInputSourcesChangeEvent: false,
|
|
1425
|
+
XRPose: false,
|
|
1426
|
+
XRReferenceSpace: false,
|
|
1427
|
+
XRReferenceSpaceEvent: false,
|
|
1428
|
+
XRRenderState: false,
|
|
1429
|
+
XRRigidTransform: false,
|
|
1430
|
+
XRSession: false,
|
|
1431
|
+
XRSessionEvent: false,
|
|
1432
|
+
XRSpace: false,
|
|
1433
|
+
XRSystem: false,
|
|
1434
|
+
XRView: false,
|
|
1435
|
+
XRViewerPose: false,
|
|
1436
|
+
XRViewport: false,
|
|
1437
|
+
XRWebGLBinding: false,
|
|
1438
|
+
XRWebGLDepthInformation: false,
|
|
1439
|
+
XRWebGLLayer: false,
|
|
1447
1440
|
XSLTProcessor: false
|
|
1448
1441
|
},
|
|
1449
1442
|
worker: {
|
|
@@ -2320,9 +2313,9 @@ var require_globals = __commonJS({
|
|
|
2320
2313
|
}
|
|
2321
2314
|
});
|
|
2322
2315
|
|
|
2323
|
-
// node_modules/.pnpm/globals@
|
|
2316
|
+
// node_modules/.pnpm/globals@14.0.0/node_modules/globals/index.js
|
|
2324
2317
|
var require_globals2 = __commonJS({
|
|
2325
|
-
"node_modules/.pnpm/globals@
|
|
2318
|
+
"node_modules/.pnpm/globals@14.0.0/node_modules/globals/index.js"(exports2, module2) {
|
|
2326
2319
|
"use strict";
|
|
2327
2320
|
module2.exports = require_globals();
|
|
2328
2321
|
}
|
|
@@ -2357,6 +2350,7 @@ __export(src_exports, {
|
|
|
2357
2350
|
eslintConfigPrettierRules: () => eslintConfigPrettierRules,
|
|
2358
2351
|
ignores: () => ignores,
|
|
2359
2352
|
imports: () => imports,
|
|
2353
|
+
interopDefault: () => interopDefault,
|
|
2360
2354
|
isCI: () => isCI,
|
|
2361
2355
|
isInEditor: () => isInEditor,
|
|
2362
2356
|
javascript: () => javascript,
|
|
@@ -2374,8 +2368,8 @@ __export(src_exports, {
|
|
|
2374
2368
|
pluginJsdoc: () => import_eslint_plugin_jsdoc.default,
|
|
2375
2369
|
pluginJsonc: () => pluginJsonc,
|
|
2376
2370
|
pluginMarkdown: () => import_eslint_plugin_markdown.default,
|
|
2371
|
+
pluginN: () => import_eslint_plugin_n.default,
|
|
2377
2372
|
pluginNoOnlyTests: () => import_eslint_plugin_no_only_tests.default,
|
|
2378
|
-
pluginNode: () => import_eslint_plugin_n.default,
|
|
2379
2373
|
pluginPerfectionist: () => import_eslint_plugin_perfectionist.default,
|
|
2380
2374
|
pluginReact: () => import_eslint_plugin_react.default,
|
|
2381
2375
|
pluginReactHooks: () => import_eslint_plugin_react_hooks.default,
|
|
@@ -2805,8 +2799,7 @@ function javascript(options = {}) {
|
|
|
2805
2799
|
}
|
|
2806
2800
|
|
|
2807
2801
|
// src/configs/jsdoc.ts
|
|
2808
|
-
function jsdoc(
|
|
2809
|
-
const { stylistic: stylistic2 = true } = options;
|
|
2802
|
+
function jsdoc() {
|
|
2810
2803
|
return [
|
|
2811
2804
|
{
|
|
2812
2805
|
name: "jsse:jsdoc",
|
|
@@ -2816,11 +2809,13 @@ function jsdoc(options = {}) {
|
|
|
2816
2809
|
},
|
|
2817
2810
|
rules: {
|
|
2818
2811
|
"jsdoc/check-access": "warn",
|
|
2812
|
+
"jsdoc/check-alignment": "warn",
|
|
2819
2813
|
"jsdoc/check-param-names": "warn",
|
|
2820
2814
|
"jsdoc/check-property-names": "warn",
|
|
2821
2815
|
"jsdoc/check-types": "warn",
|
|
2822
2816
|
"jsdoc/empty-tags": "warn",
|
|
2823
2817
|
"jsdoc/implements-on-classes": "warn",
|
|
2818
|
+
"jsdoc/multiline-blocks": "warn",
|
|
2824
2819
|
"jsdoc/no-defaults": "warn",
|
|
2825
2820
|
"jsdoc/no-multi-asterisks": "warn",
|
|
2826
2821
|
"jsdoc/require-param-name": "warn",
|
|
@@ -2829,11 +2824,7 @@ function jsdoc(options = {}) {
|
|
|
2829
2824
|
"jsdoc/require-property-name": "warn",
|
|
2830
2825
|
"jsdoc/require-returns-check": "warn",
|
|
2831
2826
|
"jsdoc/require-returns-description": "warn",
|
|
2832
|
-
"jsdoc/require-yields-check": "warn"
|
|
2833
|
-
...stylistic2 ? {
|
|
2834
|
-
"jsdoc/check-alignment": "warn",
|
|
2835
|
-
"jsdoc/multiline-blocks": "warn"
|
|
2836
|
-
} : {}
|
|
2827
|
+
"jsdoc/require-yields-check": "warn"
|
|
2837
2828
|
}
|
|
2838
2829
|
}
|
|
2839
2830
|
];
|
|
@@ -2911,11 +2902,11 @@ function jsonc(options = {}) {
|
|
|
2911
2902
|
];
|
|
2912
2903
|
}
|
|
2913
2904
|
|
|
2914
|
-
// src/configs/
|
|
2905
|
+
// src/configs/n.ts
|
|
2915
2906
|
function node() {
|
|
2916
2907
|
return [
|
|
2917
2908
|
{
|
|
2918
|
-
name: "jsse:
|
|
2909
|
+
name: "jsse:n",
|
|
2919
2910
|
plugins: {
|
|
2920
2911
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
2921
2912
|
node: import_eslint_plugin_n.default
|
|
@@ -3595,6 +3586,10 @@ function renameRules(rules, from, to) {
|
|
|
3595
3586
|
})
|
|
3596
3587
|
);
|
|
3597
3588
|
}
|
|
3589
|
+
async function interopDefault(m) {
|
|
3590
|
+
const resolved = await m;
|
|
3591
|
+
return resolved.default || resolved;
|
|
3592
|
+
}
|
|
3598
3593
|
function isCI() {
|
|
3599
3594
|
return !!import_node_process2.default.env.CI;
|
|
3600
3595
|
}
|
|
@@ -3657,6 +3652,7 @@ function typescriptRulesTypeAware() {
|
|
|
3657
3652
|
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
|
3658
3653
|
"@typescript-eslint/no-unnecessary-type-arguments": "off",
|
|
3659
3654
|
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
3655
|
+
"@typescript-eslint/no-useless-template-literals": "error",
|
|
3660
3656
|
"no-throw-literal": "off",
|
|
3661
3657
|
"@typescript-eslint/no-throw-literal": "error",
|
|
3662
3658
|
"@typescript-eslint/no-unsafe-argument": "error",
|
|
@@ -4061,7 +4057,7 @@ function typescriptRules(props) {
|
|
|
4061
4057
|
}
|
|
4062
4058
|
|
|
4063
4059
|
// src/configs/ts/typescript.ts
|
|
4064
|
-
function typescript(options) {
|
|
4060
|
+
async function typescript(options) {
|
|
4065
4061
|
const {
|
|
4066
4062
|
componentExts = [],
|
|
4067
4063
|
overrides = {},
|
|
@@ -4094,6 +4090,7 @@ function typescript(options) {
|
|
|
4094
4090
|
[tsPrefixTo]: import_eslint_plugin2.default
|
|
4095
4091
|
}
|
|
4096
4092
|
},
|
|
4093
|
+
// ...tseslint.configs.recommended,
|
|
4097
4094
|
{
|
|
4098
4095
|
// use ts parser for js files as well!
|
|
4099
4096
|
files: [GLOB_SRC, ...componentExts.map((ext) => `**/*.${ext}`)],
|
|
@@ -4260,10 +4257,10 @@ var import_node_fs2 = __toESM(require("fs"), 1);
|
|
|
4260
4257
|
var import_promises = __toESM(require("fs/promises"), 1);
|
|
4261
4258
|
var import_node_process4 = __toESM(require("process"), 1);
|
|
4262
4259
|
|
|
4263
|
-
// node_modules/.pnpm/acorn@8.
|
|
4260
|
+
// node_modules/.pnpm/acorn@8.11.3/node_modules/acorn/dist/acorn.mjs
|
|
4264
4261
|
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];
|
|
4265
|
-
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,
|
|
4266
|
-
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";
|
|
4262
|
+
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];
|
|
4263
|
+
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";
|
|
4267
4264
|
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";
|
|
4268
4265
|
var reservedWords = {
|
|
4269
4266
|
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",
|
|
@@ -4490,8 +4487,9 @@ var hasOwn = Object.hasOwn || function(obj, propName) {
|
|
|
4490
4487
|
var isArray = Array.isArray || function(obj) {
|
|
4491
4488
|
return toString.call(obj) === "[object Array]";
|
|
4492
4489
|
};
|
|
4490
|
+
var regexpCache = /* @__PURE__ */ Object.create(null);
|
|
4493
4491
|
function wordsRegexp(words) {
|
|
4494
|
-
return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$");
|
|
4492
|
+
return regexpCache[words] || (regexpCache[words] = new RegExp("^(?:" + words.replace(/ /g, "|") + ")$"));
|
|
4495
4493
|
}
|
|
4496
4494
|
function codePointToString(code) {
|
|
4497
4495
|
if (code <= 65535) {
|
|
@@ -4537,11 +4535,11 @@ var defaultOptions = {
|
|
|
4537
4535
|
// Can be either `"script"` or `"module"`. This influences global
|
|
4538
4536
|
// strict mode and parsing of `import` and `export` declarations.
|
|
4539
4537
|
sourceType: "script",
|
|
4540
|
-
// `onInsertedSemicolon` can be a callback that will be called
|
|
4541
|
-
//
|
|
4542
|
-
//
|
|
4543
|
-
// enabled, it is given the location as a `{line,
|
|
4544
|
-
// as second argument.
|
|
4538
|
+
// `onInsertedSemicolon` can be a callback that will be called when
|
|
4539
|
+
// a semicolon is automatically inserted. It will be passed the
|
|
4540
|
+
// position of the inserted semicolon as an offset, and if
|
|
4541
|
+
// `locations` is enabled, it is given the location as a `{line,
|
|
4542
|
+
// column}` object as second argument.
|
|
4545
4543
|
onInsertedSemicolon: null,
|
|
4546
4544
|
// `onTrailingComma` is similar to `onInsertedSemicolon`, but for
|
|
4547
4545
|
// trailing commas.
|
|
@@ -4594,6 +4592,8 @@ var defaultOptions = {
|
|
|
4594
4592
|
// passed, the full `{line, column}` locations of the start and
|
|
4595
4593
|
// end of the comments. Note that you are not allowed to call the
|
|
4596
4594
|
// parser from the callback—that will corrupt its internal state.
|
|
4595
|
+
// When this option has an array as value, objects representing the
|
|
4596
|
+
// comments are pushed to it.
|
|
4597
4597
|
onComment: null,
|
|
4598
4598
|
// Nodes have their start and end characters offsets recorded in
|
|
4599
4599
|
// `start` and `end` properties (directly on the node, rather than
|
|
@@ -4938,12 +4938,12 @@ pp$9.isSimpleAssignTarget = function(expr) {
|
|
|
4938
4938
|
};
|
|
4939
4939
|
var pp$8 = Parser.prototype;
|
|
4940
4940
|
pp$8.parseTopLevel = function(node2) {
|
|
4941
|
-
var
|
|
4941
|
+
var exports2 = /* @__PURE__ */ Object.create(null);
|
|
4942
4942
|
if (!node2.body) {
|
|
4943
4943
|
node2.body = [];
|
|
4944
4944
|
}
|
|
4945
4945
|
while (this.type !== types$1.eof) {
|
|
4946
|
-
var stmt = this.parseStatement(null, true,
|
|
4946
|
+
var stmt = this.parseStatement(null, true, exports2);
|
|
4947
4947
|
node2.body.push(stmt);
|
|
4948
4948
|
}
|
|
4949
4949
|
if (this.inModule) {
|
|
@@ -4999,7 +4999,7 @@ pp$8.isAsyncFunction = function() {
|
|
|
4999
4999
|
var next = this.pos + skip[0].length, after;
|
|
5000
5000
|
return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
|
|
5001
5001
|
};
|
|
5002
|
-
pp$8.parseStatement = function(context, topLevel,
|
|
5002
|
+
pp$8.parseStatement = function(context, topLevel, exports2) {
|
|
5003
5003
|
var starttype = this.type, node2 = this.startNode(), kind;
|
|
5004
5004
|
if (this.isLet(context)) {
|
|
5005
5005
|
starttype = types$1._var;
|
|
@@ -5068,7 +5068,7 @@ pp$8.parseStatement = function(context, topLevel, exports) {
|
|
|
5068
5068
|
this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
|
|
5069
5069
|
}
|
|
5070
5070
|
}
|
|
5071
|
-
return starttype === types$1._import ? this.parseImport(node2) : this.parseExport(node2,
|
|
5071
|
+
return starttype === types$1._import ? this.parseImport(node2) : this.parseExport(node2, exports2);
|
|
5072
5072
|
default:
|
|
5073
5073
|
if (this.isAsyncFunction()) {
|
|
5074
5074
|
if (context) {
|
|
@@ -5705,11 +5705,11 @@ function checkKeyName(node2, name) {
|
|
|
5705
5705
|
var key = node2.key;
|
|
5706
5706
|
return !computed && (key.type === "Identifier" && key.name === name || key.type === "Literal" && key.value === name);
|
|
5707
5707
|
}
|
|
5708
|
-
pp$8.parseExportAllDeclaration = function(node2,
|
|
5708
|
+
pp$8.parseExportAllDeclaration = function(node2, exports2) {
|
|
5709
5709
|
if (this.options.ecmaVersion >= 11) {
|
|
5710
5710
|
if (this.eatContextual("as")) {
|
|
5711
5711
|
node2.exported = this.parseModuleExportName();
|
|
5712
|
-
this.checkExport(
|
|
5712
|
+
this.checkExport(exports2, node2.exported, this.lastTokStart);
|
|
5713
5713
|
} else {
|
|
5714
5714
|
node2.exported = null;
|
|
5715
5715
|
}
|
|
@@ -5722,28 +5722,28 @@ pp$8.parseExportAllDeclaration = function(node2, exports) {
|
|
|
5722
5722
|
this.semicolon();
|
|
5723
5723
|
return this.finishNode(node2, "ExportAllDeclaration");
|
|
5724
5724
|
};
|
|
5725
|
-
pp$8.parseExport = function(node2,
|
|
5725
|
+
pp$8.parseExport = function(node2, exports2) {
|
|
5726
5726
|
this.next();
|
|
5727
5727
|
if (this.eat(types$1.star)) {
|
|
5728
|
-
return this.parseExportAllDeclaration(node2,
|
|
5728
|
+
return this.parseExportAllDeclaration(node2, exports2);
|
|
5729
5729
|
}
|
|
5730
5730
|
if (this.eat(types$1._default)) {
|
|
5731
|
-
this.checkExport(
|
|
5731
|
+
this.checkExport(exports2, "default", this.lastTokStart);
|
|
5732
5732
|
node2.declaration = this.parseExportDefaultDeclaration();
|
|
5733
5733
|
return this.finishNode(node2, "ExportDefaultDeclaration");
|
|
5734
5734
|
}
|
|
5735
5735
|
if (this.shouldParseExportStatement()) {
|
|
5736
5736
|
node2.declaration = this.parseExportDeclaration(node2);
|
|
5737
5737
|
if (node2.declaration.type === "VariableDeclaration") {
|
|
5738
|
-
this.checkVariableExport(
|
|
5738
|
+
this.checkVariableExport(exports2, node2.declaration.declarations);
|
|
5739
5739
|
} else {
|
|
5740
|
-
this.checkExport(
|
|
5740
|
+
this.checkExport(exports2, node2.declaration.id, node2.declaration.id.start);
|
|
5741
5741
|
}
|
|
5742
5742
|
node2.specifiers = [];
|
|
5743
5743
|
node2.source = null;
|
|
5744
5744
|
} else {
|
|
5745
5745
|
node2.declaration = null;
|
|
5746
|
-
node2.specifiers = this.parseExportSpecifiers(
|
|
5746
|
+
node2.specifiers = this.parseExportSpecifiers(exports2);
|
|
5747
5747
|
if (this.eatContextual("from")) {
|
|
5748
5748
|
if (this.type !== types$1.string) {
|
|
5749
5749
|
this.unexpected();
|
|
@@ -5785,68 +5785,66 @@ pp$8.parseExportDefaultDeclaration = function() {
|
|
|
5785
5785
|
return declaration;
|
|
5786
5786
|
}
|
|
5787
5787
|
};
|
|
5788
|
-
pp$8.checkExport = function(
|
|
5789
|
-
if (!
|
|
5788
|
+
pp$8.checkExport = function(exports2, name, pos) {
|
|
5789
|
+
if (!exports2) {
|
|
5790
5790
|
return;
|
|
5791
5791
|
}
|
|
5792
5792
|
if (typeof name !== "string") {
|
|
5793
5793
|
name = name.type === "Identifier" ? name.name : name.value;
|
|
5794
5794
|
}
|
|
5795
|
-
if (hasOwn(
|
|
5795
|
+
if (hasOwn(exports2, name)) {
|
|
5796
5796
|
this.raiseRecoverable(pos, "Duplicate export '" + name + "'");
|
|
5797
5797
|
}
|
|
5798
|
-
|
|
5798
|
+
exports2[name] = true;
|
|
5799
5799
|
};
|
|
5800
|
-
pp$8.checkPatternExport = function(
|
|
5800
|
+
pp$8.checkPatternExport = function(exports2, pat) {
|
|
5801
5801
|
var type = pat.type;
|
|
5802
5802
|
if (type === "Identifier") {
|
|
5803
|
-
this.checkExport(
|
|
5803
|
+
this.checkExport(exports2, pat, pat.start);
|
|
5804
5804
|
} else if (type === "ObjectPattern") {
|
|
5805
5805
|
for (var i = 0, list = pat.properties; i < list.length; i += 1) {
|
|
5806
5806
|
var prop = list[i];
|
|
5807
|
-
this.checkPatternExport(
|
|
5807
|
+
this.checkPatternExport(exports2, prop);
|
|
5808
5808
|
}
|
|
5809
5809
|
} else if (type === "ArrayPattern") {
|
|
5810
5810
|
for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
|
|
5811
5811
|
var elt = list$1[i$1];
|
|
5812
5812
|
if (elt) {
|
|
5813
|
-
this.checkPatternExport(
|
|
5813
|
+
this.checkPatternExport(exports2, elt);
|
|
5814
5814
|
}
|
|
5815
5815
|
}
|
|
5816
5816
|
} else if (type === "Property") {
|
|
5817
|
-
this.checkPatternExport(
|
|
5817
|
+
this.checkPatternExport(exports2, pat.value);
|
|
5818
5818
|
} else if (type === "AssignmentPattern") {
|
|
5819
|
-
this.checkPatternExport(
|
|
5819
|
+
this.checkPatternExport(exports2, pat.left);
|
|
5820
5820
|
} else if (type === "RestElement") {
|
|
5821
|
-
this.checkPatternExport(
|
|
5822
|
-
} else if (type === "ParenthesizedExpression") {
|
|
5823
|
-
this.checkPatternExport(exports, pat.expression);
|
|
5821
|
+
this.checkPatternExport(exports2, pat.argument);
|
|
5824
5822
|
}
|
|
5825
5823
|
};
|
|
5826
|
-
pp$8.checkVariableExport = function(
|
|
5827
|
-
if (!
|
|
5824
|
+
pp$8.checkVariableExport = function(exports2, decls) {
|
|
5825
|
+
if (!exports2) {
|
|
5828
5826
|
return;
|
|
5829
5827
|
}
|
|
5830
5828
|
for (var i = 0, list = decls; i < list.length; i += 1) {
|
|
5831
5829
|
var decl = list[i];
|
|
5832
|
-
this.checkPatternExport(
|
|
5830
|
+
this.checkPatternExport(exports2, decl.id);
|
|
5833
5831
|
}
|
|
5834
5832
|
};
|
|
5835
5833
|
pp$8.shouldParseExportStatement = function() {
|
|
5836
5834
|
return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
|
|
5837
5835
|
};
|
|
5838
|
-
pp$8.parseExportSpecifier = function(
|
|
5836
|
+
pp$8.parseExportSpecifier = function(exports2) {
|
|
5839
5837
|
var node2 = this.startNode();
|
|
5840
5838
|
node2.local = this.parseModuleExportName();
|
|
5841
5839
|
node2.exported = this.eatContextual("as") ? this.parseModuleExportName() : node2.local;
|
|
5842
5840
|
this.checkExport(
|
|
5843
|
-
|
|
5841
|
+
exports2,
|
|
5844
5842
|
node2.exported,
|
|
5845
5843
|
node2.exported.start
|
|
5846
5844
|
);
|
|
5847
5845
|
return this.finishNode(node2, "ExportSpecifier");
|
|
5848
5846
|
};
|
|
5849
|
-
pp$8.parseExportSpecifiers = function(
|
|
5847
|
+
pp$8.parseExportSpecifiers = function(exports2) {
|
|
5850
5848
|
var nodes = [], first = true;
|
|
5851
5849
|
this.expect(types$1.braceL);
|
|
5852
5850
|
while (!this.eat(types$1.braceR)) {
|
|
@@ -5858,7 +5856,7 @@ pp$8.parseExportSpecifiers = function(exports) {
|
|
|
5858
5856
|
} else {
|
|
5859
5857
|
first = false;
|
|
5860
5858
|
}
|
|
5861
|
-
nodes.push(this.parseExportSpecifier(
|
|
5859
|
+
nodes.push(this.parseExportSpecifier(exports2));
|
|
5862
5860
|
}
|
|
5863
5861
|
return nodes;
|
|
5864
5862
|
};
|
|
@@ -6297,6 +6295,12 @@ types$1._function.updateContext = types$1._class.updateContext = function(prevTy
|
|
|
6297
6295
|
}
|
|
6298
6296
|
this.exprAllowed = false;
|
|
6299
6297
|
};
|
|
6298
|
+
types$1.colon.updateContext = function() {
|
|
6299
|
+
if (this.curContext().token === "function") {
|
|
6300
|
+
this.context.pop();
|
|
6301
|
+
}
|
|
6302
|
+
this.exprAllowed = true;
|
|
6303
|
+
};
|
|
6300
6304
|
types$1.backQuote.updateContext = function() {
|
|
6301
6305
|
if (this.curContext() === types.q_tmpl) {
|
|
6302
6306
|
this.context.pop();
|
|
@@ -6786,11 +6790,13 @@ pp$5.parseExprImport = function(forNew) {
|
|
|
6786
6790
|
if (this.containsEsc) {
|
|
6787
6791
|
this.raiseRecoverable(this.start, "Escape sequence in keyword import");
|
|
6788
6792
|
}
|
|
6789
|
-
|
|
6793
|
+
this.next();
|
|
6790
6794
|
if (this.type === types$1.parenL && !forNew) {
|
|
6791
6795
|
return this.parseDynamicImport(node2);
|
|
6792
6796
|
} else if (this.type === types$1.dot) {
|
|
6793
|
-
|
|
6797
|
+
var meta = this.startNodeAt(node2.start, node2.loc && node2.loc.start);
|
|
6798
|
+
meta.name = "import";
|
|
6799
|
+
node2.meta = this.finishNode(meta, "Identifier");
|
|
6794
6800
|
return this.parseImportMeta(node2);
|
|
6795
6801
|
} else {
|
|
6796
6802
|
this.unexpected();
|
|
@@ -6919,9 +6925,12 @@ pp$5.parseNew = function() {
|
|
|
6919
6925
|
this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
6920
6926
|
}
|
|
6921
6927
|
var node2 = this.startNode();
|
|
6922
|
-
|
|
6923
|
-
if (this.options.ecmaVersion >= 6 && this.
|
|
6924
|
-
|
|
6928
|
+
this.next();
|
|
6929
|
+
if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) {
|
|
6930
|
+
var meta = this.startNodeAt(node2.start, node2.loc && node2.loc.start);
|
|
6931
|
+
meta.name = "new";
|
|
6932
|
+
node2.meta = this.finishNode(meta, "Identifier");
|
|
6933
|
+
this.next();
|
|
6925
6934
|
var containsEsc = this.containsEsc;
|
|
6926
6935
|
node2.property = this.parseIdent(true);
|
|
6927
6936
|
if (node2.property.name !== "target") {
|
|
@@ -7297,6 +7306,7 @@ pp$5.parseIdentNode = function() {
|
|
|
7297
7306
|
if ((node2.name === "class" || node2.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
|
|
7298
7307
|
this.context.pop();
|
|
7299
7308
|
}
|
|
7309
|
+
this.type = types$1.name;
|
|
7300
7310
|
} else {
|
|
7301
7311
|
this.unexpected();
|
|
7302
7312
|
}
|
|
@@ -9569,7 +9579,7 @@ pp.readWord = function() {
|
|
|
9569
9579
|
}
|
|
9570
9580
|
return this.finishToken(type, word);
|
|
9571
9581
|
};
|
|
9572
|
-
var version = "8.
|
|
9582
|
+
var version = "8.11.3";
|
|
9573
9583
|
Parser.acorn = {
|
|
9574
9584
|
Parser,
|
|
9575
9585
|
version,
|
|
@@ -9592,34 +9602,44 @@ Parser.acorn = {
|
|
|
9592
9602
|
nonASCIIwhitespace
|
|
9593
9603
|
};
|
|
9594
9604
|
|
|
9595
|
-
// node_modules/.pnpm/mlly@1.
|
|
9605
|
+
// node_modules/.pnpm/mlly@1.5.0/node_modules/mlly/dist/index.mjs
|
|
9596
9606
|
var import_node_module = require("module");
|
|
9597
9607
|
var import_node_fs = __toESM(require("fs"), 1);
|
|
9598
9608
|
var import_node_url = require("url");
|
|
9599
9609
|
|
|
9600
|
-
// node_modules/.pnpm/ufo@1.
|
|
9610
|
+
// node_modules/.pnpm/ufo@1.4.0/node_modules/ufo/dist/index.mjs
|
|
9601
9611
|
var r = String.fromCharCode;
|
|
9602
|
-
var TRAILING_SLASH_RE =
|
|
9603
|
-
|
|
9604
|
-
|
|
9612
|
+
var TRAILING_SLASH_RE = /\/$|\/\?|\/#/;
|
|
9613
|
+
var JOIN_LEADING_SLASH_RE = /^\.?\//;
|
|
9614
|
+
function hasTrailingSlash(input = "", respectQueryAndFragment) {
|
|
9615
|
+
if (!respectQueryAndFragment) {
|
|
9605
9616
|
return input.endsWith("/");
|
|
9606
9617
|
}
|
|
9607
9618
|
return TRAILING_SLASH_RE.test(input);
|
|
9608
9619
|
}
|
|
9609
|
-
function withTrailingSlash(input = "",
|
|
9610
|
-
if (!
|
|
9620
|
+
function withTrailingSlash(input = "", respectQueryAndFragment) {
|
|
9621
|
+
if (!respectQueryAndFragment) {
|
|
9611
9622
|
return input.endsWith("/") ? input : input + "/";
|
|
9612
9623
|
}
|
|
9613
9624
|
if (hasTrailingSlash(input, true)) {
|
|
9614
9625
|
return input || "/";
|
|
9615
9626
|
}
|
|
9616
|
-
|
|
9617
|
-
|
|
9627
|
+
let path4 = input;
|
|
9628
|
+
let fragment = "";
|
|
9629
|
+
const fragmentIndex = input.indexOf("#");
|
|
9630
|
+
if (fragmentIndex >= 0) {
|
|
9631
|
+
path4 = input.slice(0, fragmentIndex);
|
|
9632
|
+
fragment = input.slice(fragmentIndex);
|
|
9633
|
+
if (!path4) {
|
|
9634
|
+
return fragment;
|
|
9635
|
+
}
|
|
9636
|
+
}
|
|
9637
|
+
const [s0, ...s] = path4.split("?");
|
|
9638
|
+
return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
|
|
9618
9639
|
}
|
|
9619
9640
|
function isNonEmptyURL(url) {
|
|
9620
9641
|
return url && url !== "/";
|
|
9621
9642
|
}
|
|
9622
|
-
var JOIN_LEADING_SLASH_RE = /^\.?\//;
|
|
9623
9643
|
function joinURL(base, ...input) {
|
|
9624
9644
|
let url = base || "";
|
|
9625
9645
|
for (const segment of input.filter((url2) => isNonEmptyURL(url2))) {
|
|
@@ -9632,14 +9652,15 @@ function joinURL(base, ...input) {
|
|
|
9632
9652
|
}
|
|
9633
9653
|
return url;
|
|
9634
9654
|
}
|
|
9655
|
+
var protocolRelative = Symbol.for("ufo:protocolRelative");
|
|
9635
9656
|
|
|
9636
|
-
// node_modules/.pnpm/pathe@1.1.
|
|
9657
|
+
// node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
9637
9658
|
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
9638
9659
|
var isAbsolute = function(p) {
|
|
9639
9660
|
return _IS_ABSOLUTE_RE.test(p);
|
|
9640
9661
|
};
|
|
9641
9662
|
|
|
9642
|
-
// node_modules/.pnpm/mlly@1.
|
|
9663
|
+
// node_modules/.pnpm/mlly@1.5.0/node_modules/mlly/dist/index.mjs
|
|
9643
9664
|
var import_node_assert = __toESM(require("assert"), 1);
|
|
9644
9665
|
var import_node_process3 = __toESM(require("process"), 1);
|
|
9645
9666
|
var import_node_path = __toESM(require("path"), 1);
|
|
@@ -9649,7 +9670,6 @@ var BUILTIN_MODULES = new Set(import_node_module.builtinModules);
|
|
|
9649
9670
|
function normalizeSlash(string_) {
|
|
9650
9671
|
return string_.replace(/\\/g, "/");
|
|
9651
9672
|
}
|
|
9652
|
-
var isWindows = import_node_process3.default.platform === "win32";
|
|
9653
9673
|
var own$1 = {}.hasOwnProperty;
|
|
9654
9674
|
var classRegExp = /^([A-Z][a-z\d]*)+$/;
|
|
9655
9675
|
var kTypes = /* @__PURE__ */ new Set([
|
|
@@ -9795,10 +9815,10 @@ codes.ERR_MODULE_NOT_FOUND = createError(
|
|
|
9795
9815
|
/**
|
|
9796
9816
|
* @param {string} path
|
|
9797
9817
|
* @param {string} base
|
|
9798
|
-
* @param {
|
|
9818
|
+
* @param {boolean} [exactUrl]
|
|
9799
9819
|
*/
|
|
9800
|
-
(path4, base,
|
|
9801
|
-
return `Cannot find ${
|
|
9820
|
+
(path4, base, exactUrl = false) => {
|
|
9821
|
+
return `Cannot find ${exactUrl ? "module" : "package"} '${path4}' imported from ${base}`;
|
|
9802
9822
|
},
|
|
9803
9823
|
Error
|
|
9804
9824
|
);
|
|
@@ -9868,24 +9888,6 @@ codes.ERR_INVALID_ARG_VALUE = createError(
|
|
|
9868
9888
|
// Note: extra classes have been shaken out.
|
|
9869
9889
|
// , RangeError
|
|
9870
9890
|
);
|
|
9871
|
-
codes.ERR_UNSUPPORTED_ESM_URL_SCHEME = createError(
|
|
9872
|
-
"ERR_UNSUPPORTED_ESM_URL_SCHEME",
|
|
9873
|
-
/**
|
|
9874
|
-
* @param {URL} url
|
|
9875
|
-
* @param {Array<string>} supported
|
|
9876
|
-
*/
|
|
9877
|
-
(url, supported) => {
|
|
9878
|
-
let message = `Only URLs with a scheme in: ${formatList(
|
|
9879
|
-
supported
|
|
9880
|
-
)} are supported by the default ESM loader`;
|
|
9881
|
-
if (isWindows && url.protocol.length === 2) {
|
|
9882
|
-
message += ". On Windows, absolute paths must be valid file:// URLs";
|
|
9883
|
-
}
|
|
9884
|
-
message += `. Received protocol '${url.protocol}'`;
|
|
9885
|
-
return message;
|
|
9886
|
-
},
|
|
9887
|
-
Error
|
|
9888
|
-
);
|
|
9889
9891
|
function createError(sym, value, def) {
|
|
9890
9892
|
messages.set(sym, value);
|
|
9891
9893
|
return makeNodeErrorWithCode(def, sym);
|
|
@@ -10003,96 +10005,98 @@ function determineSpecificType(value) {
|
|
|
10003
10005
|
}
|
|
10004
10006
|
return `type ${typeof value} (${inspected})`;
|
|
10005
10007
|
}
|
|
10008
|
+
var hasOwnProperty$1 = {}.hasOwnProperty;
|
|
10009
|
+
var { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes;
|
|
10010
|
+
var cache = /* @__PURE__ */ new Map();
|
|
10006
10011
|
var reader = { read };
|
|
10007
10012
|
var packageJsonReader = reader;
|
|
10008
|
-
function read(jsonPath) {
|
|
10009
|
-
|
|
10010
|
-
|
|
10011
|
-
import_node_path.default.toNamespacedPath(import_node_path.default.join(import_node_path.default.dirname(jsonPath), "package.json")),
|
|
10012
|
-
"utf8"
|
|
10013
|
-
);
|
|
10014
|
-
return { string };
|
|
10015
|
-
} catch (error) {
|
|
10016
|
-
const exception = (
|
|
10017
|
-
/** @type {ErrnoException} */
|
|
10018
|
-
error
|
|
10019
|
-
);
|
|
10020
|
-
if (exception.code === "ENOENT") {
|
|
10021
|
-
return { string: void 0 };
|
|
10022
|
-
}
|
|
10023
|
-
throw exception;
|
|
10024
|
-
}
|
|
10025
|
-
}
|
|
10026
|
-
var { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes;
|
|
10027
|
-
var packageJsonCache = /* @__PURE__ */ new Map();
|
|
10028
|
-
function getPackageConfig(path4, specifier, base) {
|
|
10029
|
-
const existing = packageJsonCache.get(path4);
|
|
10030
|
-
if (existing !== void 0) {
|
|
10013
|
+
function read(jsonPath, { base, specifier }) {
|
|
10014
|
+
const existing = cache.get(jsonPath);
|
|
10015
|
+
if (existing) {
|
|
10031
10016
|
return existing;
|
|
10032
10017
|
}
|
|
10033
|
-
|
|
10034
|
-
if (source === void 0) {
|
|
10035
|
-
const packageConfig2 = {
|
|
10036
|
-
pjsonPath: path4,
|
|
10037
|
-
exists: false,
|
|
10038
|
-
main: void 0,
|
|
10039
|
-
name: void 0,
|
|
10040
|
-
type: "none",
|
|
10041
|
-
exports: void 0,
|
|
10042
|
-
imports: void 0
|
|
10043
|
-
};
|
|
10044
|
-
packageJsonCache.set(path4, packageConfig2);
|
|
10045
|
-
return packageConfig2;
|
|
10046
|
-
}
|
|
10047
|
-
let packageJson;
|
|
10018
|
+
let string;
|
|
10048
10019
|
try {
|
|
10049
|
-
|
|
10020
|
+
string = import_node_fs.default.readFileSync(import_node_path.default.toNamespacedPath(jsonPath), "utf8");
|
|
10050
10021
|
} catch (error) {
|
|
10051
10022
|
const exception = (
|
|
10052
10023
|
/** @type {ErrnoException} */
|
|
10053
10024
|
error
|
|
10054
10025
|
);
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
exception.message
|
|
10059
|
-
);
|
|
10026
|
+
if (exception.code !== "ENOENT") {
|
|
10027
|
+
throw exception;
|
|
10028
|
+
}
|
|
10060
10029
|
}
|
|
10061
|
-
const
|
|
10062
|
-
|
|
10063
|
-
pjsonPath:
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
|
|
10069
|
-
|
|
10070
|
-
// @ts-expect-error Assume `Record<string, unknown>`.
|
|
10071
|
-
imports: imports2 && typeof imports2 === "object" ? imports2 : void 0
|
|
10030
|
+
const result = {
|
|
10031
|
+
exists: false,
|
|
10032
|
+
pjsonPath: jsonPath,
|
|
10033
|
+
main: void 0,
|
|
10034
|
+
name: void 0,
|
|
10035
|
+
type: "none",
|
|
10036
|
+
// Ignore unknown types for forwards compatibility
|
|
10037
|
+
exports: void 0,
|
|
10038
|
+
imports: void 0
|
|
10072
10039
|
};
|
|
10073
|
-
|
|
10074
|
-
|
|
10040
|
+
if (string !== void 0) {
|
|
10041
|
+
let parsed;
|
|
10042
|
+
try {
|
|
10043
|
+
parsed = JSON.parse(string);
|
|
10044
|
+
} catch (error_) {
|
|
10045
|
+
const cause = (
|
|
10046
|
+
/** @type {ErrnoException} */
|
|
10047
|
+
error_
|
|
10048
|
+
);
|
|
10049
|
+
const error = new ERR_INVALID_PACKAGE_CONFIG$1(
|
|
10050
|
+
jsonPath,
|
|
10051
|
+
(base ? `"${specifier}" from ` : "") + (0, import_node_url.fileURLToPath)(base || specifier),
|
|
10052
|
+
cause.message
|
|
10053
|
+
);
|
|
10054
|
+
error.cause = cause;
|
|
10055
|
+
throw error;
|
|
10056
|
+
}
|
|
10057
|
+
result.exists = true;
|
|
10058
|
+
if (hasOwnProperty$1.call(parsed, "name") && typeof parsed.name === "string") {
|
|
10059
|
+
result.name = parsed.name;
|
|
10060
|
+
}
|
|
10061
|
+
if (hasOwnProperty$1.call(parsed, "main") && typeof parsed.main === "string") {
|
|
10062
|
+
result.main = parsed.main;
|
|
10063
|
+
}
|
|
10064
|
+
if (hasOwnProperty$1.call(parsed, "exports")) {
|
|
10065
|
+
result.exports = parsed.exports;
|
|
10066
|
+
}
|
|
10067
|
+
if (hasOwnProperty$1.call(parsed, "imports")) {
|
|
10068
|
+
result.imports = parsed.imports;
|
|
10069
|
+
}
|
|
10070
|
+
if (hasOwnProperty$1.call(parsed, "type") && (parsed.type === "commonjs" || parsed.type === "module")) {
|
|
10071
|
+
result.type = parsed.type;
|
|
10072
|
+
}
|
|
10073
|
+
}
|
|
10074
|
+
cache.set(jsonPath, result);
|
|
10075
|
+
return result;
|
|
10075
10076
|
}
|
|
10076
10077
|
function getPackageScopeConfig(resolved) {
|
|
10077
|
-
let
|
|
10078
|
+
let packageJSONUrl = new import_node_url.URL("package.json", resolved);
|
|
10078
10079
|
while (true) {
|
|
10079
|
-
const
|
|
10080
|
-
if (
|
|
10080
|
+
const packageJSONPath2 = packageJSONUrl.pathname;
|
|
10081
|
+
if (packageJSONPath2.endsWith("node_modules/package.json")) {
|
|
10081
10082
|
break;
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10083
|
+
}
|
|
10084
|
+
const packageConfig = packageJsonReader.read(
|
|
10085
|
+
(0, import_node_url.fileURLToPath)(packageJSONUrl),
|
|
10086
|
+
{ specifier: resolved }
|
|
10085
10087
|
);
|
|
10086
|
-
if (
|
|
10087
|
-
return
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10088
|
+
if (packageConfig.exists) {
|
|
10089
|
+
return packageConfig;
|
|
10090
|
+
}
|
|
10091
|
+
const lastPackageJSONUrl = packageJSONUrl;
|
|
10092
|
+
packageJSONUrl = new import_node_url.URL("../package.json", packageJSONUrl);
|
|
10093
|
+
if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) {
|
|
10091
10094
|
break;
|
|
10095
|
+
}
|
|
10092
10096
|
}
|
|
10093
|
-
const
|
|
10094
|
-
|
|
10095
|
-
pjsonPath:
|
|
10097
|
+
const packageJSONPath = (0, import_node_url.fileURLToPath)(packageJSONUrl);
|
|
10098
|
+
return {
|
|
10099
|
+
pjsonPath: packageJSONPath,
|
|
10096
10100
|
exists: false,
|
|
10097
10101
|
main: void 0,
|
|
10098
10102
|
name: void 0,
|
|
@@ -10100,8 +10104,6 @@ function getPackageScopeConfig(resolved) {
|
|
|
10100
10104
|
exports: void 0,
|
|
10101
10105
|
imports: void 0
|
|
10102
10106
|
};
|
|
10103
|
-
packageJsonCache.set(packageJsonPath, packageConfig);
|
|
10104
|
-
return packageConfig;
|
|
10105
10107
|
}
|
|
10106
10108
|
function getPackageType(url) {
|
|
10107
10109
|
const packageConfig = getPackageScopeConfig(url);
|
|
@@ -10158,7 +10160,18 @@ function extname2(url) {
|
|
|
10158
10160
|
function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
|
|
10159
10161
|
const ext = extname2(url);
|
|
10160
10162
|
if (ext === ".js") {
|
|
10161
|
-
|
|
10163
|
+
const packageType = getPackageType(url);
|
|
10164
|
+
if (packageType !== "none") {
|
|
10165
|
+
return packageType;
|
|
10166
|
+
}
|
|
10167
|
+
return "commonjs";
|
|
10168
|
+
}
|
|
10169
|
+
if (ext === "") {
|
|
10170
|
+
const packageType = getPackageType(url);
|
|
10171
|
+
if (packageType === "none" || packageType === "commonjs") {
|
|
10172
|
+
return "commonjs";
|
|
10173
|
+
}
|
|
10174
|
+
return "module";
|
|
10162
10175
|
}
|
|
10163
10176
|
const format3 = extensionFormatMap[ext];
|
|
10164
10177
|
if (format3)
|
|
@@ -10172,10 +10185,11 @@ function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
|
|
|
10172
10185
|
function getHttpProtocolModuleFormat() {
|
|
10173
10186
|
}
|
|
10174
10187
|
function defaultGetFormatWithoutErrors(url, context) {
|
|
10175
|
-
|
|
10188
|
+
const protocol = url.protocol;
|
|
10189
|
+
if (!hasOwnProperty2.call(protocolHandlers, protocol)) {
|
|
10176
10190
|
return null;
|
|
10177
10191
|
}
|
|
10178
|
-
return protocolHandlers[
|
|
10192
|
+
return protocolHandlers[protocol](url, context, true) || null;
|
|
10179
10193
|
}
|
|
10180
10194
|
var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];
|
|
10181
10195
|
var {
|
|
@@ -10186,8 +10200,7 @@ var {
|
|
|
10186
10200
|
ERR_MODULE_NOT_FOUND,
|
|
10187
10201
|
ERR_PACKAGE_IMPORT_NOT_DEFINED,
|
|
10188
10202
|
ERR_PACKAGE_PATH_NOT_EXPORTED,
|
|
10189
|
-
ERR_UNSUPPORTED_DIR_IMPORT
|
|
10190
|
-
ERR_UNSUPPORTED_ESM_URL_SCHEME
|
|
10203
|
+
ERR_UNSUPPORTED_DIR_IMPORT
|
|
10191
10204
|
} = codes;
|
|
10192
10205
|
var own = {}.hasOwnProperty;
|
|
10193
10206
|
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;
|
|
@@ -10198,6 +10211,9 @@ var encodedSepRegEx = /%2f|%5c/i;
|
|
|
10198
10211
|
var emittedPackageWarnings = /* @__PURE__ */ new Set();
|
|
10199
10212
|
var doubleSlashRegEx = /[/\\]{2}/;
|
|
10200
10213
|
function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) {
|
|
10214
|
+
if (import_node_process3.default.noDeprecation) {
|
|
10215
|
+
return;
|
|
10216
|
+
}
|
|
10201
10217
|
const pjsonPath = (0, import_node_url.fileURLToPath)(packageJsonUrl);
|
|
10202
10218
|
const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;
|
|
10203
10219
|
import_node_process3.default.emitWarning(
|
|
@@ -10207,30 +10223,34 @@ function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, i
|
|
|
10207
10223
|
);
|
|
10208
10224
|
}
|
|
10209
10225
|
function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
|
|
10226
|
+
if (import_node_process3.default.noDeprecation) {
|
|
10227
|
+
return;
|
|
10228
|
+
}
|
|
10210
10229
|
const format3 = defaultGetFormatWithoutErrors(url, { parentURL: base.href });
|
|
10211
10230
|
if (format3 !== "module")
|
|
10212
10231
|
return;
|
|
10213
|
-
const
|
|
10232
|
+
const urlPath = (0, import_node_url.fileURLToPath)(url.href);
|
|
10214
10233
|
const pkgPath = (0, import_node_url.fileURLToPath)(new import_node_url.URL(".", packageJsonUrl));
|
|
10215
10234
|
const basePath = (0, import_node_url.fileURLToPath)(base);
|
|
10216
|
-
if (main)
|
|
10235
|
+
if (!main) {
|
|
10217
10236
|
import_node_process3.default.emitWarning(
|
|
10218
|
-
`
|
|
10237
|
+
`No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${urlPath.slice(
|
|
10219
10238
|
pkgPath.length
|
|
10220
10239
|
)}", imported from ${basePath}.
|
|
10221
|
-
|
|
10240
|
+
Default "index" lookups for the main are deprecated for ES modules.`,
|
|
10222
10241
|
"DeprecationWarning",
|
|
10223
10242
|
"DEP0151"
|
|
10224
10243
|
);
|
|
10225
|
-
else
|
|
10244
|
+
} else if (import_node_path.default.resolve(pkgPath, main) !== urlPath) {
|
|
10226
10245
|
import_node_process3.default.emitWarning(
|
|
10227
|
-
`
|
|
10246
|
+
`Package ${pkgPath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(
|
|
10228
10247
|
pkgPath.length
|
|
10229
10248
|
)}", imported from ${basePath}.
|
|
10230
|
-
|
|
10249
|
+
Automatic extension resolution of the "main" field is deprecated for ES modules.`,
|
|
10231
10250
|
"DeprecationWarning",
|
|
10232
10251
|
"DEP0151"
|
|
10233
10252
|
);
|
|
10253
|
+
}
|
|
10234
10254
|
}
|
|
10235
10255
|
function tryStatSync(path4) {
|
|
10236
10256
|
try {
|
|
@@ -10293,13 +10313,25 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
|
10293
10313
|
);
|
|
10294
10314
|
}
|
|
10295
10315
|
function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
10296
|
-
if (encodedSepRegEx.exec(resolved.pathname) !== null)
|
|
10316
|
+
if (encodedSepRegEx.exec(resolved.pathname) !== null) {
|
|
10297
10317
|
throw new ERR_INVALID_MODULE_SPECIFIER(
|
|
10298
10318
|
resolved.pathname,
|
|
10299
10319
|
'must not include encoded "/" or "\\" characters',
|
|
10300
10320
|
(0, import_node_url.fileURLToPath)(base)
|
|
10301
10321
|
);
|
|
10302
|
-
|
|
10322
|
+
}
|
|
10323
|
+
let filePath;
|
|
10324
|
+
try {
|
|
10325
|
+
filePath = (0, import_node_url.fileURLToPath)(resolved);
|
|
10326
|
+
} catch (error) {
|
|
10327
|
+
const cause = (
|
|
10328
|
+
/** @type {ErrnoException} */
|
|
10329
|
+
error
|
|
10330
|
+
);
|
|
10331
|
+
Object.defineProperty(cause, "input", { value: String(resolved) });
|
|
10332
|
+
Object.defineProperty(cause, "module", { value: String(base) });
|
|
10333
|
+
throw cause;
|
|
10334
|
+
}
|
|
10303
10335
|
const stats = tryStatSync(
|
|
10304
10336
|
filePath.endsWith("/") ? filePath.slice(-1) : filePath
|
|
10305
10337
|
);
|
|
@@ -10309,11 +10341,13 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
|
10309
10341
|
throw error;
|
|
10310
10342
|
}
|
|
10311
10343
|
if (!stats.isFile()) {
|
|
10312
|
-
|
|
10344
|
+
const error = new ERR_MODULE_NOT_FOUND(
|
|
10313
10345
|
filePath || resolved.pathname,
|
|
10314
10346
|
base && (0, import_node_url.fileURLToPath)(base),
|
|
10315
|
-
|
|
10347
|
+
true
|
|
10316
10348
|
);
|
|
10349
|
+
error.url = String(resolved);
|
|
10350
|
+
throw error;
|
|
10317
10351
|
}
|
|
10318
10352
|
if (!preserveSymlinks) {
|
|
10319
10353
|
const real = (0, import_node_fs.realpathSync)(filePath);
|
|
@@ -10556,12 +10590,12 @@ function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, b
|
|
|
10556
10590
|
base
|
|
10557
10591
|
);
|
|
10558
10592
|
}
|
|
10559
|
-
function isConditionalExportsMainSugar(
|
|
10560
|
-
if (typeof
|
|
10593
|
+
function isConditionalExportsMainSugar(exports2, packageJsonUrl, base) {
|
|
10594
|
+
if (typeof exports2 === "string" || Array.isArray(exports2))
|
|
10561
10595
|
return true;
|
|
10562
|
-
if (typeof
|
|
10596
|
+
if (typeof exports2 !== "object" || exports2 === null)
|
|
10563
10597
|
return false;
|
|
10564
|
-
const keys = Object.getOwnPropertyNames(
|
|
10598
|
+
const keys = Object.getOwnPropertyNames(exports2);
|
|
10565
10599
|
let isConditionalSugar = false;
|
|
10566
10600
|
let i = 0;
|
|
10567
10601
|
let j = -1;
|
|
@@ -10581,6 +10615,9 @@ function isConditionalExportsMainSugar(exports, packageJsonUrl, base) {
|
|
|
10581
10615
|
return isConditionalSugar;
|
|
10582
10616
|
}
|
|
10583
10617
|
function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
|
|
10618
|
+
if (import_node_process3.default.noDeprecation) {
|
|
10619
|
+
return;
|
|
10620
|
+
}
|
|
10584
10621
|
const pjsonPath = (0, import_node_url.fileURLToPath)(pjsonUrl);
|
|
10585
10622
|
if (emittedPackageWarnings.has(pjsonPath + "|" + match))
|
|
10586
10623
|
return;
|
|
@@ -10592,12 +10629,12 @@ function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
|
|
|
10592
10629
|
);
|
|
10593
10630
|
}
|
|
10594
10631
|
function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) {
|
|
10595
|
-
let
|
|
10596
|
-
if (isConditionalExportsMainSugar(
|
|
10597
|
-
|
|
10632
|
+
let exports2 = packageConfig.exports;
|
|
10633
|
+
if (isConditionalExportsMainSugar(exports2, packageJsonUrl, base)) {
|
|
10634
|
+
exports2 = { ".": exports2 };
|
|
10598
10635
|
}
|
|
10599
|
-
if (own.call(
|
|
10600
|
-
const target =
|
|
10636
|
+
if (own.call(exports2, packageSubpath) && !packageSubpath.includes("*") && !packageSubpath.endsWith("/")) {
|
|
10637
|
+
const target = exports2[packageSubpath];
|
|
10601
10638
|
const resolveResult = resolvePackageTarget(
|
|
10602
10639
|
packageJsonUrl,
|
|
10603
10640
|
target,
|
|
@@ -10616,7 +10653,7 @@ function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, ba
|
|
|
10616
10653
|
}
|
|
10617
10654
|
let bestMatch = "";
|
|
10618
10655
|
let bestMatchSubpath = "";
|
|
10619
|
-
const keys = Object.getOwnPropertyNames(
|
|
10656
|
+
const keys = Object.getOwnPropertyNames(exports2);
|
|
10620
10657
|
let i = -1;
|
|
10621
10658
|
while (++i < keys.length) {
|
|
10622
10659
|
const key = keys[i];
|
|
@@ -10642,7 +10679,7 @@ function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, ba
|
|
|
10642
10679
|
if (bestMatch) {
|
|
10643
10680
|
const target = (
|
|
10644
10681
|
/** @type {unknown} */
|
|
10645
|
-
|
|
10682
|
+
exports2[bestMatch]
|
|
10646
10683
|
);
|
|
10647
10684
|
const resolveResult = resolvePackageTarget(
|
|
10648
10685
|
packageJsonUrl,
|
|
@@ -10812,7 +10849,10 @@ function packageResolve(specifier, base, conditions) {
|
|
|
10812
10849
|
packageJsonPath = (0, import_node_url.fileURLToPath)(packageJsonUrl);
|
|
10813
10850
|
continue;
|
|
10814
10851
|
}
|
|
10815
|
-
const packageConfig2 =
|
|
10852
|
+
const packageConfig2 = packageJsonReader.read(packageJsonPath, {
|
|
10853
|
+
base,
|
|
10854
|
+
specifier
|
|
10855
|
+
});
|
|
10816
10856
|
if (packageConfig2.exports !== void 0 && packageConfig2.exports !== null) {
|
|
10817
10857
|
return packageExportsResolve(
|
|
10818
10858
|
packageJsonUrl,
|
|
@@ -10827,7 +10867,7 @@ function packageResolve(specifier, base, conditions) {
|
|
|
10827
10867
|
}
|
|
10828
10868
|
return new import_node_url.URL(packageSubpath, packageJsonUrl);
|
|
10829
10869
|
} while (packageJsonPath.length !== lastPath.length);
|
|
10830
|
-
throw new ERR_MODULE_NOT_FOUND(packageName, (0, import_node_url.fileURLToPath)(base));
|
|
10870
|
+
throw new ERR_MODULE_NOT_FOUND(packageName, (0, import_node_url.fileURLToPath)(base), false);
|
|
10831
10871
|
}
|
|
10832
10872
|
function isRelativeSpecifier(specifier) {
|
|
10833
10873
|
if (specifier[0] === ".") {
|
|
@@ -10977,60 +11017,6 @@ function resolvePathSync(id, options) {
|
|
|
10977
11017
|
|
|
10978
11018
|
// node_modules/.pnpm/local-pkg@0.5.0/node_modules/local-pkg/dist/index.mjs
|
|
10979
11019
|
var import_node_url2 = require("url");
|
|
10980
|
-
var Node3 = class {
|
|
10981
|
-
constructor(value) {
|
|
10982
|
-
__publicField(this, "value");
|
|
10983
|
-
__publicField(this, "next");
|
|
10984
|
-
this.value = value;
|
|
10985
|
-
}
|
|
10986
|
-
};
|
|
10987
|
-
var _head, _tail, _size;
|
|
10988
|
-
var Queue = class {
|
|
10989
|
-
constructor() {
|
|
10990
|
-
__privateAdd(this, _head, void 0);
|
|
10991
|
-
__privateAdd(this, _tail, void 0);
|
|
10992
|
-
__privateAdd(this, _size, void 0);
|
|
10993
|
-
this.clear();
|
|
10994
|
-
}
|
|
10995
|
-
enqueue(value) {
|
|
10996
|
-
const node2 = new Node3(value);
|
|
10997
|
-
if (__privateGet(this, _head)) {
|
|
10998
|
-
__privateGet(this, _tail).next = node2;
|
|
10999
|
-
__privateSet(this, _tail, node2);
|
|
11000
|
-
} else {
|
|
11001
|
-
__privateSet(this, _head, node2);
|
|
11002
|
-
__privateSet(this, _tail, node2);
|
|
11003
|
-
}
|
|
11004
|
-
__privateWrapper(this, _size)._++;
|
|
11005
|
-
}
|
|
11006
|
-
dequeue() {
|
|
11007
|
-
const current2 = __privateGet(this, _head);
|
|
11008
|
-
if (!current2) {
|
|
11009
|
-
return;
|
|
11010
|
-
}
|
|
11011
|
-
__privateSet(this, _head, __privateGet(this, _head).next);
|
|
11012
|
-
__privateWrapper(this, _size)._--;
|
|
11013
|
-
return current2.value;
|
|
11014
|
-
}
|
|
11015
|
-
clear() {
|
|
11016
|
-
__privateSet(this, _head, void 0);
|
|
11017
|
-
__privateSet(this, _tail, void 0);
|
|
11018
|
-
__privateSet(this, _size, 0);
|
|
11019
|
-
}
|
|
11020
|
-
get size() {
|
|
11021
|
-
return __privateGet(this, _size);
|
|
11022
|
-
}
|
|
11023
|
-
*[Symbol.iterator]() {
|
|
11024
|
-
let current2 = __privateGet(this, _head);
|
|
11025
|
-
while (current2) {
|
|
11026
|
-
yield current2.value;
|
|
11027
|
-
current2 = current2.next;
|
|
11028
|
-
}
|
|
11029
|
-
}
|
|
11030
|
-
};
|
|
11031
|
-
_head = new WeakMap();
|
|
11032
|
-
_tail = new WeakMap();
|
|
11033
|
-
_size = new WeakMap();
|
|
11034
11020
|
var findUpStop = Symbol("findUpStop");
|
|
11035
11021
|
function _resolve2(path4, options = {}) {
|
|
11036
11022
|
if (options.platform === "auto" || !options.platform)
|
|
@@ -11125,6 +11111,119 @@ var slowRules = [
|
|
|
11125
11111
|
"@typescript-eslint/no-unsafe-return"
|
|
11126
11112
|
];
|
|
11127
11113
|
|
|
11114
|
+
// src/configs/md.ts
|
|
11115
|
+
function markdown(options = {}) {
|
|
11116
|
+
const { componentExts = [], overrides = {} } = options;
|
|
11117
|
+
const tsRulesOff = Object.fromEntries(
|
|
11118
|
+
// @ts-expect-error - undefined
|
|
11119
|
+
Object.keys(typescriptRulesTypeAware()).map((key) => [
|
|
11120
|
+
`@typescript-eslint/${key}`,
|
|
11121
|
+
"off"
|
|
11122
|
+
])
|
|
11123
|
+
);
|
|
11124
|
+
return [
|
|
11125
|
+
{
|
|
11126
|
+
name: "jsse:markdown:setup",
|
|
11127
|
+
plugins: {
|
|
11128
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
11129
|
+
markdown: import_eslint_plugin_markdown.default
|
|
11130
|
+
}
|
|
11131
|
+
},
|
|
11132
|
+
{
|
|
11133
|
+
files: [GLOB_MARKDOWN],
|
|
11134
|
+
name: "jsse:markdown:processor",
|
|
11135
|
+
processor: "markdown/markdown"
|
|
11136
|
+
},
|
|
11137
|
+
{
|
|
11138
|
+
files: [
|
|
11139
|
+
GLOB_MARKDOWN_CODE,
|
|
11140
|
+
...componentExts.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)
|
|
11141
|
+
],
|
|
11142
|
+
languageOptions: {
|
|
11143
|
+
parserOptions: {
|
|
11144
|
+
ecmaFeatures: {
|
|
11145
|
+
impliedStrict: true
|
|
11146
|
+
}
|
|
11147
|
+
}
|
|
11148
|
+
},
|
|
11149
|
+
name: "jsse:markdown:rules",
|
|
11150
|
+
rules: {
|
|
11151
|
+
"@typescript-eslint/consistent-type-imports": "off",
|
|
11152
|
+
"@typescript-eslint/no-namespace": "off",
|
|
11153
|
+
"@typescript-eslint/no-redeclare": "off",
|
|
11154
|
+
"@typescript-eslint/no-require-imports": "off",
|
|
11155
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
11156
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
11157
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
11158
|
+
"no-alert": "off",
|
|
11159
|
+
"no-console": "off",
|
|
11160
|
+
"no-undef": "off",
|
|
11161
|
+
"no-unused-expressions": "off",
|
|
11162
|
+
"no-unused-vars": "off",
|
|
11163
|
+
"node/prefer-global/process": "off",
|
|
11164
|
+
// Type aware rules
|
|
11165
|
+
"object-curly-newline": "off",
|
|
11166
|
+
"style/comma-dangle": "off",
|
|
11167
|
+
"style/eol-last": "off",
|
|
11168
|
+
"unicode-bom": "off",
|
|
11169
|
+
"unused-imports/no-unused-imports": "off",
|
|
11170
|
+
"unused-imports/no-unused-vars": "off",
|
|
11171
|
+
...tsRulesOff,
|
|
11172
|
+
...overrides
|
|
11173
|
+
}
|
|
11174
|
+
}
|
|
11175
|
+
];
|
|
11176
|
+
}
|
|
11177
|
+
|
|
11178
|
+
// src/configs/yml.ts
|
|
11179
|
+
async function yml(options = {}) {
|
|
11180
|
+
const { files = [GLOB_YAML], overrides = {}, stylistic: stylistic2 = true } = options;
|
|
11181
|
+
const { indent = 2, quotes = "single" } = typeof stylistic2 === "boolean" ? {} : stylistic2;
|
|
11182
|
+
const [pluginYaml, parserYaml] = await Promise.all([
|
|
11183
|
+
interopDefault(import("eslint-plugin-yml")),
|
|
11184
|
+
interopDefault(import("yaml-eslint-parser"))
|
|
11185
|
+
]);
|
|
11186
|
+
return [
|
|
11187
|
+
{
|
|
11188
|
+
name: "jsse:yaml:setup",
|
|
11189
|
+
plugins: {
|
|
11190
|
+
yaml: pluginYaml
|
|
11191
|
+
}
|
|
11192
|
+
},
|
|
11193
|
+
{
|
|
11194
|
+
files,
|
|
11195
|
+
languageOptions: {
|
|
11196
|
+
parser: parserYaml
|
|
11197
|
+
},
|
|
11198
|
+
name: "antfu:yaml:rules",
|
|
11199
|
+
rules: {
|
|
11200
|
+
"style/spaced-comment": "off",
|
|
11201
|
+
"yaml/block-mapping": "error",
|
|
11202
|
+
"yaml/block-sequence": "error",
|
|
11203
|
+
"yaml/no-empty-key": "error",
|
|
11204
|
+
"yaml/no-empty-sequence-entry": "error",
|
|
11205
|
+
"yaml/no-irregular-whitespace": "error",
|
|
11206
|
+
"yaml/plain-scalar": "error",
|
|
11207
|
+
"yaml/vue-custom-block/no-parsing-error": "error",
|
|
11208
|
+
...stylistic2 ? {
|
|
11209
|
+
"yaml/block-mapping-question-indicator-newline": "error",
|
|
11210
|
+
"yaml/block-sequence-hyphen-indicator-newline": "error",
|
|
11211
|
+
"yaml/flow-mapping-curly-newline": "error",
|
|
11212
|
+
"yaml/flow-mapping-curly-spacing": "error",
|
|
11213
|
+
"yaml/flow-sequence-bracket-newline": "error",
|
|
11214
|
+
"yaml/flow-sequence-bracket-spacing": "error",
|
|
11215
|
+
"yaml/indent": ["error", indent === "tab" ? 2 : indent],
|
|
11216
|
+
"yaml/key-spacing": "error",
|
|
11217
|
+
"yaml/no-tab-indent": "error",
|
|
11218
|
+
"yaml/quotes": ["error", { avoidEscape: false, prefer: quotes }],
|
|
11219
|
+
"yaml/spaced-comment": "error"
|
|
11220
|
+
} : {},
|
|
11221
|
+
...overrides
|
|
11222
|
+
}
|
|
11223
|
+
}
|
|
11224
|
+
];
|
|
11225
|
+
}
|
|
11226
|
+
|
|
11128
11227
|
// src/factory.ts
|
|
11129
11228
|
var flatConfigProps = [
|
|
11130
11229
|
"files",
|
|
@@ -11144,6 +11243,7 @@ function defaultOptions2() {
|
|
|
11144
11243
|
gitignore: true,
|
|
11145
11244
|
isInEditor: isInEditor(),
|
|
11146
11245
|
jsonc: true,
|
|
11246
|
+
markdown: false,
|
|
11147
11247
|
off: [],
|
|
11148
11248
|
overrides: {},
|
|
11149
11249
|
prettier: true,
|
|
@@ -11176,7 +11276,7 @@ function normalizeOptions(options = {}) {
|
|
|
11176
11276
|
stylistic: stylisticOptions
|
|
11177
11277
|
};
|
|
11178
11278
|
}
|
|
11179
|
-
function jsse(options = {}, ...userConfigs) {
|
|
11279
|
+
async function jsse(options = {}, ...userConfigs) {
|
|
11180
11280
|
const normalizedOptions = normalizeOptions(options);
|
|
11181
11281
|
const {
|
|
11182
11282
|
componentExts,
|
|
@@ -11211,9 +11311,7 @@ function jsse(options = {}, ...userConfigs) {
|
|
|
11211
11311
|
}),
|
|
11212
11312
|
comments(),
|
|
11213
11313
|
node(),
|
|
11214
|
-
jsdoc(
|
|
11215
|
-
stylistic: stylisticOptions
|
|
11216
|
-
}),
|
|
11314
|
+
jsdoc(),
|
|
11217
11315
|
imports({
|
|
11218
11316
|
stylistic: stylisticOptions
|
|
11219
11317
|
}),
|
|
@@ -11221,24 +11319,31 @@ function jsse(options = {}, ...userConfigs) {
|
|
|
11221
11319
|
perfectionist()
|
|
11222
11320
|
);
|
|
11223
11321
|
if (enableTypeScript) {
|
|
11224
|
-
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
|
|
11322
|
+
const tscfg = await typescript({
|
|
11323
|
+
...typeof enableTypeScript === "boolean" ? {} : enableTypeScript,
|
|
11324
|
+
componentExts,
|
|
11325
|
+
overrides: overrides.typescript,
|
|
11326
|
+
prefix: {
|
|
11327
|
+
from: "@typescript-eslint",
|
|
11328
|
+
to: tsPrefix ?? "@typescript-eslint"
|
|
11329
|
+
},
|
|
11330
|
+
react: enableReact,
|
|
11331
|
+
typeAware
|
|
11332
|
+
});
|
|
11333
|
+
configs.push(tscfg);
|
|
11334
|
+
}
|
|
11335
|
+
if (normalizedOptions.markdown) {
|
|
11336
|
+
configs.push(markdown());
|
|
11337
|
+
}
|
|
11338
|
+
if (normalizedOptions.yaml) {
|
|
11339
|
+
const ymlConfig = await yml();
|
|
11340
|
+
configs.push(ymlConfig);
|
|
11237
11341
|
}
|
|
11238
11342
|
if (normalizedOptions.react) {
|
|
11239
11343
|
configs.push(
|
|
11240
11344
|
react({
|
|
11241
|
-
|
|
11345
|
+
// use react refresh if not explicitly disabled w/ 'false'
|
|
11346
|
+
reactRefresh: normalizedOptions.reactRefresh !== false
|
|
11242
11347
|
})
|
|
11243
11348
|
);
|
|
11244
11349
|
}
|
|
@@ -11334,6 +11439,7 @@ function jsseReact() {
|
|
|
11334
11439
|
eslintConfigPrettierRules,
|
|
11335
11440
|
ignores,
|
|
11336
11441
|
imports,
|
|
11442
|
+
interopDefault,
|
|
11337
11443
|
isCI,
|
|
11338
11444
|
isInEditor,
|
|
11339
11445
|
javascript,
|
|
@@ -11351,8 +11457,8 @@ function jsseReact() {
|
|
|
11351
11457
|
pluginJsdoc,
|
|
11352
11458
|
pluginJsonc,
|
|
11353
11459
|
pluginMarkdown,
|
|
11460
|
+
pluginN,
|
|
11354
11461
|
pluginNoOnlyTests,
|
|
11355
|
-
pluginNode,
|
|
11356
11462
|
pluginPerfectionist,
|
|
11357
11463
|
pluginReact,
|
|
11358
11464
|
pluginReactHooks,
|