@jsse/eslint-config 0.1.2 → 0.1.4
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/README.md +1 -1
- package/dist/cli.cjs +45 -22
- package/dist/cli.js +45 -22
- package/dist/index.cjs +1363 -704
- package/dist/index.d.cts +47 -26
- package/dist/index.d.ts +47 -26
- package/dist/index.js +1394 -737
- package/package.json +23 -17
package/dist/index.js
CHANGED
|
@@ -112,8 +112,8 @@ var require_sort_keys_fix = __commonJS({
|
|
|
112
112
|
const isValidOrder = isValidOrders[order + (insensitive ? "I" : "") + (natural ? "N" : "")];
|
|
113
113
|
const minKeys = Number(options && options.minKeys) || 2;
|
|
114
114
|
let stack = null;
|
|
115
|
-
const SpreadElement = (
|
|
116
|
-
if (
|
|
115
|
+
const SpreadElement = (node) => {
|
|
116
|
+
if (node.parent.type === "ObjectExpression") {
|
|
117
117
|
stack.prevName = null;
|
|
118
118
|
}
|
|
119
119
|
};
|
|
@@ -130,27 +130,27 @@ var require_sort_keys_fix = __commonJS({
|
|
|
130
130
|
"ObjectExpression:exit"() {
|
|
131
131
|
stack = stack.upper;
|
|
132
132
|
},
|
|
133
|
-
Property(
|
|
134
|
-
if (
|
|
133
|
+
Property(node) {
|
|
134
|
+
if (node.parent.type === "ObjectPattern") {
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
-
if (
|
|
137
|
+
if (node.parent.properties.length < minKeys) {
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
140
|
const prevName = stack.prevName;
|
|
141
141
|
const prevNode = stack.prevNode;
|
|
142
|
-
const thisName = getPropertyName(
|
|
142
|
+
const thisName = getPropertyName(node);
|
|
143
143
|
if (thisName !== null) {
|
|
144
144
|
stack.prevName = thisName;
|
|
145
|
-
stack.prevNode =
|
|
145
|
+
stack.prevNode = node || prevNode;
|
|
146
146
|
}
|
|
147
147
|
if (prevName === null || thisName === null) {
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
if (!isValidOrder(prevName, thisName)) {
|
|
151
151
|
ctx.report({
|
|
152
|
-
node
|
|
153
|
-
loc:
|
|
152
|
+
node,
|
|
153
|
+
loc: node.key.loc,
|
|
154
154
|
messageId: "sortKeys",
|
|
155
155
|
data: {
|
|
156
156
|
thisName,
|
|
@@ -160,13 +160,13 @@ var require_sort_keys_fix = __commonJS({
|
|
|
160
160
|
natural: natural ? "natural " : ""
|
|
161
161
|
},
|
|
162
162
|
fix(fixer) {
|
|
163
|
-
if (
|
|
163
|
+
if (node.parent.__alreadySorted || node.parent.properties.__alreadySorted) {
|
|
164
164
|
return [];
|
|
165
165
|
}
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
node.parent.__alreadySorted = true;
|
|
167
|
+
node.parent.properties.__alreadySorted = true;
|
|
168
168
|
const src = ctx.getSourceCode();
|
|
169
|
-
const props =
|
|
169
|
+
const props = node.parent.properties;
|
|
170
170
|
const parts = [];
|
|
171
171
|
let part = [];
|
|
172
172
|
props.forEach((p) => {
|
|
@@ -237,21 +237,21 @@ var require_sort_keys_fix = __commonJS({
|
|
|
237
237
|
}
|
|
238
238
|
return fixes;
|
|
239
239
|
};
|
|
240
|
-
var findTokenPrevLine = (
|
|
241
|
-
let t = src.getTokenBefore(
|
|
240
|
+
var findTokenPrevLine = (node, src) => {
|
|
241
|
+
let t = src.getTokenBefore(node);
|
|
242
242
|
while (true) {
|
|
243
|
-
if (!t || t.range[0] <
|
|
243
|
+
if (!t || t.range[0] < node.parent.range[0]) {
|
|
244
244
|
return null;
|
|
245
245
|
}
|
|
246
|
-
if (t.loc.end.line <
|
|
246
|
+
if (t.loc.end.line < node.loc.start.line) {
|
|
247
247
|
return t;
|
|
248
248
|
}
|
|
249
249
|
t = src.getTokenBefore(t);
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
var findCommaSameLine = (
|
|
253
|
-
const t = src.getTokenAfter(
|
|
254
|
-
return t && t.value === "," &&
|
|
252
|
+
var findCommaSameLine = (node, src) => {
|
|
253
|
+
const t = src.getTokenAfter(node);
|
|
254
|
+
return t && t.value === "," && node.loc.end.line === t.loc.start.line ? t : null;
|
|
255
255
|
};
|
|
256
256
|
var isValidOrders = {
|
|
257
257
|
asc: (a, b) => a <= b,
|
|
@@ -263,15 +263,15 @@ var require_sort_keys_fix = __commonJS({
|
|
|
263
263
|
descN: (a, b) => isValidOrders.ascN(b, a),
|
|
264
264
|
descIN: (a, b) => isValidOrders.ascIN(b, a)
|
|
265
265
|
};
|
|
266
|
-
var getPropertyName = (
|
|
266
|
+
var getPropertyName = (node) => {
|
|
267
267
|
let prop;
|
|
268
|
-
switch (
|
|
268
|
+
switch (node && node.type) {
|
|
269
269
|
case "Property":
|
|
270
270
|
case "MethodDefinition":
|
|
271
|
-
prop =
|
|
271
|
+
prop = node.key;
|
|
272
272
|
break;
|
|
273
273
|
case "MemberExpression":
|
|
274
|
-
prop =
|
|
274
|
+
prop = node.property;
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
switch (prop && prop.type) {
|
|
@@ -283,12 +283,12 @@ var require_sort_keys_fix = __commonJS({
|
|
|
283
283
|
}
|
|
284
284
|
break;
|
|
285
285
|
case "Identifier":
|
|
286
|
-
if (!
|
|
286
|
+
if (!node.computed) {
|
|
287
287
|
return prop.name;
|
|
288
288
|
}
|
|
289
289
|
break;
|
|
290
290
|
}
|
|
291
|
-
return
|
|
291
|
+
return node.key && node.key.name || null;
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
294
|
});
|
|
@@ -303,9 +303,9 @@ var require_eslint_plugin_sort_keys = __commonJS({
|
|
|
303
303
|
}
|
|
304
304
|
});
|
|
305
305
|
|
|
306
|
-
// node_modules/.pnpm/globals@
|
|
306
|
+
// node_modules/.pnpm/globals@15.0.0/node_modules/globals/globals.json
|
|
307
307
|
var require_globals = __commonJS({
|
|
308
|
-
"node_modules/.pnpm/globals@
|
|
308
|
+
"node_modules/.pnpm/globals@15.0.0/node_modules/globals/globals.json"(exports, module) {
|
|
309
309
|
module.exports = {
|
|
310
310
|
builtin: {
|
|
311
311
|
AggregateError: false,
|
|
@@ -316,7 +316,6 @@ var require_globals = __commonJS({
|
|
|
316
316
|
BigInt64Array: false,
|
|
317
317
|
BigUint64Array: false,
|
|
318
318
|
Boolean: false,
|
|
319
|
-
constructor: false,
|
|
320
319
|
DataView: false,
|
|
321
320
|
Date: false,
|
|
322
321
|
decodeURI: false,
|
|
@@ -332,14 +331,13 @@ var require_globals = __commonJS({
|
|
|
332
331
|
Float64Array: false,
|
|
333
332
|
Function: false,
|
|
334
333
|
globalThis: false,
|
|
335
|
-
hasOwnProperty: false,
|
|
336
334
|
Infinity: false,
|
|
337
335
|
Int16Array: false,
|
|
338
336
|
Int32Array: false,
|
|
339
337
|
Int8Array: false,
|
|
338
|
+
Intl: false,
|
|
340
339
|
isFinite: false,
|
|
341
340
|
isNaN: false,
|
|
342
|
-
isPrototypeOf: false,
|
|
343
341
|
JSON: false,
|
|
344
342
|
Map: false,
|
|
345
343
|
Math: false,
|
|
@@ -349,7 +347,6 @@ var require_globals = __commonJS({
|
|
|
349
347
|
parseFloat: false,
|
|
350
348
|
parseInt: false,
|
|
351
349
|
Promise: false,
|
|
352
|
-
propertyIsEnumerable: false,
|
|
353
350
|
Proxy: false,
|
|
354
351
|
RangeError: false,
|
|
355
352
|
ReferenceError: false,
|
|
@@ -360,8 +357,6 @@ var require_globals = __commonJS({
|
|
|
360
357
|
String: false,
|
|
361
358
|
Symbol: false,
|
|
362
359
|
SyntaxError: false,
|
|
363
|
-
toLocaleString: false,
|
|
364
|
-
toString: false,
|
|
365
360
|
TypeError: false,
|
|
366
361
|
Uint16Array: false,
|
|
367
362
|
Uint32Array: false,
|
|
@@ -370,7 +365,6 @@ var require_globals = __commonJS({
|
|
|
370
365
|
undefined: false,
|
|
371
366
|
unescape: false,
|
|
372
367
|
URIError: false,
|
|
373
|
-
valueOf: false,
|
|
374
368
|
WeakMap: false,
|
|
375
369
|
WeakRef: false,
|
|
376
370
|
WeakSet: false
|
|
@@ -378,7 +372,6 @@ var require_globals = __commonJS({
|
|
|
378
372
|
es5: {
|
|
379
373
|
Array: false,
|
|
380
374
|
Boolean: false,
|
|
381
|
-
constructor: false,
|
|
382
375
|
Date: false,
|
|
383
376
|
decodeURI: false,
|
|
384
377
|
decodeURIComponent: false,
|
|
@@ -389,11 +382,9 @@ var require_globals = __commonJS({
|
|
|
389
382
|
eval: false,
|
|
390
383
|
EvalError: false,
|
|
391
384
|
Function: false,
|
|
392
|
-
hasOwnProperty: false,
|
|
393
385
|
Infinity: false,
|
|
394
386
|
isFinite: false,
|
|
395
387
|
isNaN: false,
|
|
396
|
-
isPrototypeOf: false,
|
|
397
388
|
JSON: false,
|
|
398
389
|
Math: false,
|
|
399
390
|
NaN: false,
|
|
@@ -401,25 +392,20 @@ var require_globals = __commonJS({
|
|
|
401
392
|
Object: false,
|
|
402
393
|
parseFloat: false,
|
|
403
394
|
parseInt: false,
|
|
404
|
-
propertyIsEnumerable: false,
|
|
405
395
|
RangeError: false,
|
|
406
396
|
ReferenceError: false,
|
|
407
397
|
RegExp: false,
|
|
408
398
|
String: false,
|
|
409
399
|
SyntaxError: false,
|
|
410
|
-
toLocaleString: false,
|
|
411
|
-
toString: false,
|
|
412
400
|
TypeError: false,
|
|
413
401
|
undefined: false,
|
|
414
402
|
unescape: false,
|
|
415
|
-
URIError: false
|
|
416
|
-
valueOf: false
|
|
403
|
+
URIError: false
|
|
417
404
|
},
|
|
418
405
|
es2015: {
|
|
419
406
|
Array: false,
|
|
420
407
|
ArrayBuffer: false,
|
|
421
408
|
Boolean: false,
|
|
422
|
-
constructor: false,
|
|
423
409
|
DataView: false,
|
|
424
410
|
Date: false,
|
|
425
411
|
decodeURI: false,
|
|
@@ -433,14 +419,13 @@ var require_globals = __commonJS({
|
|
|
433
419
|
Float32Array: false,
|
|
434
420
|
Float64Array: false,
|
|
435
421
|
Function: false,
|
|
436
|
-
hasOwnProperty: false,
|
|
437
422
|
Infinity: false,
|
|
438
423
|
Int16Array: false,
|
|
439
424
|
Int32Array: false,
|
|
440
425
|
Int8Array: false,
|
|
426
|
+
Intl: false,
|
|
441
427
|
isFinite: false,
|
|
442
428
|
isNaN: false,
|
|
443
|
-
isPrototypeOf: false,
|
|
444
429
|
JSON: false,
|
|
445
430
|
Map: false,
|
|
446
431
|
Math: false,
|
|
@@ -450,7 +435,6 @@ var require_globals = __commonJS({
|
|
|
450
435
|
parseFloat: false,
|
|
451
436
|
parseInt: false,
|
|
452
437
|
Promise: false,
|
|
453
|
-
propertyIsEnumerable: false,
|
|
454
438
|
Proxy: false,
|
|
455
439
|
RangeError: false,
|
|
456
440
|
ReferenceError: false,
|
|
@@ -460,8 +444,6 @@ var require_globals = __commonJS({
|
|
|
460
444
|
String: false,
|
|
461
445
|
Symbol: false,
|
|
462
446
|
SyntaxError: false,
|
|
463
|
-
toLocaleString: false,
|
|
464
|
-
toString: false,
|
|
465
447
|
TypeError: false,
|
|
466
448
|
Uint16Array: false,
|
|
467
449
|
Uint32Array: false,
|
|
@@ -470,7 +452,6 @@ var require_globals = __commonJS({
|
|
|
470
452
|
undefined: false,
|
|
471
453
|
unescape: false,
|
|
472
454
|
URIError: false,
|
|
473
|
-
valueOf: false,
|
|
474
455
|
WeakMap: false,
|
|
475
456
|
WeakSet: false
|
|
476
457
|
},
|
|
@@ -479,7 +460,6 @@ var require_globals = __commonJS({
|
|
|
479
460
|
ArrayBuffer: false,
|
|
480
461
|
Atomics: false,
|
|
481
462
|
Boolean: false,
|
|
482
|
-
constructor: false,
|
|
483
463
|
DataView: false,
|
|
484
464
|
Date: false,
|
|
485
465
|
decodeURI: false,
|
|
@@ -493,14 +473,13 @@ var require_globals = __commonJS({
|
|
|
493
473
|
Float32Array: false,
|
|
494
474
|
Float64Array: false,
|
|
495
475
|
Function: false,
|
|
496
|
-
hasOwnProperty: false,
|
|
497
476
|
Infinity: false,
|
|
498
477
|
Int16Array: false,
|
|
499
478
|
Int32Array: false,
|
|
500
479
|
Int8Array: false,
|
|
480
|
+
Intl: false,
|
|
501
481
|
isFinite: false,
|
|
502
482
|
isNaN: false,
|
|
503
|
-
isPrototypeOf: false,
|
|
504
483
|
JSON: false,
|
|
505
484
|
Map: false,
|
|
506
485
|
Math: false,
|
|
@@ -510,7 +489,6 @@ var require_globals = __commonJS({
|
|
|
510
489
|
parseFloat: false,
|
|
511
490
|
parseInt: false,
|
|
512
491
|
Promise: false,
|
|
513
|
-
propertyIsEnumerable: false,
|
|
514
492
|
Proxy: false,
|
|
515
493
|
RangeError: false,
|
|
516
494
|
ReferenceError: false,
|
|
@@ -521,8 +499,6 @@ var require_globals = __commonJS({
|
|
|
521
499
|
String: false,
|
|
522
500
|
Symbol: false,
|
|
523
501
|
SyntaxError: false,
|
|
524
|
-
toLocaleString: false,
|
|
525
|
-
toString: false,
|
|
526
502
|
TypeError: false,
|
|
527
503
|
Uint16Array: false,
|
|
528
504
|
Uint32Array: false,
|
|
@@ -531,7 +507,6 @@ var require_globals = __commonJS({
|
|
|
531
507
|
undefined: false,
|
|
532
508
|
unescape: false,
|
|
533
509
|
URIError: false,
|
|
534
|
-
valueOf: false,
|
|
535
510
|
WeakMap: false,
|
|
536
511
|
WeakSet: false
|
|
537
512
|
},
|
|
@@ -543,7 +518,6 @@ var require_globals = __commonJS({
|
|
|
543
518
|
BigInt64Array: false,
|
|
544
519
|
BigUint64Array: false,
|
|
545
520
|
Boolean: false,
|
|
546
|
-
constructor: false,
|
|
547
521
|
DataView: false,
|
|
548
522
|
Date: false,
|
|
549
523
|
decodeURI: false,
|
|
@@ -558,14 +532,13 @@ var require_globals = __commonJS({
|
|
|
558
532
|
Float64Array: false,
|
|
559
533
|
Function: false,
|
|
560
534
|
globalThis: false,
|
|
561
|
-
hasOwnProperty: false,
|
|
562
535
|
Infinity: false,
|
|
563
536
|
Int16Array: false,
|
|
564
537
|
Int32Array: false,
|
|
565
538
|
Int8Array: false,
|
|
539
|
+
Intl: false,
|
|
566
540
|
isFinite: false,
|
|
567
541
|
isNaN: false,
|
|
568
|
-
isPrototypeOf: false,
|
|
569
542
|
JSON: false,
|
|
570
543
|
Map: false,
|
|
571
544
|
Math: false,
|
|
@@ -575,7 +548,6 @@ var require_globals = __commonJS({
|
|
|
575
548
|
parseFloat: false,
|
|
576
549
|
parseInt: false,
|
|
577
550
|
Promise: false,
|
|
578
|
-
propertyIsEnumerable: false,
|
|
579
551
|
Proxy: false,
|
|
580
552
|
RangeError: false,
|
|
581
553
|
ReferenceError: false,
|
|
@@ -586,8 +558,6 @@ var require_globals = __commonJS({
|
|
|
586
558
|
String: false,
|
|
587
559
|
Symbol: false,
|
|
588
560
|
SyntaxError: false,
|
|
589
|
-
toLocaleString: false,
|
|
590
|
-
toString: false,
|
|
591
561
|
TypeError: false,
|
|
592
562
|
Uint16Array: false,
|
|
593
563
|
Uint32Array: false,
|
|
@@ -596,7 +566,6 @@ var require_globals = __commonJS({
|
|
|
596
566
|
undefined: false,
|
|
597
567
|
unescape: false,
|
|
598
568
|
URIError: false,
|
|
599
|
-
valueOf: false,
|
|
600
569
|
WeakMap: false,
|
|
601
570
|
WeakSet: false
|
|
602
571
|
},
|
|
@@ -609,7 +578,6 @@ var require_globals = __commonJS({
|
|
|
609
578
|
BigInt64Array: false,
|
|
610
579
|
BigUint64Array: false,
|
|
611
580
|
Boolean: false,
|
|
612
|
-
constructor: false,
|
|
613
581
|
DataView: false,
|
|
614
582
|
Date: false,
|
|
615
583
|
decodeURI: false,
|
|
@@ -625,14 +593,13 @@ var require_globals = __commonJS({
|
|
|
625
593
|
Float64Array: false,
|
|
626
594
|
Function: false,
|
|
627
595
|
globalThis: false,
|
|
628
|
-
hasOwnProperty: false,
|
|
629
596
|
Infinity: false,
|
|
630
597
|
Int16Array: false,
|
|
631
598
|
Int32Array: false,
|
|
632
599
|
Int8Array: false,
|
|
600
|
+
Intl: false,
|
|
633
601
|
isFinite: false,
|
|
634
602
|
isNaN: false,
|
|
635
|
-
isPrototypeOf: false,
|
|
636
603
|
JSON: false,
|
|
637
604
|
Map: false,
|
|
638
605
|
Math: false,
|
|
@@ -642,7 +609,6 @@ var require_globals = __commonJS({
|
|
|
642
609
|
parseFloat: false,
|
|
643
610
|
parseInt: false,
|
|
644
611
|
Promise: false,
|
|
645
|
-
propertyIsEnumerable: false,
|
|
646
612
|
Proxy: false,
|
|
647
613
|
RangeError: false,
|
|
648
614
|
ReferenceError: false,
|
|
@@ -653,8 +619,6 @@ var require_globals = __commonJS({
|
|
|
653
619
|
String: false,
|
|
654
620
|
Symbol: false,
|
|
655
621
|
SyntaxError: false,
|
|
656
|
-
toLocaleString: false,
|
|
657
|
-
toString: false,
|
|
658
622
|
TypeError: false,
|
|
659
623
|
Uint16Array: false,
|
|
660
624
|
Uint32Array: false,
|
|
@@ -663,7 +627,6 @@ var require_globals = __commonJS({
|
|
|
663
627
|
undefined: false,
|
|
664
628
|
unescape: false,
|
|
665
629
|
URIError: false,
|
|
666
|
-
valueOf: false,
|
|
667
630
|
WeakMap: false,
|
|
668
631
|
WeakRef: false,
|
|
669
632
|
WeakSet: false
|
|
@@ -671,34 +634,42 @@ var require_globals = __commonJS({
|
|
|
671
634
|
browser: {
|
|
672
635
|
AbortController: false,
|
|
673
636
|
AbortSignal: false,
|
|
637
|
+
AbsoluteOrientationSensor: false,
|
|
638
|
+
AbstractRange: false,
|
|
639
|
+
Accelerometer: false,
|
|
674
640
|
addEventListener: false,
|
|
675
641
|
alert: false,
|
|
676
642
|
AnalyserNode: false,
|
|
677
643
|
Animation: false,
|
|
678
|
-
|
|
679
|
-
AnimationEffectTiming: false,
|
|
680
|
-
AnimationEffectTimingReadOnly: false,
|
|
644
|
+
AnimationEffect: false,
|
|
681
645
|
AnimationEvent: false,
|
|
682
646
|
AnimationPlaybackEvent: false,
|
|
683
647
|
AnimationTimeline: false,
|
|
684
|
-
applicationCache: false,
|
|
685
|
-
ApplicationCache: false,
|
|
686
|
-
ApplicationCacheErrorEvent: false,
|
|
687
648
|
atob: false,
|
|
688
649
|
Attr: false,
|
|
689
650
|
Audio: false,
|
|
690
651
|
AudioBuffer: false,
|
|
691
652
|
AudioBufferSourceNode: false,
|
|
692
653
|
AudioContext: false,
|
|
654
|
+
AudioData: false,
|
|
655
|
+
AudioDecoder: false,
|
|
693
656
|
AudioDestinationNode: false,
|
|
657
|
+
AudioEncoder: false,
|
|
694
658
|
AudioListener: false,
|
|
695
659
|
AudioNode: false,
|
|
696
660
|
AudioParam: false,
|
|
661
|
+
AudioParamMap: false,
|
|
697
662
|
AudioProcessingEvent: false,
|
|
698
663
|
AudioScheduledSourceNode: false,
|
|
699
|
-
|
|
664
|
+
AudioSinkInfo: false,
|
|
665
|
+
AudioWorklet: false,
|
|
700
666
|
AudioWorkletNode: false,
|
|
701
|
-
|
|
667
|
+
AuthenticatorAssertionResponse: false,
|
|
668
|
+
AuthenticatorAttestationResponse: false,
|
|
669
|
+
AuthenticatorResponse: false,
|
|
670
|
+
BackgroundFetchManager: false,
|
|
671
|
+
BackgroundFetchRecord: false,
|
|
672
|
+
BackgroundFetchRegistration: false,
|
|
702
673
|
BarProp: false,
|
|
703
674
|
BaseAudioContext: false,
|
|
704
675
|
BatteryManager: false,
|
|
@@ -706,26 +677,40 @@ var require_globals = __commonJS({
|
|
|
706
677
|
BiquadFilterNode: false,
|
|
707
678
|
Blob: false,
|
|
708
679
|
BlobEvent: false,
|
|
680
|
+
Bluetooth: false,
|
|
681
|
+
BluetoothCharacteristicProperties: false,
|
|
682
|
+
BluetoothDevice: false,
|
|
683
|
+
BluetoothRemoteGATTCharacteristic: false,
|
|
684
|
+
BluetoothRemoteGATTDescriptor: false,
|
|
685
|
+
BluetoothRemoteGATTServer: false,
|
|
686
|
+
BluetoothRemoteGATTService: false,
|
|
687
|
+
BluetoothUUID: false,
|
|
709
688
|
blur: false,
|
|
710
689
|
BroadcastChannel: false,
|
|
690
|
+
BrowserCaptureMediaStreamTrack: false,
|
|
711
691
|
btoa: false,
|
|
712
|
-
BudgetService: false,
|
|
713
692
|
ByteLengthQueuingStrategy: false,
|
|
714
693
|
Cache: false,
|
|
715
694
|
caches: false,
|
|
716
695
|
CacheStorage: false,
|
|
717
696
|
cancelAnimationFrame: false,
|
|
718
697
|
cancelIdleCallback: false,
|
|
698
|
+
CanvasCaptureMediaStream: false,
|
|
719
699
|
CanvasCaptureMediaStreamTrack: false,
|
|
720
700
|
CanvasGradient: false,
|
|
721
701
|
CanvasPattern: false,
|
|
722
702
|
CanvasRenderingContext2D: false,
|
|
703
|
+
CaptureController: false,
|
|
704
|
+
CaretPosition: false,
|
|
705
|
+
CDATASection: false,
|
|
723
706
|
ChannelMergerNode: false,
|
|
724
707
|
ChannelSplitterNode: false,
|
|
708
|
+
CharacterBoundsUpdateEvent: false,
|
|
725
709
|
CharacterData: false,
|
|
726
710
|
clearInterval: false,
|
|
727
711
|
clearTimeout: false,
|
|
728
712
|
clientInformation: false,
|
|
713
|
+
Clipboard: false,
|
|
729
714
|
ClipboardEvent: false,
|
|
730
715
|
ClipboardItem: false,
|
|
731
716
|
close: false,
|
|
@@ -737,56 +722,99 @@ var require_globals = __commonJS({
|
|
|
737
722
|
confirm: false,
|
|
738
723
|
console: false,
|
|
739
724
|
ConstantSourceNode: false,
|
|
725
|
+
ContentVisibilityAutoStateChangeEvent: false,
|
|
740
726
|
ConvolverNode: false,
|
|
727
|
+
CookieChangeEvent: false,
|
|
728
|
+
cookieStore: false,
|
|
729
|
+
CookieStore: false,
|
|
730
|
+
CookieStoreManager: false,
|
|
741
731
|
CountQueuingStrategy: false,
|
|
742
732
|
createImageBitmap: false,
|
|
743
733
|
Credential: false,
|
|
734
|
+
credentialless: false,
|
|
744
735
|
CredentialsContainer: false,
|
|
736
|
+
CropTarget: false,
|
|
737
|
+
crossOriginIsolated: false,
|
|
745
738
|
crypto: false,
|
|
746
739
|
Crypto: false,
|
|
747
740
|
CryptoKey: false,
|
|
748
741
|
CSS: false,
|
|
742
|
+
CSSAnimation: false,
|
|
749
743
|
CSSConditionRule: false,
|
|
744
|
+
CSSContainerRule: false,
|
|
745
|
+
CSSCounterStyleRule: false,
|
|
750
746
|
CSSFontFaceRule: false,
|
|
747
|
+
CSSFontFeatureValuesRule: false,
|
|
748
|
+
CSSFontPaletteValuesRule: false,
|
|
751
749
|
CSSGroupingRule: false,
|
|
750
|
+
CSSImageValue: false,
|
|
752
751
|
CSSImportRule: false,
|
|
753
752
|
CSSKeyframeRule: false,
|
|
754
753
|
CSSKeyframesRule: false,
|
|
754
|
+
CSSKeywordValue: false,
|
|
755
|
+
CSSLayerBlockRule: false,
|
|
756
|
+
CSSLayerStatementRule: false,
|
|
757
|
+
CSSMathClamp: false,
|
|
758
|
+
CSSMathInvert: false,
|
|
759
|
+
CSSMathMax: false,
|
|
760
|
+
CSSMathMin: false,
|
|
761
|
+
CSSMathNegate: false,
|
|
762
|
+
CSSMathProduct: false,
|
|
763
|
+
CSSMathSum: false,
|
|
764
|
+
CSSMathValue: false,
|
|
755
765
|
CSSMatrixComponent: false,
|
|
756
766
|
CSSMediaRule: false,
|
|
757
767
|
CSSNamespaceRule: false,
|
|
768
|
+
CSSNumericArray: false,
|
|
769
|
+
CSSNumericValue: false,
|
|
758
770
|
CSSPageRule: false,
|
|
759
771
|
CSSPerspective: false,
|
|
772
|
+
CSSPositionValue: false,
|
|
773
|
+
CSSPropertyRule: false,
|
|
760
774
|
CSSRotate: false,
|
|
761
775
|
CSSRule: false,
|
|
762
776
|
CSSRuleList: false,
|
|
763
777
|
CSSScale: false,
|
|
778
|
+
CSSScopeRule: false,
|
|
764
779
|
CSSSkew: false,
|
|
765
780
|
CSSSkewX: false,
|
|
766
781
|
CSSSkewY: false,
|
|
782
|
+
CSSStartingStyleRule: false,
|
|
767
783
|
CSSStyleDeclaration: false,
|
|
768
784
|
CSSStyleRule: false,
|
|
769
785
|
CSSStyleSheet: false,
|
|
786
|
+
CSSStyleValue: false,
|
|
770
787
|
CSSSupportsRule: false,
|
|
788
|
+
CSSTransformComponent: false,
|
|
771
789
|
CSSTransformValue: false,
|
|
790
|
+
CSSTransition: false,
|
|
772
791
|
CSSTranslate: false,
|
|
792
|
+
CSSUnitValue: false,
|
|
793
|
+
CSSUnparsedValue: false,
|
|
794
|
+
CSSVariableReferenceValue: false,
|
|
773
795
|
CustomElementRegistry: false,
|
|
774
796
|
customElements: false,
|
|
775
797
|
CustomEvent: false,
|
|
798
|
+
CustomStateSet: false,
|
|
776
799
|
DataTransfer: false,
|
|
777
800
|
DataTransferItem: false,
|
|
778
801
|
DataTransferItemList: false,
|
|
779
802
|
DecompressionStream: false,
|
|
780
|
-
defaultstatus: false,
|
|
781
|
-
defaultStatus: false,
|
|
782
803
|
DelayNode: false,
|
|
804
|
+
DelegatedInkTrailPresenter: false,
|
|
783
805
|
DeviceMotionEvent: false,
|
|
806
|
+
DeviceMotionEventAcceleration: false,
|
|
807
|
+
DeviceMotionEventRotationRate: false,
|
|
784
808
|
DeviceOrientationEvent: false,
|
|
785
809
|
devicePixelRatio: false,
|
|
786
810
|
dispatchEvent: false,
|
|
787
811
|
document: false,
|
|
788
812
|
Document: false,
|
|
789
813
|
DocumentFragment: false,
|
|
814
|
+
documentPictureInPicture: false,
|
|
815
|
+
DocumentPictureInPicture: false,
|
|
816
|
+
DocumentPictureInPictureEvent: false,
|
|
817
|
+
DocumentTimeline: false,
|
|
790
818
|
DocumentType: false,
|
|
791
819
|
DOMError: false,
|
|
792
820
|
DOMException: false,
|
|
@@ -805,34 +833,112 @@ var require_globals = __commonJS({
|
|
|
805
833
|
DOMTokenList: false,
|
|
806
834
|
DragEvent: false,
|
|
807
835
|
DynamicsCompressorNode: false,
|
|
836
|
+
EditContext: false,
|
|
808
837
|
Element: false,
|
|
838
|
+
ElementInternals: false,
|
|
839
|
+
EncodedAudioChunk: false,
|
|
840
|
+
EncodedVideoChunk: false,
|
|
809
841
|
ErrorEvent: false,
|
|
810
842
|
event: false,
|
|
811
843
|
Event: false,
|
|
844
|
+
EventCounts: false,
|
|
812
845
|
EventSource: false,
|
|
813
846
|
EventTarget: false,
|
|
814
847
|
external: false,
|
|
848
|
+
External: false,
|
|
849
|
+
EyeDropper: false,
|
|
850
|
+
FeaturePolicy: false,
|
|
851
|
+
FederatedCredential: false,
|
|
815
852
|
fetch: false,
|
|
816
853
|
File: false,
|
|
817
854
|
FileList: false,
|
|
818
855
|
FileReader: false,
|
|
856
|
+
FileSystem: false,
|
|
857
|
+
FileSystemDirectoryEntry: false,
|
|
858
|
+
FileSystemDirectoryHandle: false,
|
|
859
|
+
FileSystemDirectoryReader: false,
|
|
860
|
+
FileSystemEntry: false,
|
|
861
|
+
FileSystemFileEntry: false,
|
|
862
|
+
FileSystemFileHandle: false,
|
|
863
|
+
FileSystemHandle: false,
|
|
864
|
+
FileSystemWritableFileStream: false,
|
|
819
865
|
find: false,
|
|
820
866
|
focus: false,
|
|
821
867
|
FocusEvent: false,
|
|
868
|
+
FontData: false,
|
|
822
869
|
FontFace: false,
|
|
870
|
+
FontFaceSet: false,
|
|
823
871
|
FontFaceSetLoadEvent: false,
|
|
824
872
|
FormData: false,
|
|
825
873
|
FormDataEvent: false,
|
|
874
|
+
FragmentDirective: false,
|
|
826
875
|
frameElement: false,
|
|
827
876
|
frames: false,
|
|
828
877
|
GainNode: false,
|
|
829
878
|
Gamepad: false,
|
|
879
|
+
GamepadAxisMoveEvent: false,
|
|
830
880
|
GamepadButton: false,
|
|
881
|
+
GamepadButtonEvent: false,
|
|
831
882
|
GamepadEvent: false,
|
|
883
|
+
GamepadHapticActuator: false,
|
|
884
|
+
GamepadPose: false,
|
|
885
|
+
Geolocation: false,
|
|
886
|
+
GeolocationCoordinates: false,
|
|
887
|
+
GeolocationPosition: false,
|
|
888
|
+
GeolocationPositionError: false,
|
|
832
889
|
getComputedStyle: false,
|
|
890
|
+
getScreenDetails: false,
|
|
833
891
|
getSelection: false,
|
|
892
|
+
GPU: false,
|
|
893
|
+
GPUAdapter: false,
|
|
894
|
+
GPUAdapterInfo: false,
|
|
895
|
+
GPUBindGroup: false,
|
|
896
|
+
GPUBindGroupLayout: false,
|
|
897
|
+
GPUBuffer: false,
|
|
898
|
+
GPUBufferUsage: false,
|
|
899
|
+
GPUCanvasContext: false,
|
|
900
|
+
GPUColorWrite: false,
|
|
901
|
+
GPUCommandBuffer: false,
|
|
902
|
+
GPUCommandEncoder: false,
|
|
903
|
+
GPUCompilationInfo: false,
|
|
904
|
+
GPUCompilationMessage: false,
|
|
905
|
+
GPUComputePassEncoder: false,
|
|
906
|
+
GPUComputePipeline: false,
|
|
907
|
+
GPUDevice: false,
|
|
908
|
+
GPUDeviceLostInfo: false,
|
|
909
|
+
GPUError: false,
|
|
910
|
+
GPUExternalTexture: false,
|
|
911
|
+
GPUInternalError: false,
|
|
912
|
+
GPUMapMode: false,
|
|
913
|
+
GPUOutOfMemoryError: false,
|
|
914
|
+
GPUPipelineError: false,
|
|
915
|
+
GPUPipelineLayout: false,
|
|
916
|
+
GPUQuerySet: false,
|
|
917
|
+
GPUQueue: false,
|
|
918
|
+
GPURenderBundle: false,
|
|
919
|
+
GPURenderBundleEncoder: false,
|
|
920
|
+
GPURenderPassEncoder: false,
|
|
921
|
+
GPURenderPipeline: false,
|
|
922
|
+
GPUSampler: false,
|
|
923
|
+
GPUShaderModule: false,
|
|
924
|
+
GPUShaderStage: false,
|
|
925
|
+
GPUSupportedFeatures: false,
|
|
926
|
+
GPUSupportedLimits: false,
|
|
927
|
+
GPUTexture: false,
|
|
928
|
+
GPUTextureUsage: false,
|
|
929
|
+
GPUTextureView: false,
|
|
930
|
+
GPUUncapturedErrorEvent: false,
|
|
931
|
+
GPUValidationError: false,
|
|
932
|
+
GravitySensor: false,
|
|
933
|
+
Gyroscope: false,
|
|
834
934
|
HashChangeEvent: false,
|
|
835
935
|
Headers: false,
|
|
936
|
+
HID: false,
|
|
937
|
+
HIDConnectionEvent: false,
|
|
938
|
+
HIDDevice: false,
|
|
939
|
+
HIDInputReportEvent: false,
|
|
940
|
+
Highlight: false,
|
|
941
|
+
HighlightRegistry: false,
|
|
836
942
|
history: false,
|
|
837
943
|
History: false,
|
|
838
944
|
HTMLAllCollection: false,
|
|
@@ -845,7 +951,6 @@ var require_globals = __commonJS({
|
|
|
845
951
|
HTMLButtonElement: false,
|
|
846
952
|
HTMLCanvasElement: false,
|
|
847
953
|
HTMLCollection: false,
|
|
848
|
-
HTMLContentElement: false,
|
|
849
954
|
HTMLDataElement: false,
|
|
850
955
|
HTMLDataListElement: false,
|
|
851
956
|
HTMLDetailsElement: false,
|
|
@@ -894,7 +999,6 @@ var require_globals = __commonJS({
|
|
|
894
999
|
HTMLQuoteElement: false,
|
|
895
1000
|
HTMLScriptElement: false,
|
|
896
1001
|
HTMLSelectElement: false,
|
|
897
|
-
HTMLShadowElement: false,
|
|
898
1002
|
HTMLSlotElement: false,
|
|
899
1003
|
HTMLSourceElement: false,
|
|
900
1004
|
HTMLSpanElement: false,
|
|
@@ -924,36 +1028,61 @@ var require_globals = __commonJS({
|
|
|
924
1028
|
IDBRequest: false,
|
|
925
1029
|
IDBTransaction: false,
|
|
926
1030
|
IDBVersionChangeEvent: false,
|
|
1031
|
+
IdentityCredential: false,
|
|
1032
|
+
IdentityCredentialError: false,
|
|
1033
|
+
IdentityProvider: false,
|
|
927
1034
|
IdleDeadline: false,
|
|
1035
|
+
IdleDetector: false,
|
|
928
1036
|
IIRFilterNode: false,
|
|
929
1037
|
Image: false,
|
|
930
1038
|
ImageBitmap: false,
|
|
931
1039
|
ImageBitmapRenderingContext: false,
|
|
932
1040
|
ImageCapture: false,
|
|
933
1041
|
ImageData: false,
|
|
1042
|
+
ImageDecoder: false,
|
|
1043
|
+
ImageTrack: false,
|
|
1044
|
+
ImageTrackList: false,
|
|
934
1045
|
indexedDB: false,
|
|
1046
|
+
Ink: false,
|
|
935
1047
|
innerHeight: false,
|
|
936
1048
|
innerWidth: false,
|
|
1049
|
+
InputDeviceCapabilities: false,
|
|
1050
|
+
InputDeviceInfo: false,
|
|
937
1051
|
InputEvent: false,
|
|
938
1052
|
IntersectionObserver: false,
|
|
939
1053
|
IntersectionObserverEntry: false,
|
|
940
|
-
Intl: false,
|
|
941
1054
|
isSecureContext: false,
|
|
1055
|
+
Iterator: false,
|
|
1056
|
+
Keyboard: false,
|
|
942
1057
|
KeyboardEvent: false,
|
|
1058
|
+
KeyboardLayoutMap: false,
|
|
943
1059
|
KeyframeEffect: false,
|
|
944
|
-
|
|
1060
|
+
LargestContentfulPaint: false,
|
|
1061
|
+
LaunchParams: false,
|
|
1062
|
+
launchQueue: false,
|
|
1063
|
+
LaunchQueue: false,
|
|
1064
|
+
LayoutShift: false,
|
|
1065
|
+
LayoutShiftAttribution: false,
|
|
945
1066
|
length: false,
|
|
1067
|
+
LinearAccelerationSensor: false,
|
|
946
1068
|
localStorage: false,
|
|
947
1069
|
location: true,
|
|
948
1070
|
Location: false,
|
|
949
1071
|
locationbar: false,
|
|
1072
|
+
Lock: false,
|
|
1073
|
+
LockManager: false,
|
|
950
1074
|
matchMedia: false,
|
|
1075
|
+
MathMLElement: false,
|
|
1076
|
+
MediaCapabilities: false,
|
|
1077
|
+
MediaCapabilitiesInfo: false,
|
|
951
1078
|
MediaDeviceInfo: false,
|
|
952
1079
|
MediaDevices: false,
|
|
953
1080
|
MediaElementAudioSourceNode: false,
|
|
954
1081
|
MediaEncryptedEvent: false,
|
|
955
1082
|
MediaError: false,
|
|
1083
|
+
MediaKeyError: false,
|
|
956
1084
|
MediaKeyMessageEvent: false,
|
|
1085
|
+
MediaKeys: false,
|
|
957
1086
|
MediaKeySession: false,
|
|
958
1087
|
MediaKeyStatusMap: false,
|
|
959
1088
|
MediaKeySystemAccess: false,
|
|
@@ -962,15 +1091,20 @@ var require_globals = __commonJS({
|
|
|
962
1091
|
MediaQueryList: false,
|
|
963
1092
|
MediaQueryListEvent: false,
|
|
964
1093
|
MediaRecorder: false,
|
|
965
|
-
|
|
1094
|
+
MediaRecorderErrorEvent: false,
|
|
1095
|
+
MediaSession: false,
|
|
966
1096
|
MediaSource: false,
|
|
1097
|
+
MediaSourceHandle: false,
|
|
967
1098
|
MediaStream: false,
|
|
968
1099
|
MediaStreamAudioDestinationNode: false,
|
|
969
1100
|
MediaStreamAudioSourceNode: false,
|
|
970
|
-
MediaStreamConstraints: false,
|
|
971
1101
|
MediaStreamEvent: false,
|
|
972
1102
|
MediaStreamTrack: false,
|
|
1103
|
+
MediaStreamTrackAudioSourceNode: false,
|
|
973
1104
|
MediaStreamTrackEvent: false,
|
|
1105
|
+
MediaStreamTrackGenerator: false,
|
|
1106
|
+
MediaStreamTrackProcessor: false,
|
|
1107
|
+
MediaStreamTrackVideoStats: false,
|
|
974
1108
|
menubar: false,
|
|
975
1109
|
MessageChannel: false,
|
|
976
1110
|
MessageEvent: false,
|
|
@@ -993,9 +1127,19 @@ var require_globals = __commonJS({
|
|
|
993
1127
|
MutationRecord: false,
|
|
994
1128
|
name: false,
|
|
995
1129
|
NamedNodeMap: false,
|
|
1130
|
+
NavigateEvent: false,
|
|
1131
|
+
navigation: false,
|
|
1132
|
+
Navigation: false,
|
|
1133
|
+
NavigationActivation: false,
|
|
1134
|
+
NavigationCurrentEntryChangeEvent: false,
|
|
1135
|
+
NavigationDestination: false,
|
|
1136
|
+
NavigationHistoryEntry: false,
|
|
996
1137
|
NavigationPreloadManager: false,
|
|
1138
|
+
NavigationTransition: false,
|
|
997
1139
|
navigator: false,
|
|
998
1140
|
Navigator: false,
|
|
1141
|
+
NavigatorLogin: false,
|
|
1142
|
+
NavigatorManagedData: false,
|
|
999
1143
|
NavigatorUAData: false,
|
|
1000
1144
|
NetworkInformation: false,
|
|
1001
1145
|
Node: false,
|
|
@@ -1003,21 +1147,27 @@ var require_globals = __commonJS({
|
|
|
1003
1147
|
NodeIterator: false,
|
|
1004
1148
|
NodeList: false,
|
|
1005
1149
|
Notification: false,
|
|
1150
|
+
NotifyPaintEvent: false,
|
|
1006
1151
|
OfflineAudioCompletionEvent: false,
|
|
1007
1152
|
OfflineAudioContext: false,
|
|
1008
1153
|
offscreenBuffering: false,
|
|
1009
|
-
OffscreenCanvas:
|
|
1154
|
+
OffscreenCanvas: false,
|
|
1010
1155
|
OffscreenCanvasRenderingContext2D: false,
|
|
1011
1156
|
onabort: true,
|
|
1012
1157
|
onafterprint: true,
|
|
1158
|
+
onanimationcancel: true,
|
|
1013
1159
|
onanimationend: true,
|
|
1014
1160
|
onanimationiteration: true,
|
|
1015
1161
|
onanimationstart: true,
|
|
1016
1162
|
onappinstalled: true,
|
|
1017
1163
|
onauxclick: true,
|
|
1164
|
+
onbeforeinput: true,
|
|
1018
1165
|
onbeforeinstallprompt: true,
|
|
1166
|
+
onbeforematch: true,
|
|
1019
1167
|
onbeforeprint: true,
|
|
1168
|
+
onbeforetoggle: true,
|
|
1020
1169
|
onbeforeunload: true,
|
|
1170
|
+
onbeforexrselect: true,
|
|
1021
1171
|
onblur: true,
|
|
1022
1172
|
oncancel: true,
|
|
1023
1173
|
oncanplay: true,
|
|
@@ -1025,8 +1175,13 @@ var require_globals = __commonJS({
|
|
|
1025
1175
|
onchange: true,
|
|
1026
1176
|
onclick: true,
|
|
1027
1177
|
onclose: true,
|
|
1178
|
+
oncontentvisibilityautostatechange: true,
|
|
1179
|
+
oncontextlost: true,
|
|
1028
1180
|
oncontextmenu: true,
|
|
1181
|
+
oncontextrestored: true,
|
|
1182
|
+
oncopy: true,
|
|
1029
1183
|
oncuechange: true,
|
|
1184
|
+
oncut: true,
|
|
1030
1185
|
ondblclick: true,
|
|
1031
1186
|
ondevicemotion: true,
|
|
1032
1187
|
ondeviceorientation: true,
|
|
@@ -1043,6 +1198,9 @@ var require_globals = __commonJS({
|
|
|
1043
1198
|
onended: true,
|
|
1044
1199
|
onerror: true,
|
|
1045
1200
|
onfocus: true,
|
|
1201
|
+
onformdata: true,
|
|
1202
|
+
ongamepadconnected: true,
|
|
1203
|
+
ongamepaddisconnected: true,
|
|
1046
1204
|
ongotpointercapture: true,
|
|
1047
1205
|
onhashchange: true,
|
|
1048
1206
|
oninput: true,
|
|
@@ -1069,7 +1227,9 @@ var require_globals = __commonJS({
|
|
|
1069
1227
|
onoffline: true,
|
|
1070
1228
|
ononline: true,
|
|
1071
1229
|
onpagehide: true,
|
|
1230
|
+
onpagereveal: true,
|
|
1072
1231
|
onpageshow: true,
|
|
1232
|
+
onpaste: true,
|
|
1073
1233
|
onpause: true,
|
|
1074
1234
|
onplay: true,
|
|
1075
1235
|
onplaying: true,
|
|
@@ -1080,6 +1240,7 @@ var require_globals = __commonJS({
|
|
|
1080
1240
|
onpointermove: true,
|
|
1081
1241
|
onpointerout: true,
|
|
1082
1242
|
onpointerover: true,
|
|
1243
|
+
onpointerrawupdate: true,
|
|
1083
1244
|
onpointerup: true,
|
|
1084
1245
|
onpopstate: true,
|
|
1085
1246
|
onprogress: true,
|
|
@@ -1088,44 +1249,61 @@ var require_globals = __commonJS({
|
|
|
1088
1249
|
onreset: true,
|
|
1089
1250
|
onresize: true,
|
|
1090
1251
|
onscroll: true,
|
|
1252
|
+
onscrollend: true,
|
|
1091
1253
|
onsearch: true,
|
|
1254
|
+
onsecuritypolicyviolation: true,
|
|
1092
1255
|
onseeked: true,
|
|
1093
1256
|
onseeking: true,
|
|
1094
1257
|
onselect: true,
|
|
1258
|
+
onselectionchange: true,
|
|
1259
|
+
onselectstart: true,
|
|
1260
|
+
onslotchange: true,
|
|
1095
1261
|
onstalled: true,
|
|
1096
1262
|
onstorage: true,
|
|
1097
1263
|
onsubmit: true,
|
|
1098
1264
|
onsuspend: true,
|
|
1099
1265
|
ontimeupdate: true,
|
|
1100
1266
|
ontoggle: true,
|
|
1267
|
+
ontransitioncancel: true,
|
|
1101
1268
|
ontransitionend: true,
|
|
1269
|
+
ontransitionrun: true,
|
|
1270
|
+
ontransitionstart: true,
|
|
1102
1271
|
onunhandledrejection: true,
|
|
1103
1272
|
onunload: true,
|
|
1104
1273
|
onvolumechange: true,
|
|
1105
1274
|
onwaiting: true,
|
|
1106
1275
|
onwheel: true,
|
|
1107
1276
|
open: false,
|
|
1108
|
-
openDatabase: false,
|
|
1109
1277
|
opener: false,
|
|
1110
1278
|
Option: false,
|
|
1279
|
+
OrientationSensor: false,
|
|
1111
1280
|
origin: false,
|
|
1281
|
+
originAgentCluster: false,
|
|
1112
1282
|
OscillatorNode: false,
|
|
1283
|
+
OTPCredential: false,
|
|
1113
1284
|
outerHeight: false,
|
|
1114
1285
|
outerWidth: false,
|
|
1115
1286
|
OverconstrainedError: false,
|
|
1287
|
+
PageRevealEvent: false,
|
|
1116
1288
|
PageTransitionEvent: false,
|
|
1117
1289
|
pageXOffset: false,
|
|
1118
1290
|
pageYOffset: false,
|
|
1119
1291
|
PannerNode: false,
|
|
1120
1292
|
parent: false,
|
|
1293
|
+
PasswordCredential: false,
|
|
1121
1294
|
Path2D: false,
|
|
1122
1295
|
PaymentAddress: false,
|
|
1296
|
+
PaymentManager: false,
|
|
1297
|
+
PaymentMethodChangeEvent: false,
|
|
1123
1298
|
PaymentRequest: false,
|
|
1124
1299
|
PaymentRequestUpdateEvent: false,
|
|
1125
1300
|
PaymentResponse: false,
|
|
1126
1301
|
performance: false,
|
|
1127
1302
|
Performance: false,
|
|
1303
|
+
PerformanceElementTiming: false,
|
|
1128
1304
|
PerformanceEntry: false,
|
|
1305
|
+
PerformanceEventTiming: false,
|
|
1306
|
+
PerformanceLongAnimationFrameTiming: false,
|
|
1129
1307
|
PerformanceLongTaskTiming: false,
|
|
1130
1308
|
PerformanceMark: false,
|
|
1131
1309
|
PerformanceMeasure: false,
|
|
@@ -1135,12 +1313,17 @@ var require_globals = __commonJS({
|
|
|
1135
1313
|
PerformanceObserverEntryList: false,
|
|
1136
1314
|
PerformancePaintTiming: false,
|
|
1137
1315
|
PerformanceResourceTiming: false,
|
|
1316
|
+
PerformanceScriptTiming: false,
|
|
1317
|
+
PerformanceServerTiming: false,
|
|
1138
1318
|
PerformanceTiming: false,
|
|
1319
|
+
PeriodicSyncManager: false,
|
|
1139
1320
|
PeriodicWave: false,
|
|
1140
1321
|
Permissions: false,
|
|
1141
1322
|
PermissionStatus: false,
|
|
1323
|
+
PERSISTENT: false,
|
|
1142
1324
|
personalbar: false,
|
|
1143
|
-
|
|
1325
|
+
PictureInPictureEvent: false,
|
|
1326
|
+
PictureInPictureWindow: false,
|
|
1144
1327
|
Plugin: false,
|
|
1145
1328
|
PluginArray: false,
|
|
1146
1329
|
PointerEvent: false,
|
|
@@ -1156,12 +1339,15 @@ var require_globals = __commonJS({
|
|
|
1156
1339
|
PresentationRequest: false,
|
|
1157
1340
|
print: false,
|
|
1158
1341
|
ProcessingInstruction: false,
|
|
1342
|
+
Profiler: false,
|
|
1159
1343
|
ProgressEvent: false,
|
|
1160
1344
|
PromiseRejectionEvent: false,
|
|
1161
1345
|
prompt: false,
|
|
1346
|
+
PublicKeyCredential: false,
|
|
1162
1347
|
PushManager: false,
|
|
1163
1348
|
PushSubscription: false,
|
|
1164
1349
|
PushSubscriptionOptions: false,
|
|
1350
|
+
queryLocalFonts: false,
|
|
1165
1351
|
queueMicrotask: false,
|
|
1166
1352
|
RadioNodeList: false,
|
|
1167
1353
|
Range: false,
|
|
@@ -1171,36 +1357,50 @@ var require_globals = __commonJS({
|
|
|
1171
1357
|
ReadableStreamBYOBRequest: false,
|
|
1172
1358
|
ReadableStreamDefaultController: false,
|
|
1173
1359
|
ReadableStreamDefaultReader: false,
|
|
1174
|
-
|
|
1360
|
+
RelativeOrientationSensor: false,
|
|
1175
1361
|
RemotePlayback: false,
|
|
1176
1362
|
removeEventListener: false,
|
|
1177
1363
|
reportError: false,
|
|
1364
|
+
ReportingObserver: false,
|
|
1178
1365
|
Request: false,
|
|
1179
1366
|
requestAnimationFrame: false,
|
|
1180
1367
|
requestIdleCallback: false,
|
|
1181
1368
|
resizeBy: false,
|
|
1182
1369
|
ResizeObserver: false,
|
|
1183
1370
|
ResizeObserverEntry: false,
|
|
1371
|
+
ResizeObserverSize: false,
|
|
1184
1372
|
resizeTo: false,
|
|
1185
1373
|
Response: false,
|
|
1186
1374
|
RTCCertificate: false,
|
|
1187
1375
|
RTCDataChannel: false,
|
|
1188
1376
|
RTCDataChannelEvent: false,
|
|
1189
1377
|
RTCDtlsTransport: false,
|
|
1378
|
+
RTCDTMFSender: false,
|
|
1379
|
+
RTCDTMFToneChangeEvent: false,
|
|
1380
|
+
RTCEncodedAudioFrame: false,
|
|
1381
|
+
RTCEncodedVideoFrame: false,
|
|
1382
|
+
RTCError: false,
|
|
1383
|
+
RTCErrorEvent: false,
|
|
1190
1384
|
RTCIceCandidate: false,
|
|
1191
|
-
RTCIceGatherer: false,
|
|
1192
1385
|
RTCIceTransport: false,
|
|
1193
1386
|
RTCPeerConnection: false,
|
|
1387
|
+
RTCPeerConnectionIceErrorEvent: false,
|
|
1194
1388
|
RTCPeerConnectionIceEvent: false,
|
|
1195
|
-
RTCRtpContributingSource: false,
|
|
1196
1389
|
RTCRtpReceiver: false,
|
|
1390
|
+
RTCRtpScriptTransform: false,
|
|
1197
1391
|
RTCRtpSender: false,
|
|
1392
|
+
RTCRtpTransceiver: false,
|
|
1198
1393
|
RTCSctpTransport: false,
|
|
1199
1394
|
RTCSessionDescription: false,
|
|
1200
1395
|
RTCStatsReport: false,
|
|
1201
1396
|
RTCTrackEvent: false,
|
|
1397
|
+
scheduler: false,
|
|
1398
|
+
Scheduler: false,
|
|
1399
|
+
Scheduling: false,
|
|
1202
1400
|
screen: false,
|
|
1203
1401
|
Screen: false,
|
|
1402
|
+
ScreenDetailed: false,
|
|
1403
|
+
ScreenDetails: false,
|
|
1204
1404
|
screenLeft: false,
|
|
1205
1405
|
ScreenOrientation: false,
|
|
1206
1406
|
screenTop: false,
|
|
@@ -1210,12 +1410,17 @@ var require_globals = __commonJS({
|
|
|
1210
1410
|
scroll: false,
|
|
1211
1411
|
scrollbars: false,
|
|
1212
1412
|
scrollBy: false,
|
|
1413
|
+
ScrollTimeline: false,
|
|
1213
1414
|
scrollTo: false,
|
|
1214
1415
|
scrollX: false,
|
|
1215
1416
|
scrollY: false,
|
|
1216
1417
|
SecurityPolicyViolationEvent: false,
|
|
1217
1418
|
Selection: false,
|
|
1218
1419
|
self: false,
|
|
1420
|
+
Sensor: false,
|
|
1421
|
+
SensorErrorEvent: false,
|
|
1422
|
+
Serial: false,
|
|
1423
|
+
SerialPort: false,
|
|
1219
1424
|
ServiceWorker: false,
|
|
1220
1425
|
ServiceWorkerContainer: false,
|
|
1221
1426
|
ServiceWorkerRegistration: false,
|
|
@@ -1224,21 +1429,31 @@ var require_globals = __commonJS({
|
|
|
1224
1429
|
setTimeout: false,
|
|
1225
1430
|
ShadowRoot: false,
|
|
1226
1431
|
SharedWorker: false,
|
|
1432
|
+
showDirectoryPicker: false,
|
|
1433
|
+
showOpenFilePicker: false,
|
|
1434
|
+
showSaveFilePicker: false,
|
|
1227
1435
|
SourceBuffer: false,
|
|
1228
1436
|
SourceBufferList: false,
|
|
1229
1437
|
speechSynthesis: false,
|
|
1438
|
+
SpeechSynthesis: false,
|
|
1439
|
+
SpeechSynthesisErrorEvent: false,
|
|
1230
1440
|
SpeechSynthesisEvent: false,
|
|
1231
1441
|
SpeechSynthesisUtterance: false,
|
|
1442
|
+
SpeechSynthesisVoice: false,
|
|
1232
1443
|
StaticRange: false,
|
|
1233
1444
|
status: false,
|
|
1234
1445
|
statusbar: false,
|
|
1235
1446
|
StereoPannerNode: false,
|
|
1236
1447
|
stop: false,
|
|
1237
1448
|
Storage: false,
|
|
1449
|
+
StorageBucket: false,
|
|
1450
|
+
StorageBucketManager: false,
|
|
1238
1451
|
StorageEvent: false,
|
|
1239
1452
|
StorageManager: false,
|
|
1240
1453
|
structuredClone: false,
|
|
1241
1454
|
styleMedia: false,
|
|
1455
|
+
StylePropertyMap: false,
|
|
1456
|
+
StylePropertyMapReadOnly: false,
|
|
1242
1457
|
StyleSheet: false,
|
|
1243
1458
|
StyleSheetList: false,
|
|
1244
1459
|
SubmitEvent: false,
|
|
@@ -1266,7 +1481,6 @@ var require_globals = __commonJS({
|
|
|
1266
1481
|
SVGComponentTransferFunctionElement: false,
|
|
1267
1482
|
SVGDefsElement: false,
|
|
1268
1483
|
SVGDescElement: false,
|
|
1269
|
-
SVGDiscardElement: false,
|
|
1270
1484
|
SVGElement: false,
|
|
1271
1485
|
SVGEllipseElement: false,
|
|
1272
1486
|
SVGFEBlendElement: false,
|
|
@@ -1341,18 +1555,27 @@ var require_globals = __commonJS({
|
|
|
1341
1555
|
SVGUnitTypes: false,
|
|
1342
1556
|
SVGUseElement: false,
|
|
1343
1557
|
SVGViewElement: false,
|
|
1558
|
+
SyncManager: false,
|
|
1344
1559
|
TaskAttributionTiming: false,
|
|
1560
|
+
TaskController: false,
|
|
1561
|
+
TaskPriorityChangeEvent: false,
|
|
1562
|
+
TaskSignal: false,
|
|
1563
|
+
TEMPORARY: false,
|
|
1345
1564
|
Text: false,
|
|
1346
1565
|
TextDecoder: false,
|
|
1347
1566
|
TextDecoderStream: false,
|
|
1348
1567
|
TextEncoder: false,
|
|
1349
1568
|
TextEncoderStream: false,
|
|
1350
1569
|
TextEvent: false,
|
|
1570
|
+
TextFormat: false,
|
|
1571
|
+
TextFormatUpdateEvent: false,
|
|
1351
1572
|
TextMetrics: false,
|
|
1352
1573
|
TextTrack: false,
|
|
1353
1574
|
TextTrackCue: false,
|
|
1354
1575
|
TextTrackCueList: false,
|
|
1355
1576
|
TextTrackList: false,
|
|
1577
|
+
TextUpdateEvent: false,
|
|
1578
|
+
TimeEvent: false,
|
|
1356
1579
|
TimeRanges: false,
|
|
1357
1580
|
ToggleEvent: false,
|
|
1358
1581
|
toolbar: false,
|
|
@@ -1365,13 +1588,47 @@ var require_globals = __commonJS({
|
|
|
1365
1588
|
TransformStreamDefaultController: false,
|
|
1366
1589
|
TransitionEvent: false,
|
|
1367
1590
|
TreeWalker: false,
|
|
1591
|
+
TrustedHTML: false,
|
|
1592
|
+
TrustedScript: false,
|
|
1593
|
+
TrustedScriptURL: false,
|
|
1594
|
+
TrustedTypePolicy: false,
|
|
1595
|
+
TrustedTypePolicyFactory: false,
|
|
1596
|
+
trustedTypes: false,
|
|
1368
1597
|
UIEvent: false,
|
|
1369
1598
|
URL: false,
|
|
1599
|
+
URLPattern: false,
|
|
1370
1600
|
URLSearchParams: false,
|
|
1601
|
+
USB: false,
|
|
1602
|
+
USBAlternateInterface: false,
|
|
1603
|
+
USBConfiguration: false,
|
|
1604
|
+
USBConnectionEvent: false,
|
|
1605
|
+
USBDevice: false,
|
|
1606
|
+
USBEndpoint: false,
|
|
1607
|
+
USBInterface: false,
|
|
1608
|
+
USBInTransferResult: false,
|
|
1609
|
+
USBIsochronousInTransferPacket: false,
|
|
1610
|
+
USBIsochronousInTransferResult: false,
|
|
1611
|
+
USBIsochronousOutTransferPacket: false,
|
|
1612
|
+
USBIsochronousOutTransferResult: false,
|
|
1613
|
+
USBOutTransferResult: false,
|
|
1614
|
+
UserActivation: false,
|
|
1371
1615
|
ValidityState: false,
|
|
1616
|
+
VideoColorSpace: false,
|
|
1617
|
+
VideoDecoder: false,
|
|
1618
|
+
VideoEncoder: false,
|
|
1619
|
+
VideoFrame: false,
|
|
1620
|
+
VideoPlaybackQuality: false,
|
|
1621
|
+
ViewTimeline: false,
|
|
1622
|
+
ViewTransition: false,
|
|
1623
|
+
VirtualKeyboard: false,
|
|
1624
|
+
VirtualKeyboardGeometryChangeEvent: false,
|
|
1625
|
+
VisibilityStateEntry: false,
|
|
1372
1626
|
visualViewport: false,
|
|
1373
1627
|
VisualViewport: false,
|
|
1374
1628
|
VTTCue: false,
|
|
1629
|
+
VTTRegion: false,
|
|
1630
|
+
WakeLock: false,
|
|
1631
|
+
WakeLockSentinel: false,
|
|
1375
1632
|
WaveShaperNode: false,
|
|
1376
1633
|
WebAssembly: false,
|
|
1377
1634
|
WebGL2RenderingContext: false,
|
|
@@ -1392,10 +1649,20 @@ var require_globals = __commonJS({
|
|
|
1392
1649
|
WebGLUniformLocation: false,
|
|
1393
1650
|
WebGLVertexArrayObject: false,
|
|
1394
1651
|
WebSocket: false,
|
|
1652
|
+
WebTransport: false,
|
|
1653
|
+
WebTransportBidirectionalStream: false,
|
|
1654
|
+
WebTransportDatagramDuplexStream: false,
|
|
1655
|
+
WebTransportError: false,
|
|
1656
|
+
WebTransportReceiveStream: false,
|
|
1657
|
+
WebTransportSendStream: false,
|
|
1658
|
+
WGSLLanguageFeatures: false,
|
|
1395
1659
|
WheelEvent: false,
|
|
1396
1660
|
window: false,
|
|
1397
1661
|
Window: false,
|
|
1662
|
+
WindowControlsOverlay: false,
|
|
1663
|
+
WindowControlsOverlayGeometryChangeEvent: false,
|
|
1398
1664
|
Worker: false,
|
|
1665
|
+
Worklet: false,
|
|
1399
1666
|
WritableStream: false,
|
|
1400
1667
|
WritableStreamDefaultController: false,
|
|
1401
1668
|
WritableStreamDefaultWriter: false,
|
|
@@ -1408,15 +1675,24 @@ var require_globals = __commonJS({
|
|
|
1408
1675
|
XPathExpression: false,
|
|
1409
1676
|
XPathResult: false,
|
|
1410
1677
|
XRAnchor: false,
|
|
1678
|
+
XRAnchorSet: false,
|
|
1411
1679
|
XRBoundedReferenceSpace: false,
|
|
1680
|
+
XRCamera: false,
|
|
1412
1681
|
XRCPUDepthInformation: false,
|
|
1413
1682
|
XRDepthInformation: false,
|
|
1683
|
+
XRDOMOverlayState: false,
|
|
1414
1684
|
XRFrame: false,
|
|
1685
|
+
XRHitTestResult: false,
|
|
1686
|
+
XRHitTestSource: false,
|
|
1415
1687
|
XRInputSource: false,
|
|
1416
1688
|
XRInputSourceArray: false,
|
|
1417
1689
|
XRInputSourceEvent: false,
|
|
1418
1690
|
XRInputSourcesChangeEvent: false,
|
|
1691
|
+
XRLayer: false,
|
|
1692
|
+
XRLightEstimate: false,
|
|
1693
|
+
XRLightProbe: false,
|
|
1419
1694
|
XRPose: false,
|
|
1695
|
+
XRRay: false,
|
|
1420
1696
|
XRReferenceSpace: false,
|
|
1421
1697
|
XRReferenceSpaceEvent: false,
|
|
1422
1698
|
XRRenderState: false,
|
|
@@ -1425,6 +1701,8 @@ var require_globals = __commonJS({
|
|
|
1425
1701
|
XRSessionEvent: false,
|
|
1426
1702
|
XRSpace: false,
|
|
1427
1703
|
XRSystem: false,
|
|
1704
|
+
XRTransientInputHitTestResult: false,
|
|
1705
|
+
XRTransientInputHitTestSource: false,
|
|
1428
1706
|
XRView: false,
|
|
1429
1707
|
XRViewerPose: false,
|
|
1430
1708
|
XRViewport: false,
|
|
@@ -1434,32 +1712,113 @@ var require_globals = __commonJS({
|
|
|
1434
1712
|
XSLTProcessor: false
|
|
1435
1713
|
},
|
|
1436
1714
|
worker: {
|
|
1715
|
+
AbortController: false,
|
|
1716
|
+
AbortSignal: false,
|
|
1437
1717
|
addEventListener: false,
|
|
1438
|
-
applicationCache: false,
|
|
1439
1718
|
atob: false,
|
|
1719
|
+
AudioData: false,
|
|
1720
|
+
AudioDecoder: false,
|
|
1721
|
+
AudioEncoder: false,
|
|
1722
|
+
BackgroundFetchManager: false,
|
|
1723
|
+
BackgroundFetchRecord: false,
|
|
1724
|
+
BackgroundFetchRegistration: false,
|
|
1440
1725
|
Blob: false,
|
|
1441
1726
|
BroadcastChannel: false,
|
|
1442
1727
|
btoa: false,
|
|
1443
1728
|
ByteLengthQueuingStrategy: false,
|
|
1444
1729
|
Cache: false,
|
|
1445
1730
|
caches: false,
|
|
1731
|
+
CacheStorage: false,
|
|
1732
|
+
cancelAnimationFrame: false,
|
|
1733
|
+
CanvasGradient: false,
|
|
1734
|
+
CanvasPattern: false,
|
|
1446
1735
|
clearInterval: false,
|
|
1447
1736
|
clearTimeout: false,
|
|
1448
|
-
close:
|
|
1737
|
+
close: false,
|
|
1738
|
+
CloseEvent: false,
|
|
1449
1739
|
CompressionStream: false,
|
|
1450
1740
|
console: false,
|
|
1451
1741
|
CountQueuingStrategy: false,
|
|
1742
|
+
createImageBitmap: false,
|
|
1743
|
+
CropTarget: false,
|
|
1744
|
+
crossOriginIsolated: false,
|
|
1452
1745
|
crypto: false,
|
|
1453
1746
|
Crypto: false,
|
|
1454
1747
|
CryptoKey: false,
|
|
1748
|
+
CSSSkewX: false,
|
|
1749
|
+
CSSSkewY: false,
|
|
1455
1750
|
CustomEvent: false,
|
|
1456
1751
|
DecompressionStream: false,
|
|
1752
|
+
DedicatedWorkerGlobalScope: false,
|
|
1753
|
+
dispatchEvent: false,
|
|
1754
|
+
DOMException: false,
|
|
1755
|
+
DOMMatrix: false,
|
|
1756
|
+
DOMMatrixReadOnly: false,
|
|
1757
|
+
DOMPoint: false,
|
|
1758
|
+
DOMPointReadOnly: false,
|
|
1759
|
+
DOMQuad: false,
|
|
1760
|
+
DOMRect: false,
|
|
1761
|
+
DOMRectReadOnly: false,
|
|
1762
|
+
DOMStringList: false,
|
|
1763
|
+
EncodedAudioChunk: false,
|
|
1764
|
+
EncodedVideoChunk: false,
|
|
1457
1765
|
ErrorEvent: false,
|
|
1458
1766
|
Event: false,
|
|
1767
|
+
EventSource: false,
|
|
1768
|
+
EventTarget: false,
|
|
1459
1769
|
fetch: false,
|
|
1460
1770
|
File: false,
|
|
1771
|
+
FileList: false,
|
|
1772
|
+
FileReader: false,
|
|
1461
1773
|
FileReaderSync: false,
|
|
1774
|
+
FileSystemDirectoryHandle: false,
|
|
1775
|
+
FileSystemFileHandle: false,
|
|
1776
|
+
FileSystemHandle: false,
|
|
1777
|
+
FileSystemSyncAccessHandle: false,
|
|
1778
|
+
FileSystemWritableFileStream: false,
|
|
1779
|
+
FontFace: false,
|
|
1780
|
+
fonts: false,
|
|
1462
1781
|
FormData: false,
|
|
1782
|
+
GPU: false,
|
|
1783
|
+
GPUAdapter: false,
|
|
1784
|
+
GPUAdapterInfo: false,
|
|
1785
|
+
GPUBindGroup: false,
|
|
1786
|
+
GPUBindGroupLayout: false,
|
|
1787
|
+
GPUBuffer: false,
|
|
1788
|
+
GPUBufferUsage: false,
|
|
1789
|
+
GPUCanvasContext: false,
|
|
1790
|
+
GPUColorWrite: false,
|
|
1791
|
+
GPUCommandBuffer: false,
|
|
1792
|
+
GPUCommandEncoder: false,
|
|
1793
|
+
GPUCompilationInfo: false,
|
|
1794
|
+
GPUCompilationMessage: false,
|
|
1795
|
+
GPUComputePassEncoder: false,
|
|
1796
|
+
GPUComputePipeline: false,
|
|
1797
|
+
GPUDevice: false,
|
|
1798
|
+
GPUDeviceLostInfo: false,
|
|
1799
|
+
GPUError: false,
|
|
1800
|
+
GPUExternalTexture: false,
|
|
1801
|
+
GPUInternalError: false,
|
|
1802
|
+
GPUMapMode: false,
|
|
1803
|
+
GPUOutOfMemoryError: false,
|
|
1804
|
+
GPUPipelineError: false,
|
|
1805
|
+
GPUPipelineLayout: false,
|
|
1806
|
+
GPUQuerySet: false,
|
|
1807
|
+
GPUQueue: false,
|
|
1808
|
+
GPURenderBundle: false,
|
|
1809
|
+
GPURenderBundleEncoder: false,
|
|
1810
|
+
GPURenderPassEncoder: false,
|
|
1811
|
+
GPURenderPipeline: false,
|
|
1812
|
+
GPUSampler: false,
|
|
1813
|
+
GPUShaderModule: false,
|
|
1814
|
+
GPUShaderStage: false,
|
|
1815
|
+
GPUSupportedFeatures: false,
|
|
1816
|
+
GPUSupportedLimits: false,
|
|
1817
|
+
GPUTexture: false,
|
|
1818
|
+
GPUTextureUsage: false,
|
|
1819
|
+
GPUTextureView: false,
|
|
1820
|
+
GPUUncapturedErrorEvent: false,
|
|
1821
|
+
GPUValidationError: false,
|
|
1463
1822
|
Headers: false,
|
|
1464
1823
|
IDBCursor: false,
|
|
1465
1824
|
IDBCursorWithValue: false,
|
|
@@ -1472,37 +1831,61 @@ var require_globals = __commonJS({
|
|
|
1472
1831
|
IDBRequest: false,
|
|
1473
1832
|
IDBTransaction: false,
|
|
1474
1833
|
IDBVersionChangeEvent: false,
|
|
1834
|
+
IdleDetector: false,
|
|
1835
|
+
ImageBitmap: false,
|
|
1836
|
+
ImageBitmapRenderingContext: false,
|
|
1475
1837
|
ImageData: false,
|
|
1476
|
-
|
|
1838
|
+
ImageDecoder: false,
|
|
1839
|
+
ImageTrack: false,
|
|
1840
|
+
ImageTrackList: false,
|
|
1841
|
+
importScripts: false,
|
|
1477
1842
|
indexedDB: false,
|
|
1843
|
+
isSecureContext: false,
|
|
1844
|
+
Iterator: false,
|
|
1478
1845
|
location: false,
|
|
1846
|
+
Lock: false,
|
|
1847
|
+
LockManager: false,
|
|
1848
|
+
MediaCapabilities: false,
|
|
1849
|
+
MediaSource: false,
|
|
1850
|
+
MediaSourceHandle: false,
|
|
1479
1851
|
MessageChannel: false,
|
|
1480
1852
|
MessageEvent: false,
|
|
1481
1853
|
MessagePort: false,
|
|
1482
1854
|
name: false,
|
|
1855
|
+
NavigationPreloadManager: false,
|
|
1483
1856
|
navigator: false,
|
|
1857
|
+
NavigatorUAData: false,
|
|
1858
|
+
NetworkInformation: false,
|
|
1484
1859
|
Notification: false,
|
|
1485
|
-
|
|
1486
|
-
|
|
1860
|
+
OffscreenCanvas: false,
|
|
1861
|
+
OffscreenCanvasRenderingContext2D: false,
|
|
1487
1862
|
onerror: true,
|
|
1488
1863
|
onlanguagechange: true,
|
|
1489
1864
|
onmessage: true,
|
|
1490
|
-
|
|
1491
|
-
ononline: true,
|
|
1865
|
+
onmessageerror: true,
|
|
1492
1866
|
onrejectionhandled: true,
|
|
1493
1867
|
onunhandledrejection: true,
|
|
1868
|
+
origin: false,
|
|
1869
|
+
Path2D: false,
|
|
1494
1870
|
performance: false,
|
|
1495
1871
|
Performance: false,
|
|
1496
1872
|
PerformanceEntry: false,
|
|
1497
1873
|
PerformanceMark: false,
|
|
1498
1874
|
PerformanceMeasure: false,
|
|
1499
|
-
PerformanceNavigation: false,
|
|
1500
1875
|
PerformanceObserver: false,
|
|
1501
1876
|
PerformanceObserverEntryList: false,
|
|
1502
1877
|
PerformanceResourceTiming: false,
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1878
|
+
PerformanceServerTiming: false,
|
|
1879
|
+
PeriodicSyncManager: false,
|
|
1880
|
+
Permissions: false,
|
|
1881
|
+
PermissionStatus: false,
|
|
1882
|
+
PERSISTENT: false,
|
|
1883
|
+
postMessage: false,
|
|
1884
|
+
ProgressEvent: false,
|
|
1885
|
+
PromiseRejectionEvent: false,
|
|
1886
|
+
PushManager: false,
|
|
1887
|
+
PushSubscription: false,
|
|
1888
|
+
PushSubscriptionOptions: false,
|
|
1506
1889
|
queueMicrotask: false,
|
|
1507
1890
|
ReadableByteStreamController: false,
|
|
1508
1891
|
ReadableStream: false,
|
|
@@ -1512,29 +1895,105 @@ var require_globals = __commonJS({
|
|
|
1512
1895
|
ReadableStreamDefaultReader: false,
|
|
1513
1896
|
removeEventListener: false,
|
|
1514
1897
|
reportError: false,
|
|
1898
|
+
ReportingObserver: false,
|
|
1515
1899
|
Request: false,
|
|
1900
|
+
requestAnimationFrame: false,
|
|
1516
1901
|
Response: false,
|
|
1517
|
-
|
|
1902
|
+
RTCEncodedAudioFrame: false,
|
|
1903
|
+
RTCEncodedVideoFrame: false,
|
|
1904
|
+
scheduler: false,
|
|
1905
|
+
Scheduler: false,
|
|
1906
|
+
SecurityPolicyViolationEvent: false,
|
|
1907
|
+
self: false,
|
|
1908
|
+
Serial: false,
|
|
1909
|
+
SerialPort: false,
|
|
1518
1910
|
ServiceWorkerRegistration: false,
|
|
1519
1911
|
setInterval: false,
|
|
1520
1912
|
setTimeout: false,
|
|
1913
|
+
SourceBuffer: false,
|
|
1914
|
+
SourceBufferList: false,
|
|
1915
|
+
StorageBucket: false,
|
|
1916
|
+
StorageBucketManager: false,
|
|
1917
|
+
StorageManager: false,
|
|
1918
|
+
structuredClone: false,
|
|
1521
1919
|
SubtleCrypto: false,
|
|
1920
|
+
SyncManager: false,
|
|
1921
|
+
TaskController: false,
|
|
1922
|
+
TaskPriorityChangeEvent: false,
|
|
1923
|
+
TaskSignal: false,
|
|
1924
|
+
TEMPORARY: false,
|
|
1522
1925
|
TextDecoder: false,
|
|
1523
1926
|
TextDecoderStream: false,
|
|
1524
1927
|
TextEncoder: false,
|
|
1525
1928
|
TextEncoderStream: false,
|
|
1929
|
+
TextMetrics: false,
|
|
1526
1930
|
TransformStream: false,
|
|
1527
1931
|
TransformStreamDefaultController: false,
|
|
1932
|
+
TrustedHTML: false,
|
|
1933
|
+
TrustedScript: false,
|
|
1934
|
+
TrustedScriptURL: false,
|
|
1935
|
+
TrustedTypePolicy: false,
|
|
1936
|
+
TrustedTypePolicyFactory: false,
|
|
1937
|
+
trustedTypes: false,
|
|
1528
1938
|
URL: false,
|
|
1939
|
+
URLPattern: false,
|
|
1529
1940
|
URLSearchParams: false,
|
|
1941
|
+
USB: false,
|
|
1942
|
+
USBAlternateInterface: false,
|
|
1943
|
+
USBConfiguration: false,
|
|
1944
|
+
USBConnectionEvent: false,
|
|
1945
|
+
USBDevice: false,
|
|
1946
|
+
USBEndpoint: false,
|
|
1947
|
+
USBInterface: false,
|
|
1948
|
+
USBInTransferResult: false,
|
|
1949
|
+
USBIsochronousInTransferPacket: false,
|
|
1950
|
+
USBIsochronousInTransferResult: false,
|
|
1951
|
+
USBIsochronousOutTransferPacket: false,
|
|
1952
|
+
USBIsochronousOutTransferResult: false,
|
|
1953
|
+
USBOutTransferResult: false,
|
|
1954
|
+
UserActivation: false,
|
|
1955
|
+
VideoColorSpace: false,
|
|
1956
|
+
VideoDecoder: false,
|
|
1957
|
+
VideoEncoder: false,
|
|
1958
|
+
VideoFrame: false,
|
|
1530
1959
|
WebAssembly: false,
|
|
1960
|
+
WebGL2RenderingContext: false,
|
|
1961
|
+
WebGLActiveInfo: false,
|
|
1962
|
+
WebGLBuffer: false,
|
|
1963
|
+
WebGLContextEvent: false,
|
|
1964
|
+
WebGLFramebuffer: false,
|
|
1965
|
+
WebGLProgram: false,
|
|
1966
|
+
WebGLQuery: false,
|
|
1967
|
+
WebGLRenderbuffer: false,
|
|
1968
|
+
WebGLRenderingContext: false,
|
|
1969
|
+
WebGLSampler: false,
|
|
1970
|
+
WebGLShader: false,
|
|
1971
|
+
WebGLShaderPrecisionFormat: false,
|
|
1972
|
+
WebGLSync: false,
|
|
1973
|
+
WebGLTexture: false,
|
|
1974
|
+
WebGLTransformFeedback: false,
|
|
1975
|
+
WebGLUniformLocation: false,
|
|
1976
|
+
WebGLVertexArrayObject: false,
|
|
1977
|
+
webkitRequestFileSystem: false,
|
|
1978
|
+
webkitRequestFileSystemSync: false,
|
|
1979
|
+
webkitResolveLocalFileSystemSyncURL: false,
|
|
1980
|
+
webkitResolveLocalFileSystemURL: false,
|
|
1531
1981
|
WebSocket: false,
|
|
1982
|
+
WebTransport: false,
|
|
1983
|
+
WebTransportBidirectionalStream: false,
|
|
1984
|
+
WebTransportDatagramDuplexStream: false,
|
|
1985
|
+
WebTransportError: false,
|
|
1986
|
+
WGSLLanguageFeatures: false,
|
|
1532
1987
|
Worker: false,
|
|
1533
1988
|
WorkerGlobalScope: false,
|
|
1989
|
+
WorkerLocation: false,
|
|
1990
|
+
WorkerNavigator: false,
|
|
1534
1991
|
WritableStream: false,
|
|
1535
1992
|
WritableStreamDefaultController: false,
|
|
1536
1993
|
WritableStreamDefaultWriter: false,
|
|
1537
|
-
XMLHttpRequest: false
|
|
1994
|
+
XMLHttpRequest: false,
|
|
1995
|
+
XMLHttpRequestEventTarget: false,
|
|
1996
|
+
XMLHttpRequestUpload: false
|
|
1538
1997
|
},
|
|
1539
1998
|
node: {
|
|
1540
1999
|
__dirname: false,
|
|
@@ -1567,12 +2026,14 @@ var require_globals = __commonJS({
|
|
|
1567
2026
|
FormData: false,
|
|
1568
2027
|
global: false,
|
|
1569
2028
|
Headers: false,
|
|
1570
|
-
Intl: false,
|
|
1571
2029
|
MessageChannel: false,
|
|
1572
2030
|
MessageEvent: false,
|
|
1573
2031
|
MessagePort: false,
|
|
1574
2032
|
module: false,
|
|
2033
|
+
navigator: false,
|
|
2034
|
+
Navigator: false,
|
|
1575
2035
|
performance: false,
|
|
2036
|
+
Performance: false,
|
|
1576
2037
|
PerformanceEntry: false,
|
|
1577
2038
|
PerformanceMark: false,
|
|
1578
2039
|
PerformanceMeasure: false,
|
|
@@ -1636,11 +2097,13 @@ var require_globals = __commonJS({
|
|
|
1636
2097
|
FormData: false,
|
|
1637
2098
|
global: false,
|
|
1638
2099
|
Headers: false,
|
|
1639
|
-
Intl: false,
|
|
1640
2100
|
MessageChannel: false,
|
|
1641
2101
|
MessageEvent: false,
|
|
1642
2102
|
MessagePort: false,
|
|
2103
|
+
navigator: false,
|
|
2104
|
+
Navigator: false,
|
|
1643
2105
|
performance: false,
|
|
2106
|
+
Performance: false,
|
|
1644
2107
|
PerformanceEntry: false,
|
|
1645
2108
|
PerformanceMark: false,
|
|
1646
2109
|
PerformanceMeasure: false,
|
|
@@ -1737,12 +2200,9 @@ var require_globals = __commonJS({
|
|
|
1737
2200
|
beforeEach: false,
|
|
1738
2201
|
describe: false,
|
|
1739
2202
|
expect: false,
|
|
1740
|
-
fdescribe: false,
|
|
1741
2203
|
fit: false,
|
|
1742
2204
|
it: false,
|
|
1743
2205
|
jest: false,
|
|
1744
|
-
pit: false,
|
|
1745
|
-
require: false,
|
|
1746
2206
|
test: false,
|
|
1747
2207
|
xdescribe: false,
|
|
1748
2208
|
xit: false,
|
|
@@ -1871,6 +2331,7 @@ var require_globals = __commonJS({
|
|
|
1871
2331
|
exit: false,
|
|
1872
2332
|
find: false,
|
|
1873
2333
|
grep: false,
|
|
2334
|
+
head: false,
|
|
1874
2335
|
ln: false,
|
|
1875
2336
|
ls: false,
|
|
1876
2337
|
mkdir: false,
|
|
@@ -1881,10 +2342,13 @@ var require_globals = __commonJS({
|
|
|
1881
2342
|
rm: false,
|
|
1882
2343
|
sed: false,
|
|
1883
2344
|
set: false,
|
|
1884
|
-
|
|
2345
|
+
ShellString: false,
|
|
2346
|
+
sort: false,
|
|
2347
|
+
tail: false,
|
|
1885
2348
|
tempdir: false,
|
|
1886
2349
|
test: false,
|
|
1887
2350
|
touch: false,
|
|
2351
|
+
uniq: false,
|
|
1888
2352
|
which: false
|
|
1889
2353
|
},
|
|
1890
2354
|
prototypejs: {
|
|
@@ -2100,7 +2564,6 @@ var require_globals = __commonJS({
|
|
|
2100
2564
|
PerformanceResourceTiming: false,
|
|
2101
2565
|
PerformanceTiming: false,
|
|
2102
2566
|
postMessage: true,
|
|
2103
|
-
Promise: false,
|
|
2104
2567
|
queueMicrotask: false,
|
|
2105
2568
|
ReadableByteStreamController: false,
|
|
2106
2569
|
ReadableStream: false,
|
|
@@ -2202,11 +2665,13 @@ var require_globals = __commonJS({
|
|
|
2202
2665
|
File: false,
|
|
2203
2666
|
FormData: false,
|
|
2204
2667
|
Headers: false,
|
|
2205
|
-
Intl: false,
|
|
2206
2668
|
MessageChannel: false,
|
|
2207
2669
|
MessageEvent: false,
|
|
2208
2670
|
MessagePort: false,
|
|
2671
|
+
navigator: false,
|
|
2672
|
+
Navigator: false,
|
|
2209
2673
|
performance: false,
|
|
2674
|
+
Performance: false,
|
|
2210
2675
|
PerformanceEntry: false,
|
|
2211
2676
|
PerformanceMark: false,
|
|
2212
2677
|
PerformanceMeasure: false,
|
|
@@ -2307,9 +2772,9 @@ var require_globals = __commonJS({
|
|
|
2307
2772
|
}
|
|
2308
2773
|
});
|
|
2309
2774
|
|
|
2310
|
-
// node_modules/.pnpm/globals@
|
|
2775
|
+
// node_modules/.pnpm/globals@15.0.0/node_modules/globals/index.js
|
|
2311
2776
|
var require_globals2 = __commonJS({
|
|
2312
|
-
"node_modules/.pnpm/globals@
|
|
2777
|
+
"node_modules/.pnpm/globals@15.0.0/node_modules/globals/index.js"(exports, module) {
|
|
2313
2778
|
"use strict";
|
|
2314
2779
|
module.exports = require_globals();
|
|
2315
2780
|
}
|
|
@@ -2320,41 +2785,40 @@ var pluginSortKeys = __toESM(require_eslint_plugin_sort_keys(), 1);
|
|
|
2320
2785
|
import { default as default2 } from "@stylistic/eslint-plugin";
|
|
2321
2786
|
import { default as default3 } from "@typescript-eslint/eslint-plugin";
|
|
2322
2787
|
import * as parserTs from "@typescript-eslint/parser";
|
|
2323
|
-
import { default as default4 } from "eslint-plugin-
|
|
2788
|
+
import { default as default4 } from "eslint-plugin-antfu";
|
|
2789
|
+
import { default as default5 } from "eslint-plugin-eslint-comments";
|
|
2324
2790
|
import * as pluginImport from "eslint-plugin-i";
|
|
2325
|
-
import { default as
|
|
2791
|
+
import { default as default6 } from "eslint-plugin-jsdoc";
|
|
2326
2792
|
import * as pluginJsonc from "eslint-plugin-jsonc";
|
|
2327
|
-
import { default as
|
|
2328
|
-
import { default as
|
|
2329
|
-
import { default as
|
|
2330
|
-
import { default as
|
|
2793
|
+
import { default as default7 } from "eslint-plugin-markdown";
|
|
2794
|
+
import { default as default8 } from "eslint-plugin-n";
|
|
2795
|
+
import { default as default9 } from "eslint-plugin-no-only-tests";
|
|
2796
|
+
import { default as default10 } from "eslint-plugin-perfectionist";
|
|
2797
|
+
import { default as default11 } from "eslint-plugin-react";
|
|
2798
|
+
import { default as default12 } from "eslint-plugin-react-hooks";
|
|
2331
2799
|
import * as pluginReactRefresh from "eslint-plugin-react-refresh";
|
|
2332
|
-
import { default as
|
|
2333
|
-
import { default as
|
|
2334
|
-
import { default as
|
|
2335
|
-
import { default as
|
|
2336
|
-
import { default as
|
|
2337
|
-
import { default as default15 } from "eslint-plugin-markdown";
|
|
2338
|
-
import { default as default16 } from "eslint-plugin-perfectionist";
|
|
2800
|
+
import { default as default13 } from "eslint-plugin-tailwindcss";
|
|
2801
|
+
import { default as default14 } from "eslint-plugin-unicorn";
|
|
2802
|
+
import { default as default15 } from "eslint-plugin-unused-imports";
|
|
2803
|
+
import { default as default16 } from "eslint-plugin-vitest";
|
|
2804
|
+
import { default as default17 } from "jsonc-eslint-parser";
|
|
2339
2805
|
|
|
2340
2806
|
// src/configs/comments.ts
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
"eslint-comments/no-unused-enable": "error"
|
|
2354
|
-
}
|
|
2807
|
+
var comments = async () => [
|
|
2808
|
+
{
|
|
2809
|
+
name: "jsse:eslint-comments",
|
|
2810
|
+
plugins: {
|
|
2811
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
2812
|
+
"eslint-comments": default5
|
|
2813
|
+
},
|
|
2814
|
+
rules: {
|
|
2815
|
+
"eslint-comments/no-aggregating-enable": "error",
|
|
2816
|
+
"eslint-comments/no-duplicate-disable": "error",
|
|
2817
|
+
"eslint-comments/no-unlimited-disable": "error",
|
|
2818
|
+
"eslint-comments/no-unused-enable": "error"
|
|
2355
2819
|
}
|
|
2356
|
-
|
|
2357
|
-
|
|
2820
|
+
}
|
|
2821
|
+
];
|
|
2358
2822
|
|
|
2359
2823
|
// src/globs.ts
|
|
2360
2824
|
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
@@ -2425,17 +2889,17 @@ var GLOB_EXCLUDE = [
|
|
|
2425
2889
|
];
|
|
2426
2890
|
|
|
2427
2891
|
// src/configs/ignores.ts
|
|
2428
|
-
|
|
2892
|
+
var ignores = async () => {
|
|
2429
2893
|
return [
|
|
2430
2894
|
{
|
|
2431
2895
|
ignores: GLOB_EXCLUDE
|
|
2432
2896
|
}
|
|
2433
2897
|
];
|
|
2434
|
-
}
|
|
2898
|
+
};
|
|
2435
2899
|
|
|
2436
2900
|
// src/configs/imports.ts
|
|
2437
|
-
|
|
2438
|
-
const { stylistic: stylistic2 = true } = options;
|
|
2901
|
+
var imports = async (options) => {
|
|
2902
|
+
const { stylistic: stylistic2 = true } = options ?? {};
|
|
2439
2903
|
return [
|
|
2440
2904
|
{
|
|
2441
2905
|
name: "jsse:imports",
|
|
@@ -2460,13 +2924,17 @@ function imports(options = {}) {
|
|
|
2460
2924
|
}
|
|
2461
2925
|
}
|
|
2462
2926
|
];
|
|
2463
|
-
}
|
|
2927
|
+
};
|
|
2464
2928
|
|
|
2465
2929
|
// src/configs/javascript.ts
|
|
2466
2930
|
var import_globals = __toESM(require_globals2(), 1);
|
|
2467
2931
|
import eslintjs from "@eslint/js";
|
|
2468
|
-
|
|
2469
|
-
const {
|
|
2932
|
+
var javascript = async (options) => {
|
|
2933
|
+
const {
|
|
2934
|
+
isInEditor: isInEditor2 = false,
|
|
2935
|
+
overrides = {},
|
|
2936
|
+
reportUnusedDisableDirectives = true
|
|
2937
|
+
} = options ?? {};
|
|
2470
2938
|
return [
|
|
2471
2939
|
{
|
|
2472
2940
|
languageOptions: {
|
|
@@ -2489,12 +2957,12 @@ function javascript(options = {}) {
|
|
|
2489
2957
|
sourceType: "module"
|
|
2490
2958
|
},
|
|
2491
2959
|
linterOptions: {
|
|
2492
|
-
reportUnusedDisableDirectives
|
|
2960
|
+
reportUnusedDisableDirectives
|
|
2493
2961
|
},
|
|
2494
2962
|
name: "jsse:javascript",
|
|
2495
2963
|
plugins: {
|
|
2496
2964
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
2497
|
-
"unused-imports":
|
|
2965
|
+
"unused-imports": default15
|
|
2498
2966
|
},
|
|
2499
2967
|
rules: {
|
|
2500
2968
|
...eslintjs.configs.recommended.rules,
|
|
@@ -2717,16 +3185,16 @@ function javascript(options = {}) {
|
|
|
2717
3185
|
}
|
|
2718
3186
|
}
|
|
2719
3187
|
];
|
|
2720
|
-
}
|
|
3188
|
+
};
|
|
2721
3189
|
|
|
2722
3190
|
// src/configs/jsdoc.ts
|
|
2723
|
-
|
|
3191
|
+
var jsdoc = async () => {
|
|
2724
3192
|
return [
|
|
2725
3193
|
{
|
|
2726
3194
|
name: "jsse:jsdoc",
|
|
2727
3195
|
plugins: {
|
|
2728
3196
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
2729
|
-
jsdoc:
|
|
3197
|
+
jsdoc: default6
|
|
2730
3198
|
},
|
|
2731
3199
|
rules: {
|
|
2732
3200
|
"jsdoc/check-access": "warn",
|
|
@@ -2749,11 +3217,11 @@ function jsdoc() {
|
|
|
2749
3217
|
}
|
|
2750
3218
|
}
|
|
2751
3219
|
];
|
|
2752
|
-
}
|
|
3220
|
+
};
|
|
2753
3221
|
|
|
2754
3222
|
// src/configs/jsonc.ts
|
|
2755
|
-
|
|
2756
|
-
const { overrides = {}, stylistic: stylistic2 = true } = options;
|
|
3223
|
+
var jsonc = async (options) => {
|
|
3224
|
+
const { overrides = {}, stylistic: stylistic2 = true } = options ?? {};
|
|
2757
3225
|
const { indent = 2 } = typeof stylistic2 === "boolean" ? {} : stylistic2;
|
|
2758
3226
|
return [
|
|
2759
3227
|
{
|
|
@@ -2766,7 +3234,7 @@ function jsonc(options = {}) {
|
|
|
2766
3234
|
{
|
|
2767
3235
|
files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
|
|
2768
3236
|
languageOptions: {
|
|
2769
|
-
parser:
|
|
3237
|
+
parser: default17
|
|
2770
3238
|
},
|
|
2771
3239
|
name: "jsse:jsonc:rules",
|
|
2772
3240
|
rules: {
|
|
@@ -2821,30 +3289,43 @@ function jsonc(options = {}) {
|
|
|
2821
3289
|
}
|
|
2822
3290
|
}
|
|
2823
3291
|
];
|
|
2824
|
-
}
|
|
3292
|
+
};
|
|
2825
3293
|
|
|
2826
3294
|
// src/configs/n.ts
|
|
2827
|
-
|
|
3295
|
+
var n = async () => {
|
|
2828
3296
|
return [
|
|
2829
3297
|
{
|
|
2830
3298
|
name: "jsse:n",
|
|
2831
3299
|
plugins: {
|
|
2832
3300
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
2833
|
-
|
|
3301
|
+
n: default8
|
|
2834
3302
|
},
|
|
2835
3303
|
rules: {
|
|
2836
|
-
"
|
|
2837
|
-
"
|
|
2838
|
-
"
|
|
2839
|
-
"
|
|
2840
|
-
"
|
|
2841
|
-
"
|
|
2842
|
-
"
|
|
2843
|
-
"
|
|
3304
|
+
"n/handle-callback-err": ["error", "^(err|error)$"],
|
|
3305
|
+
"n/no-deprecated-api": "error",
|
|
3306
|
+
"n/no-exports-assign": "error",
|
|
3307
|
+
"n/no-new-require": "error",
|
|
3308
|
+
"n/no-path-concat": "error",
|
|
3309
|
+
"n/prefer-global/buffer": ["error", "never"],
|
|
3310
|
+
"n/prefer-global/process": ["error", "never"],
|
|
3311
|
+
"n/process-exit-as-throw": "error"
|
|
2844
3312
|
}
|
|
2845
3313
|
}
|
|
2846
3314
|
];
|
|
2847
|
-
}
|
|
3315
|
+
};
|
|
3316
|
+
|
|
3317
|
+
// src/configs/perfectionist.ts
|
|
3318
|
+
var perfectionist = async () => {
|
|
3319
|
+
return [
|
|
3320
|
+
{
|
|
3321
|
+
name: "jsse:perfectionist",
|
|
3322
|
+
plugins: {
|
|
3323
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
3324
|
+
perfectionist: default10
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
];
|
|
3328
|
+
};
|
|
2848
3329
|
|
|
2849
3330
|
// src/configs/prettier.ts
|
|
2850
3331
|
function eslintConfigPrettierRules() {
|
|
@@ -2961,16 +3442,14 @@ function eslintConfigPrettierRules() {
|
|
|
2961
3442
|
"yield-star-spacing": "off"
|
|
2962
3443
|
};
|
|
2963
3444
|
}
|
|
2964
|
-
|
|
3445
|
+
var prettier = async () => {
|
|
2965
3446
|
return [
|
|
2966
3447
|
{
|
|
2967
3448
|
name: "jsse:prettier",
|
|
2968
|
-
rules:
|
|
2969
|
-
...eslintConfigPrettierRules()
|
|
2970
|
-
}
|
|
3449
|
+
rules: eslintConfigPrettierRules()
|
|
2971
3450
|
}
|
|
2972
3451
|
];
|
|
2973
|
-
}
|
|
3452
|
+
};
|
|
2974
3453
|
|
|
2975
3454
|
// src/configs/ts/typescript-language-options.ts
|
|
2976
3455
|
import process2 from "process";
|
|
@@ -3174,7 +3653,7 @@ function reactHooks() {
|
|
|
3174
3653
|
{
|
|
3175
3654
|
files: [GLOB_SRC],
|
|
3176
3655
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
3177
|
-
plugins: { "react-hooks":
|
|
3656
|
+
plugins: { "react-hooks": default12 },
|
|
3178
3657
|
rules: {
|
|
3179
3658
|
"react-hooks/exhaustive-deps": "error",
|
|
3180
3659
|
"react-hooks/rules-of-hooks": "error"
|
|
@@ -3229,7 +3708,7 @@ function reactRecomendedRules() {
|
|
|
3229
3708
|
"react/require-render-return": 2
|
|
3230
3709
|
};
|
|
3231
3710
|
}
|
|
3232
|
-
|
|
3711
|
+
var react = async (options) => {
|
|
3233
3712
|
const {
|
|
3234
3713
|
componentExts,
|
|
3235
3714
|
parserOptions = {},
|
|
@@ -3249,9 +3728,9 @@ function react(options) {
|
|
|
3249
3728
|
name: "jsse:react:setup",
|
|
3250
3729
|
plugins: {
|
|
3251
3730
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
3252
|
-
react:
|
|
3731
|
+
react: default11,
|
|
3253
3732
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
3254
|
-
"react-hooks":
|
|
3733
|
+
"react-hooks": default12
|
|
3255
3734
|
}
|
|
3256
3735
|
},
|
|
3257
3736
|
{
|
|
@@ -3260,7 +3739,7 @@ function react(options) {
|
|
|
3260
3739
|
rules: {
|
|
3261
3740
|
...reactRecomendedRules(),
|
|
3262
3741
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
3263
|
-
...
|
|
3742
|
+
...default11.configs["jsx-runtime"].rules,
|
|
3264
3743
|
...reactRules()
|
|
3265
3744
|
},
|
|
3266
3745
|
settings: {
|
|
@@ -3274,10 +3753,10 @@ function react(options) {
|
|
|
3274
3753
|
config.push(...reactRefreshFlatConfigs());
|
|
3275
3754
|
}
|
|
3276
3755
|
return config;
|
|
3277
|
-
}
|
|
3756
|
+
};
|
|
3278
3757
|
|
|
3279
3758
|
// src/configs/sort.ts
|
|
3280
|
-
|
|
3759
|
+
var sortPackageJson = async () => {
|
|
3281
3760
|
return [
|
|
3282
3761
|
{
|
|
3283
3762
|
files: ["**/package.json"],
|
|
@@ -3360,8 +3839,8 @@ function sortPackageJson() {
|
|
|
3360
3839
|
}
|
|
3361
3840
|
}
|
|
3362
3841
|
];
|
|
3363
|
-
}
|
|
3364
|
-
|
|
3842
|
+
};
|
|
3843
|
+
var sortTsconfig = async () => {
|
|
3365
3844
|
return [
|
|
3366
3845
|
{
|
|
3367
3846
|
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
@@ -3485,7 +3964,7 @@ function sortTsconfig() {
|
|
|
3485
3964
|
}
|
|
3486
3965
|
}
|
|
3487
3966
|
];
|
|
3488
|
-
}
|
|
3967
|
+
};
|
|
3489
3968
|
|
|
3490
3969
|
// src/utils.ts
|
|
3491
3970
|
import process3 from "process";
|
|
@@ -3494,6 +3973,12 @@ function combine(...configs) {
|
|
|
3494
3973
|
(config) => Array.isArray(config) ? config : [config]
|
|
3495
3974
|
);
|
|
3496
3975
|
}
|
|
3976
|
+
async function combineAsync(...configs) {
|
|
3977
|
+
const resolved = await Promise.all(configs);
|
|
3978
|
+
return resolved.flatMap(
|
|
3979
|
+
(config) => Array.isArray(config) ? config : [config]
|
|
3980
|
+
);
|
|
3981
|
+
}
|
|
3497
3982
|
function renameRules(rules, from, to) {
|
|
3498
3983
|
if (from === to) {
|
|
3499
3984
|
return rules;
|
|
@@ -3519,14 +4004,15 @@ function isInEditor() {
|
|
|
3519
4004
|
}
|
|
3520
4005
|
|
|
3521
4006
|
// src/configs/test.ts
|
|
3522
|
-
|
|
4007
|
+
var test = async (options = {}) => {
|
|
3523
4008
|
const { isInEditor: isInEditor2 = false, overrides = {} } = options;
|
|
3524
4009
|
return [
|
|
3525
4010
|
{
|
|
3526
4011
|
name: "jsse:test:setup",
|
|
3527
4012
|
plugins: {
|
|
3528
|
-
|
|
3529
|
-
|
|
4013
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
4014
|
+
"no-only-tests": default9,
|
|
4015
|
+
vitest: default16
|
|
3530
4016
|
}
|
|
3531
4017
|
},
|
|
3532
4018
|
{
|
|
@@ -3546,7 +4032,7 @@ function test(options = {}) {
|
|
|
3546
4032
|
}
|
|
3547
4033
|
}
|
|
3548
4034
|
];
|
|
3549
|
-
}
|
|
4035
|
+
};
|
|
3550
4036
|
|
|
3551
4037
|
// src/configs/ts/typescript-rules.ts
|
|
3552
4038
|
function typescriptRulesTypeAware() {
|
|
@@ -3608,6 +4094,7 @@ function typescriptRulesTypeAware() {
|
|
|
3608
4094
|
"accessor",
|
|
3609
4095
|
"enumMember"
|
|
3610
4096
|
],
|
|
4097
|
+
// eslint-disable-next-line unicorn/no-null
|
|
3611
4098
|
format: null,
|
|
3612
4099
|
modifiers: ["requiresQuotes"]
|
|
3613
4100
|
},
|
|
@@ -3978,7 +4465,7 @@ function typescriptRules(props) {
|
|
|
3978
4465
|
}
|
|
3979
4466
|
|
|
3980
4467
|
// src/configs/ts/typescript.ts
|
|
3981
|
-
async
|
|
4468
|
+
var typescript = async (options) => {
|
|
3982
4469
|
const {
|
|
3983
4470
|
componentExts = [],
|
|
3984
4471
|
overrides = {},
|
|
@@ -4026,7 +4513,7 @@ async function typescript(options) {
|
|
|
4026
4513
|
// only apply ts rules to ts files!
|
|
4027
4514
|
files: [GLOB_TS, GLOB_TSX, ...componentExts.map((ext) => `**/*.${ext}`)],
|
|
4028
4515
|
name: "jsse:typescript:rules",
|
|
4029
|
-
rules: renameRules(tsrules, tsPrefix, tsPrefixTo)
|
|
4516
|
+
rules: renameRules(tsrules || {}, tsPrefix, tsPrefixTo)
|
|
4030
4517
|
},
|
|
4031
4518
|
{
|
|
4032
4519
|
files: ["**/*.d.ts"],
|
|
@@ -4054,7 +4541,7 @@ async function typescript(options) {
|
|
|
4054
4541
|
}
|
|
4055
4542
|
}
|
|
4056
4543
|
];
|
|
4057
|
-
}
|
|
4544
|
+
};
|
|
4058
4545
|
|
|
4059
4546
|
// src/configs/unicorn.ts
|
|
4060
4547
|
function unicornOff() {
|
|
@@ -4073,15 +4560,19 @@ function unicornOff() {
|
|
|
4073
4560
|
// Super insanely annoying rule
|
|
4074
4561
|
};
|
|
4075
4562
|
}
|
|
4076
|
-
function
|
|
4563
|
+
function unicornRecommended() {
|
|
4564
|
+
return default14.configs.recommended.rules;
|
|
4565
|
+
}
|
|
4566
|
+
var unicorn = async () => {
|
|
4077
4567
|
return [
|
|
4078
4568
|
{
|
|
4079
4569
|
name: "jsse:unicorn",
|
|
4080
4570
|
plugins: {
|
|
4081
4571
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
4082
|
-
unicorn:
|
|
4572
|
+
unicorn: default14
|
|
4083
4573
|
},
|
|
4084
4574
|
rules: {
|
|
4575
|
+
...unicornRecommended(),
|
|
4085
4576
|
...unicornOff(),
|
|
4086
4577
|
"unicorn/better-regex": "error",
|
|
4087
4578
|
"unicorn/custom-error-definition": "error",
|
|
@@ -4154,23 +4645,11 @@ function unicorn() {
|
|
|
4154
4645
|
}
|
|
4155
4646
|
}
|
|
4156
4647
|
];
|
|
4157
|
-
}
|
|
4158
|
-
|
|
4159
|
-
// src/configs/perfectionist.ts
|
|
4160
|
-
function perfectionist() {
|
|
4161
|
-
return [
|
|
4162
|
-
{
|
|
4163
|
-
name: "jsse:perfectionist",
|
|
4164
|
-
plugins: {
|
|
4165
|
-
perfectionist: default16
|
|
4166
|
-
}
|
|
4167
|
-
}
|
|
4168
|
-
];
|
|
4169
|
-
}
|
|
4648
|
+
};
|
|
4170
4649
|
|
|
4171
4650
|
// src/factory.ts
|
|
4172
4651
|
import fs2 from "fs";
|
|
4173
|
-
import
|
|
4652
|
+
import process5 from "process";
|
|
4174
4653
|
|
|
4175
4654
|
// node_modules/.pnpm/local-pkg@0.5.0/node_modules/local-pkg/dist/index.mjs
|
|
4176
4655
|
import path3, { dirname as dirname3, win32, join as join2 } from "path";
|
|
@@ -4422,8 +4901,8 @@ var Position = function Position2(line, col) {
|
|
|
4422
4901
|
this.line = line;
|
|
4423
4902
|
this.column = col;
|
|
4424
4903
|
};
|
|
4425
|
-
Position.prototype.offset = function offset(
|
|
4426
|
-
return new Position(this.line, this.column +
|
|
4904
|
+
Position.prototype.offset = function offset(n2) {
|
|
4905
|
+
return new Position(this.line, this.column + n2);
|
|
4427
4906
|
};
|
|
4428
4907
|
var SourceLocation = function SourceLocation2(p, start, end) {
|
|
4429
4908
|
this.start = start;
|
|
@@ -4659,9 +5138,9 @@ var Parser = function Parser2(options, input, startPos) {
|
|
|
4659
5138
|
};
|
|
4660
5139
|
var prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } };
|
|
4661
5140
|
Parser.prototype.parse = function parse() {
|
|
4662
|
-
var
|
|
5141
|
+
var node = this.options.program || this.startNode();
|
|
4663
5142
|
this.nextToken();
|
|
4664
|
-
return this.parseTopLevel(
|
|
5143
|
+
return this.parseTopLevel(node);
|
|
4665
5144
|
};
|
|
4666
5145
|
prototypeAccessors.inFunction.get = function() {
|
|
4667
5146
|
return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
|
|
@@ -4856,14 +5335,14 @@ pp$9.isSimpleAssignTarget = function(expr) {
|
|
|
4856
5335
|
return expr.type === "Identifier" || expr.type === "MemberExpression";
|
|
4857
5336
|
};
|
|
4858
5337
|
var pp$8 = Parser.prototype;
|
|
4859
|
-
pp$8.parseTopLevel = function(
|
|
5338
|
+
pp$8.parseTopLevel = function(node) {
|
|
4860
5339
|
var exports = /* @__PURE__ */ Object.create(null);
|
|
4861
|
-
if (!
|
|
4862
|
-
|
|
5340
|
+
if (!node.body) {
|
|
5341
|
+
node.body = [];
|
|
4863
5342
|
}
|
|
4864
5343
|
while (this.type !== types$1.eof) {
|
|
4865
5344
|
var stmt = this.parseStatement(null, true, exports);
|
|
4866
|
-
|
|
5345
|
+
node.body.push(stmt);
|
|
4867
5346
|
}
|
|
4868
5347
|
if (this.inModule) {
|
|
4869
5348
|
for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) {
|
|
@@ -4871,10 +5350,10 @@ pp$8.parseTopLevel = function(node2) {
|
|
|
4871
5350
|
this.raiseRecoverable(this.undefinedExports[name].start, "Export '" + name + "' is not defined");
|
|
4872
5351
|
}
|
|
4873
5352
|
}
|
|
4874
|
-
this.adaptDirectivePrologue(
|
|
5353
|
+
this.adaptDirectivePrologue(node.body);
|
|
4875
5354
|
this.next();
|
|
4876
|
-
|
|
4877
|
-
return this.finishNode(
|
|
5355
|
+
node.sourceType = this.options.sourceType;
|
|
5356
|
+
return this.finishNode(node, "Program");
|
|
4878
5357
|
};
|
|
4879
5358
|
var loopLabel = { kind: "loop" };
|
|
4880
5359
|
var switchLabel = { kind: "switch" };
|
|
@@ -4919,7 +5398,7 @@ pp$8.isAsyncFunction = function() {
|
|
|
4919
5398
|
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));
|
|
4920
5399
|
};
|
|
4921
5400
|
pp$8.parseStatement = function(context, topLevel, exports) {
|
|
4922
|
-
var starttype = this.type,
|
|
5401
|
+
var starttype = this.type, node = this.startNode(), kind;
|
|
4923
5402
|
if (this.isLet(context)) {
|
|
4924
5403
|
starttype = types$1._var;
|
|
4925
5404
|
kind = "let";
|
|
@@ -4927,48 +5406,48 @@ pp$8.parseStatement = function(context, topLevel, exports) {
|
|
|
4927
5406
|
switch (starttype) {
|
|
4928
5407
|
case types$1._break:
|
|
4929
5408
|
case types$1._continue:
|
|
4930
|
-
return this.parseBreakContinueStatement(
|
|
5409
|
+
return this.parseBreakContinueStatement(node, starttype.keyword);
|
|
4931
5410
|
case types$1._debugger:
|
|
4932
|
-
return this.parseDebuggerStatement(
|
|
5411
|
+
return this.parseDebuggerStatement(node);
|
|
4933
5412
|
case types$1._do:
|
|
4934
|
-
return this.parseDoStatement(
|
|
5413
|
+
return this.parseDoStatement(node);
|
|
4935
5414
|
case types$1._for:
|
|
4936
|
-
return this.parseForStatement(
|
|
5415
|
+
return this.parseForStatement(node);
|
|
4937
5416
|
case types$1._function:
|
|
4938
5417
|
if (context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6) {
|
|
4939
5418
|
this.unexpected();
|
|
4940
5419
|
}
|
|
4941
|
-
return this.parseFunctionStatement(
|
|
5420
|
+
return this.parseFunctionStatement(node, false, !context);
|
|
4942
5421
|
case types$1._class:
|
|
4943
5422
|
if (context) {
|
|
4944
5423
|
this.unexpected();
|
|
4945
5424
|
}
|
|
4946
|
-
return this.parseClass(
|
|
5425
|
+
return this.parseClass(node, true);
|
|
4947
5426
|
case types$1._if:
|
|
4948
|
-
return this.parseIfStatement(
|
|
5427
|
+
return this.parseIfStatement(node);
|
|
4949
5428
|
case types$1._return:
|
|
4950
|
-
return this.parseReturnStatement(
|
|
5429
|
+
return this.parseReturnStatement(node);
|
|
4951
5430
|
case types$1._switch:
|
|
4952
|
-
return this.parseSwitchStatement(
|
|
5431
|
+
return this.parseSwitchStatement(node);
|
|
4953
5432
|
case types$1._throw:
|
|
4954
|
-
return this.parseThrowStatement(
|
|
5433
|
+
return this.parseThrowStatement(node);
|
|
4955
5434
|
case types$1._try:
|
|
4956
|
-
return this.parseTryStatement(
|
|
5435
|
+
return this.parseTryStatement(node);
|
|
4957
5436
|
case types$1._const:
|
|
4958
5437
|
case types$1._var:
|
|
4959
5438
|
kind = kind || this.value;
|
|
4960
5439
|
if (context && kind !== "var") {
|
|
4961
5440
|
this.unexpected();
|
|
4962
5441
|
}
|
|
4963
|
-
return this.parseVarStatement(
|
|
5442
|
+
return this.parseVarStatement(node, kind);
|
|
4964
5443
|
case types$1._while:
|
|
4965
|
-
return this.parseWhileStatement(
|
|
5444
|
+
return this.parseWhileStatement(node);
|
|
4966
5445
|
case types$1._with:
|
|
4967
|
-
return this.parseWithStatement(
|
|
5446
|
+
return this.parseWithStatement(node);
|
|
4968
5447
|
case types$1.braceL:
|
|
4969
|
-
return this.parseBlock(true,
|
|
5448
|
+
return this.parseBlock(true, node);
|
|
4970
5449
|
case types$1.semi:
|
|
4971
|
-
return this.parseEmptyStatement(
|
|
5450
|
+
return this.parseEmptyStatement(node);
|
|
4972
5451
|
case types$1._export:
|
|
4973
5452
|
case types$1._import:
|
|
4974
5453
|
if (this.options.ecmaVersion > 10 && starttype === types$1._import) {
|
|
@@ -4976,7 +5455,7 @@ pp$8.parseStatement = function(context, topLevel, exports) {
|
|
|
4976
5455
|
var skip = skipWhiteSpace.exec(this.input);
|
|
4977
5456
|
var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
|
|
4978
5457
|
if (nextCh === 40 || nextCh === 46) {
|
|
4979
|
-
return this.parseExpressionStatement(
|
|
5458
|
+
return this.parseExpressionStatement(node, this.parseExpression());
|
|
4980
5459
|
}
|
|
4981
5460
|
}
|
|
4982
5461
|
if (!this.options.allowImportExportEverywhere) {
|
|
@@ -4987,71 +5466,71 @@ pp$8.parseStatement = function(context, topLevel, exports) {
|
|
|
4987
5466
|
this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
|
|
4988
5467
|
}
|
|
4989
5468
|
}
|
|
4990
|
-
return starttype === types$1._import ? this.parseImport(
|
|
5469
|
+
return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports);
|
|
4991
5470
|
default:
|
|
4992
5471
|
if (this.isAsyncFunction()) {
|
|
4993
5472
|
if (context) {
|
|
4994
5473
|
this.unexpected();
|
|
4995
5474
|
}
|
|
4996
5475
|
this.next();
|
|
4997
|
-
return this.parseFunctionStatement(
|
|
5476
|
+
return this.parseFunctionStatement(node, true, !context);
|
|
4998
5477
|
}
|
|
4999
5478
|
var maybeName = this.value, expr = this.parseExpression();
|
|
5000
5479
|
if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) {
|
|
5001
|
-
return this.parseLabeledStatement(
|
|
5480
|
+
return this.parseLabeledStatement(node, maybeName, expr, context);
|
|
5002
5481
|
} else {
|
|
5003
|
-
return this.parseExpressionStatement(
|
|
5482
|
+
return this.parseExpressionStatement(node, expr);
|
|
5004
5483
|
}
|
|
5005
5484
|
}
|
|
5006
5485
|
};
|
|
5007
|
-
pp$8.parseBreakContinueStatement = function(
|
|
5486
|
+
pp$8.parseBreakContinueStatement = function(node, keyword) {
|
|
5008
5487
|
var isBreak = keyword === "break";
|
|
5009
5488
|
this.next();
|
|
5010
5489
|
if (this.eat(types$1.semi) || this.insertSemicolon()) {
|
|
5011
|
-
|
|
5490
|
+
node.label = null;
|
|
5012
5491
|
} else if (this.type !== types$1.name) {
|
|
5013
5492
|
this.unexpected();
|
|
5014
5493
|
} else {
|
|
5015
|
-
|
|
5494
|
+
node.label = this.parseIdent();
|
|
5016
5495
|
this.semicolon();
|
|
5017
5496
|
}
|
|
5018
5497
|
var i = 0;
|
|
5019
5498
|
for (; i < this.labels.length; ++i) {
|
|
5020
5499
|
var lab = this.labels[i];
|
|
5021
|
-
if (
|
|
5500
|
+
if (node.label == null || lab.name === node.label.name) {
|
|
5022
5501
|
if (lab.kind != null && (isBreak || lab.kind === "loop")) {
|
|
5023
5502
|
break;
|
|
5024
5503
|
}
|
|
5025
|
-
if (
|
|
5504
|
+
if (node.label && isBreak) {
|
|
5026
5505
|
break;
|
|
5027
5506
|
}
|
|
5028
5507
|
}
|
|
5029
5508
|
}
|
|
5030
5509
|
if (i === this.labels.length) {
|
|
5031
|
-
this.raise(
|
|
5510
|
+
this.raise(node.start, "Unsyntactic " + keyword);
|
|
5032
5511
|
}
|
|
5033
|
-
return this.finishNode(
|
|
5512
|
+
return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
|
|
5034
5513
|
};
|
|
5035
|
-
pp$8.parseDebuggerStatement = function(
|
|
5514
|
+
pp$8.parseDebuggerStatement = function(node) {
|
|
5036
5515
|
this.next();
|
|
5037
5516
|
this.semicolon();
|
|
5038
|
-
return this.finishNode(
|
|
5517
|
+
return this.finishNode(node, "DebuggerStatement");
|
|
5039
5518
|
};
|
|
5040
|
-
pp$8.parseDoStatement = function(
|
|
5519
|
+
pp$8.parseDoStatement = function(node) {
|
|
5041
5520
|
this.next();
|
|
5042
5521
|
this.labels.push(loopLabel);
|
|
5043
|
-
|
|
5522
|
+
node.body = this.parseStatement("do");
|
|
5044
5523
|
this.labels.pop();
|
|
5045
5524
|
this.expect(types$1._while);
|
|
5046
|
-
|
|
5525
|
+
node.test = this.parseParenExpression();
|
|
5047
5526
|
if (this.options.ecmaVersion >= 6) {
|
|
5048
5527
|
this.eat(types$1.semi);
|
|
5049
5528
|
} else {
|
|
5050
5529
|
this.semicolon();
|
|
5051
5530
|
}
|
|
5052
|
-
return this.finishNode(
|
|
5531
|
+
return this.finishNode(node, "DoWhileStatement");
|
|
5053
5532
|
};
|
|
5054
|
-
pp$8.parseForStatement = function(
|
|
5533
|
+
pp$8.parseForStatement = function(node) {
|
|
5055
5534
|
this.next();
|
|
5056
5535
|
var awaitAt = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
5057
5536
|
this.labels.push(loopLabel);
|
|
@@ -5061,7 +5540,7 @@ pp$8.parseForStatement = function(node2) {
|
|
|
5061
5540
|
if (awaitAt > -1) {
|
|
5062
5541
|
this.unexpected(awaitAt);
|
|
5063
5542
|
}
|
|
5064
|
-
return this.parseFor(
|
|
5543
|
+
return this.parseFor(node, null);
|
|
5065
5544
|
}
|
|
5066
5545
|
var isLet = this.isLet();
|
|
5067
5546
|
if (this.type === types$1._var || this.type === types$1._const || isLet) {
|
|
@@ -5076,15 +5555,15 @@ pp$8.parseForStatement = function(node2) {
|
|
|
5076
5555
|
this.unexpected(awaitAt);
|
|
5077
5556
|
}
|
|
5078
5557
|
} else {
|
|
5079
|
-
|
|
5558
|
+
node.await = awaitAt > -1;
|
|
5080
5559
|
}
|
|
5081
5560
|
}
|
|
5082
|
-
return this.parseForIn(
|
|
5561
|
+
return this.parseForIn(node, init$1);
|
|
5083
5562
|
}
|
|
5084
5563
|
if (awaitAt > -1) {
|
|
5085
5564
|
this.unexpected(awaitAt);
|
|
5086
5565
|
}
|
|
5087
|
-
return this.parseFor(
|
|
5566
|
+
return this.parseFor(node, init$1);
|
|
5088
5567
|
}
|
|
5089
5568
|
var startsWithLet = this.isContextual("let"), isForOf = false;
|
|
5090
5569
|
var refDestructuringErrors = new DestructuringErrors();
|
|
@@ -5096,7 +5575,7 @@ pp$8.parseForStatement = function(node2) {
|
|
|
5096
5575
|
this.unexpected(awaitAt);
|
|
5097
5576
|
}
|
|
5098
5577
|
} else {
|
|
5099
|
-
|
|
5578
|
+
node.await = awaitAt > -1;
|
|
5100
5579
|
}
|
|
5101
5580
|
}
|
|
5102
5581
|
if (startsWithLet && isForOf) {
|
|
@@ -5104,43 +5583,43 @@ pp$8.parseForStatement = function(node2) {
|
|
|
5104
5583
|
}
|
|
5105
5584
|
this.toAssignable(init, false, refDestructuringErrors);
|
|
5106
5585
|
this.checkLValPattern(init);
|
|
5107
|
-
return this.parseForIn(
|
|
5586
|
+
return this.parseForIn(node, init);
|
|
5108
5587
|
} else {
|
|
5109
5588
|
this.checkExpressionErrors(refDestructuringErrors, true);
|
|
5110
5589
|
}
|
|
5111
5590
|
if (awaitAt > -1) {
|
|
5112
5591
|
this.unexpected(awaitAt);
|
|
5113
5592
|
}
|
|
5114
|
-
return this.parseFor(
|
|
5593
|
+
return this.parseFor(node, init);
|
|
5115
5594
|
};
|
|
5116
|
-
pp$8.parseFunctionStatement = function(
|
|
5595
|
+
pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) {
|
|
5117
5596
|
this.next();
|
|
5118
|
-
return this.parseFunction(
|
|
5597
|
+
return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync);
|
|
5119
5598
|
};
|
|
5120
|
-
pp$8.parseIfStatement = function(
|
|
5599
|
+
pp$8.parseIfStatement = function(node) {
|
|
5121
5600
|
this.next();
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
return this.finishNode(
|
|
5601
|
+
node.test = this.parseParenExpression();
|
|
5602
|
+
node.consequent = this.parseStatement("if");
|
|
5603
|
+
node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null;
|
|
5604
|
+
return this.finishNode(node, "IfStatement");
|
|
5126
5605
|
};
|
|
5127
|
-
pp$8.parseReturnStatement = function(
|
|
5606
|
+
pp$8.parseReturnStatement = function(node) {
|
|
5128
5607
|
if (!this.inFunction && !this.options.allowReturnOutsideFunction) {
|
|
5129
5608
|
this.raise(this.start, "'return' outside of function");
|
|
5130
5609
|
}
|
|
5131
5610
|
this.next();
|
|
5132
5611
|
if (this.eat(types$1.semi) || this.insertSemicolon()) {
|
|
5133
|
-
|
|
5612
|
+
node.argument = null;
|
|
5134
5613
|
} else {
|
|
5135
|
-
|
|
5614
|
+
node.argument = this.parseExpression();
|
|
5136
5615
|
this.semicolon();
|
|
5137
5616
|
}
|
|
5138
|
-
return this.finishNode(
|
|
5617
|
+
return this.finishNode(node, "ReturnStatement");
|
|
5139
5618
|
};
|
|
5140
|
-
pp$8.parseSwitchStatement = function(
|
|
5619
|
+
pp$8.parseSwitchStatement = function(node) {
|
|
5141
5620
|
this.next();
|
|
5142
|
-
|
|
5143
|
-
|
|
5621
|
+
node.discriminant = this.parseParenExpression();
|
|
5622
|
+
node.cases = [];
|
|
5144
5623
|
this.expect(types$1.braceL);
|
|
5145
5624
|
this.labels.push(switchLabel);
|
|
5146
5625
|
this.enterScope(0);
|
|
@@ -5151,7 +5630,7 @@ pp$8.parseSwitchStatement = function(node2) {
|
|
|
5151
5630
|
if (cur) {
|
|
5152
5631
|
this.finishNode(cur, "SwitchCase");
|
|
5153
5632
|
}
|
|
5154
|
-
|
|
5633
|
+
node.cases.push(cur = this.startNode());
|
|
5155
5634
|
cur.consequent = [];
|
|
5156
5635
|
this.next();
|
|
5157
5636
|
if (isCase) {
|
|
@@ -5177,16 +5656,16 @@ pp$8.parseSwitchStatement = function(node2) {
|
|
|
5177
5656
|
}
|
|
5178
5657
|
this.next();
|
|
5179
5658
|
this.labels.pop();
|
|
5180
|
-
return this.finishNode(
|
|
5659
|
+
return this.finishNode(node, "SwitchStatement");
|
|
5181
5660
|
};
|
|
5182
|
-
pp$8.parseThrowStatement = function(
|
|
5661
|
+
pp$8.parseThrowStatement = function(node) {
|
|
5183
5662
|
this.next();
|
|
5184
5663
|
if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) {
|
|
5185
5664
|
this.raise(this.lastTokEnd, "Illegal newline after throw");
|
|
5186
5665
|
}
|
|
5187
|
-
|
|
5666
|
+
node.argument = this.parseExpression();
|
|
5188
5667
|
this.semicolon();
|
|
5189
|
-
return this.finishNode(
|
|
5668
|
+
return this.finishNode(node, "ThrowStatement");
|
|
5190
5669
|
};
|
|
5191
5670
|
var empty$1 = [];
|
|
5192
5671
|
pp$8.parseCatchClauseParam = function() {
|
|
@@ -5197,10 +5676,10 @@ pp$8.parseCatchClauseParam = function() {
|
|
|
5197
5676
|
this.expect(types$1.parenR);
|
|
5198
5677
|
return param;
|
|
5199
5678
|
};
|
|
5200
|
-
pp$8.parseTryStatement = function(
|
|
5679
|
+
pp$8.parseTryStatement = function(node) {
|
|
5201
5680
|
this.next();
|
|
5202
|
-
|
|
5203
|
-
|
|
5681
|
+
node.block = this.parseBlock();
|
|
5682
|
+
node.handler = null;
|
|
5204
5683
|
if (this.type === types$1._catch) {
|
|
5205
5684
|
var clause = this.startNode();
|
|
5206
5685
|
this.next();
|
|
@@ -5215,42 +5694,42 @@ pp$8.parseTryStatement = function(node2) {
|
|
|
5215
5694
|
}
|
|
5216
5695
|
clause.body = this.parseBlock(false);
|
|
5217
5696
|
this.exitScope();
|
|
5218
|
-
|
|
5697
|
+
node.handler = this.finishNode(clause, "CatchClause");
|
|
5219
5698
|
}
|
|
5220
|
-
|
|
5221
|
-
if (!
|
|
5222
|
-
this.raise(
|
|
5699
|
+
node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null;
|
|
5700
|
+
if (!node.handler && !node.finalizer) {
|
|
5701
|
+
this.raise(node.start, "Missing catch or finally clause");
|
|
5223
5702
|
}
|
|
5224
|
-
return this.finishNode(
|
|
5703
|
+
return this.finishNode(node, "TryStatement");
|
|
5225
5704
|
};
|
|
5226
|
-
pp$8.parseVarStatement = function(
|
|
5705
|
+
pp$8.parseVarStatement = function(node, kind, allowMissingInitializer) {
|
|
5227
5706
|
this.next();
|
|
5228
|
-
this.parseVar(
|
|
5707
|
+
this.parseVar(node, false, kind, allowMissingInitializer);
|
|
5229
5708
|
this.semicolon();
|
|
5230
|
-
return this.finishNode(
|
|
5709
|
+
return this.finishNode(node, "VariableDeclaration");
|
|
5231
5710
|
};
|
|
5232
|
-
pp$8.parseWhileStatement = function(
|
|
5711
|
+
pp$8.parseWhileStatement = function(node) {
|
|
5233
5712
|
this.next();
|
|
5234
|
-
|
|
5713
|
+
node.test = this.parseParenExpression();
|
|
5235
5714
|
this.labels.push(loopLabel);
|
|
5236
|
-
|
|
5715
|
+
node.body = this.parseStatement("while");
|
|
5237
5716
|
this.labels.pop();
|
|
5238
|
-
return this.finishNode(
|
|
5717
|
+
return this.finishNode(node, "WhileStatement");
|
|
5239
5718
|
};
|
|
5240
|
-
pp$8.parseWithStatement = function(
|
|
5719
|
+
pp$8.parseWithStatement = function(node) {
|
|
5241
5720
|
if (this.strict) {
|
|
5242
5721
|
this.raise(this.start, "'with' in strict mode");
|
|
5243
5722
|
}
|
|
5244
5723
|
this.next();
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
return this.finishNode(
|
|
5724
|
+
node.object = this.parseParenExpression();
|
|
5725
|
+
node.body = this.parseStatement("with");
|
|
5726
|
+
return this.finishNode(node, "WithStatement");
|
|
5248
5727
|
};
|
|
5249
|
-
pp$8.parseEmptyStatement = function(
|
|
5728
|
+
pp$8.parseEmptyStatement = function(node) {
|
|
5250
5729
|
this.next();
|
|
5251
|
-
return this.finishNode(
|
|
5730
|
+
return this.finishNode(node, "EmptyStatement");
|
|
5252
5731
|
};
|
|
5253
|
-
pp$8.parseLabeledStatement = function(
|
|
5732
|
+
pp$8.parseLabeledStatement = function(node, maybeName, expr, context) {
|
|
5254
5733
|
for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) {
|
|
5255
5734
|
var label = list[i$1];
|
|
5256
5735
|
if (label.name === maybeName) {
|
|
@@ -5260,7 +5739,7 @@ pp$8.parseLabeledStatement = function(node2, maybeName, expr, context) {
|
|
|
5260
5739
|
var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null;
|
|
5261
5740
|
for (var i = this.labels.length - 1; i >= 0; i--) {
|
|
5262
5741
|
var label$1 = this.labels[i];
|
|
5263
|
-
if (label$1.statementStart ===
|
|
5742
|
+
if (label$1.statementStart === node.start) {
|
|
5264
5743
|
label$1.statementStart = this.start;
|
|
5265
5744
|
label$1.kind = kind;
|
|
5266
5745
|
} else {
|
|
@@ -5268,29 +5747,29 @@ pp$8.parseLabeledStatement = function(node2, maybeName, expr, context) {
|
|
|
5268
5747
|
}
|
|
5269
5748
|
}
|
|
5270
5749
|
this.labels.push({ name: maybeName, kind, statementStart: this.start });
|
|
5271
|
-
|
|
5750
|
+
node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
|
|
5272
5751
|
this.labels.pop();
|
|
5273
|
-
|
|
5274
|
-
return this.finishNode(
|
|
5752
|
+
node.label = expr;
|
|
5753
|
+
return this.finishNode(node, "LabeledStatement");
|
|
5275
5754
|
};
|
|
5276
|
-
pp$8.parseExpressionStatement = function(
|
|
5277
|
-
|
|
5755
|
+
pp$8.parseExpressionStatement = function(node, expr) {
|
|
5756
|
+
node.expression = expr;
|
|
5278
5757
|
this.semicolon();
|
|
5279
|
-
return this.finishNode(
|
|
5758
|
+
return this.finishNode(node, "ExpressionStatement");
|
|
5280
5759
|
};
|
|
5281
|
-
pp$8.parseBlock = function(createNewLexicalScope,
|
|
5760
|
+
pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) {
|
|
5282
5761
|
if (createNewLexicalScope === void 0)
|
|
5283
5762
|
createNewLexicalScope = true;
|
|
5284
|
-
if (
|
|
5285
|
-
|
|
5286
|
-
|
|
5763
|
+
if (node === void 0)
|
|
5764
|
+
node = this.startNode();
|
|
5765
|
+
node.body = [];
|
|
5287
5766
|
this.expect(types$1.braceL);
|
|
5288
5767
|
if (createNewLexicalScope) {
|
|
5289
5768
|
this.enterScope(0);
|
|
5290
5769
|
}
|
|
5291
5770
|
while (this.type !== types$1.braceR) {
|
|
5292
5771
|
var stmt = this.parseStatement(null);
|
|
5293
|
-
|
|
5772
|
+
node.body.push(stmt);
|
|
5294
5773
|
}
|
|
5295
5774
|
if (exitStrict) {
|
|
5296
5775
|
this.strict = false;
|
|
@@ -5299,21 +5778,21 @@ pp$8.parseBlock = function(createNewLexicalScope, node2, exitStrict) {
|
|
|
5299
5778
|
if (createNewLexicalScope) {
|
|
5300
5779
|
this.exitScope();
|
|
5301
5780
|
}
|
|
5302
|
-
return this.finishNode(
|
|
5781
|
+
return this.finishNode(node, "BlockStatement");
|
|
5303
5782
|
};
|
|
5304
|
-
pp$8.parseFor = function(
|
|
5305
|
-
|
|
5783
|
+
pp$8.parseFor = function(node, init) {
|
|
5784
|
+
node.init = init;
|
|
5306
5785
|
this.expect(types$1.semi);
|
|
5307
|
-
|
|
5786
|
+
node.test = this.type === types$1.semi ? null : this.parseExpression();
|
|
5308
5787
|
this.expect(types$1.semi);
|
|
5309
|
-
|
|
5788
|
+
node.update = this.type === types$1.parenR ? null : this.parseExpression();
|
|
5310
5789
|
this.expect(types$1.parenR);
|
|
5311
|
-
|
|
5790
|
+
node.body = this.parseStatement("for");
|
|
5312
5791
|
this.exitScope();
|
|
5313
5792
|
this.labels.pop();
|
|
5314
|
-
return this.finishNode(
|
|
5793
|
+
return this.finishNode(node, "ForStatement");
|
|
5315
5794
|
};
|
|
5316
|
-
pp$8.parseForIn = function(
|
|
5795
|
+
pp$8.parseForIn = function(node, init) {
|
|
5317
5796
|
var isForIn = this.type === types$1._in;
|
|
5318
5797
|
this.next();
|
|
5319
5798
|
if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
|
|
@@ -5322,17 +5801,17 @@ pp$8.parseForIn = function(node2, init) {
|
|
|
5322
5801
|
(isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
|
|
5323
5802
|
);
|
|
5324
5803
|
}
|
|
5325
|
-
|
|
5326
|
-
|
|
5804
|
+
node.left = init;
|
|
5805
|
+
node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
|
|
5327
5806
|
this.expect(types$1.parenR);
|
|
5328
|
-
|
|
5807
|
+
node.body = this.parseStatement("for");
|
|
5329
5808
|
this.exitScope();
|
|
5330
5809
|
this.labels.pop();
|
|
5331
|
-
return this.finishNode(
|
|
5810
|
+
return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
|
|
5332
5811
|
};
|
|
5333
|
-
pp$8.parseVar = function(
|
|
5334
|
-
|
|
5335
|
-
|
|
5812
|
+
pp$8.parseVar = function(node, isFor, kind, allowMissingInitializer) {
|
|
5813
|
+
node.declarations = [];
|
|
5814
|
+
node.kind = kind;
|
|
5336
5815
|
for (; ; ) {
|
|
5337
5816
|
var decl = this.startNode();
|
|
5338
5817
|
this.parseVarId(decl, kind);
|
|
@@ -5345,12 +5824,12 @@ pp$8.parseVar = function(node2, isFor, kind, allowMissingInitializer) {
|
|
|
5345
5824
|
} else {
|
|
5346
5825
|
decl.init = null;
|
|
5347
5826
|
}
|
|
5348
|
-
|
|
5827
|
+
node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
|
|
5349
5828
|
if (!this.eat(types$1.comma)) {
|
|
5350
5829
|
break;
|
|
5351
5830
|
}
|
|
5352
5831
|
}
|
|
5353
|
-
return
|
|
5832
|
+
return node;
|
|
5354
5833
|
};
|
|
5355
5834
|
pp$8.parseVarId = function(decl, kind) {
|
|
5356
5835
|
decl.id = this.parseBindingAtom();
|
|
@@ -5359,56 +5838,56 @@ pp$8.parseVarId = function(decl, kind) {
|
|
|
5359
5838
|
var FUNC_STATEMENT = 1;
|
|
5360
5839
|
var FUNC_HANGING_STATEMENT = 2;
|
|
5361
5840
|
var FUNC_NULLABLE_ID = 4;
|
|
5362
|
-
pp$8.parseFunction = function(
|
|
5363
|
-
this.initFunction(
|
|
5841
|
+
pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
|
|
5842
|
+
this.initFunction(node);
|
|
5364
5843
|
if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
|
|
5365
5844
|
if (this.type === types$1.star && statement & FUNC_HANGING_STATEMENT) {
|
|
5366
5845
|
this.unexpected();
|
|
5367
5846
|
}
|
|
5368
|
-
|
|
5847
|
+
node.generator = this.eat(types$1.star);
|
|
5369
5848
|
}
|
|
5370
5849
|
if (this.options.ecmaVersion >= 8) {
|
|
5371
|
-
|
|
5850
|
+
node.async = !!isAsync;
|
|
5372
5851
|
}
|
|
5373
5852
|
if (statement & FUNC_STATEMENT) {
|
|
5374
|
-
|
|
5375
|
-
if (
|
|
5376
|
-
this.checkLValSimple(
|
|
5853
|
+
node.id = statement & FUNC_NULLABLE_ID && this.type !== types$1.name ? null : this.parseIdent();
|
|
5854
|
+
if (node.id && !(statement & FUNC_HANGING_STATEMENT)) {
|
|
5855
|
+
this.checkLValSimple(node.id, this.strict || node.generator || node.async ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION);
|
|
5377
5856
|
}
|
|
5378
5857
|
}
|
|
5379
5858
|
var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
|
|
5380
5859
|
this.yieldPos = 0;
|
|
5381
5860
|
this.awaitPos = 0;
|
|
5382
5861
|
this.awaitIdentPos = 0;
|
|
5383
|
-
this.enterScope(functionFlags(
|
|
5862
|
+
this.enterScope(functionFlags(node.async, node.generator));
|
|
5384
5863
|
if (!(statement & FUNC_STATEMENT)) {
|
|
5385
|
-
|
|
5864
|
+
node.id = this.type === types$1.name ? this.parseIdent() : null;
|
|
5386
5865
|
}
|
|
5387
|
-
this.parseFunctionParams(
|
|
5388
|
-
this.parseFunctionBody(
|
|
5866
|
+
this.parseFunctionParams(node);
|
|
5867
|
+
this.parseFunctionBody(node, allowExpressionBody, false, forInit);
|
|
5389
5868
|
this.yieldPos = oldYieldPos;
|
|
5390
5869
|
this.awaitPos = oldAwaitPos;
|
|
5391
5870
|
this.awaitIdentPos = oldAwaitIdentPos;
|
|
5392
|
-
return this.finishNode(
|
|
5871
|
+
return this.finishNode(node, statement & FUNC_STATEMENT ? "FunctionDeclaration" : "FunctionExpression");
|
|
5393
5872
|
};
|
|
5394
|
-
pp$8.parseFunctionParams = function(
|
|
5873
|
+
pp$8.parseFunctionParams = function(node) {
|
|
5395
5874
|
this.expect(types$1.parenL);
|
|
5396
|
-
|
|
5875
|
+
node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
|
|
5397
5876
|
this.checkYieldAwaitInDefaultParams();
|
|
5398
5877
|
};
|
|
5399
|
-
pp$8.parseClass = function(
|
|
5878
|
+
pp$8.parseClass = function(node, isStatement) {
|
|
5400
5879
|
this.next();
|
|
5401
5880
|
var oldStrict = this.strict;
|
|
5402
5881
|
this.strict = true;
|
|
5403
|
-
this.parseClassId(
|
|
5404
|
-
this.parseClassSuper(
|
|
5882
|
+
this.parseClassId(node, isStatement);
|
|
5883
|
+
this.parseClassSuper(node);
|
|
5405
5884
|
var privateNameMap = this.enterClassBody();
|
|
5406
5885
|
var classBody = this.startNode();
|
|
5407
5886
|
var hadConstructor = false;
|
|
5408
5887
|
classBody.body = [];
|
|
5409
5888
|
this.expect(types$1.braceL);
|
|
5410
5889
|
while (this.type !== types$1.braceR) {
|
|
5411
|
-
var element = this.parseClassElement(
|
|
5890
|
+
var element = this.parseClassElement(node.superClass !== null);
|
|
5412
5891
|
if (element) {
|
|
5413
5892
|
classBody.body.push(element);
|
|
5414
5893
|
if (element.type === "MethodDefinition" && element.kind === "constructor") {
|
|
@@ -5423,16 +5902,16 @@ pp$8.parseClass = function(node2, isStatement) {
|
|
|
5423
5902
|
}
|
|
5424
5903
|
this.strict = oldStrict;
|
|
5425
5904
|
this.next();
|
|
5426
|
-
|
|
5905
|
+
node.body = this.finishNode(classBody, "ClassBody");
|
|
5427
5906
|
this.exitClassBody();
|
|
5428
|
-
return this.finishNode(
|
|
5907
|
+
return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
|
|
5429
5908
|
};
|
|
5430
5909
|
pp$8.parseClassElement = function(constructorAllowsSuper) {
|
|
5431
5910
|
if (this.eat(types$1.semi)) {
|
|
5432
5911
|
return null;
|
|
5433
5912
|
}
|
|
5434
5913
|
var ecmaVersion = this.options.ecmaVersion;
|
|
5435
|
-
var
|
|
5914
|
+
var node = this.startNode();
|
|
5436
5915
|
var keyName = "";
|
|
5437
5916
|
var isGenerator = false;
|
|
5438
5917
|
var isAsync = false;
|
|
@@ -5440,8 +5919,8 @@ pp$8.parseClassElement = function(constructorAllowsSuper) {
|
|
|
5440
5919
|
var isStatic = false;
|
|
5441
5920
|
if (this.eatContextual("static")) {
|
|
5442
5921
|
if (ecmaVersion >= 13 && this.eat(types$1.braceL)) {
|
|
5443
|
-
this.parseClassStaticBlock(
|
|
5444
|
-
return
|
|
5922
|
+
this.parseClassStaticBlock(node);
|
|
5923
|
+
return node;
|
|
5445
5924
|
}
|
|
5446
5925
|
if (this.isClassElementNameStart() || this.type === types$1.star) {
|
|
5447
5926
|
isStatic = true;
|
|
@@ -5449,7 +5928,7 @@ pp$8.parseClassElement = function(constructorAllowsSuper) {
|
|
|
5449
5928
|
keyName = "static";
|
|
5450
5929
|
}
|
|
5451
5930
|
}
|
|
5452
|
-
|
|
5931
|
+
node.static = isStatic;
|
|
5453
5932
|
if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) {
|
|
5454
5933
|
if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) {
|
|
5455
5934
|
isAsync = true;
|
|
@@ -5471,25 +5950,25 @@ pp$8.parseClassElement = function(constructorAllowsSuper) {
|
|
|
5471
5950
|
}
|
|
5472
5951
|
}
|
|
5473
5952
|
if (keyName) {
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
this.finishNode(
|
|
5953
|
+
node.computed = false;
|
|
5954
|
+
node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc);
|
|
5955
|
+
node.key.name = keyName;
|
|
5956
|
+
this.finishNode(node.key, "Identifier");
|
|
5478
5957
|
} else {
|
|
5479
|
-
this.parseClassElementName(
|
|
5958
|
+
this.parseClassElementName(node);
|
|
5480
5959
|
}
|
|
5481
5960
|
if (ecmaVersion < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) {
|
|
5482
|
-
var isConstructor = !
|
|
5961
|
+
var isConstructor = !node.static && checkKeyName(node, "constructor");
|
|
5483
5962
|
var allowsDirectSuper = isConstructor && constructorAllowsSuper;
|
|
5484
5963
|
if (isConstructor && kind !== "method") {
|
|
5485
|
-
this.raise(
|
|
5964
|
+
this.raise(node.key.start, "Constructor can't have get/set modifier");
|
|
5486
5965
|
}
|
|
5487
|
-
|
|
5488
|
-
this.parseClassMethod(
|
|
5966
|
+
node.kind = isConstructor ? "constructor" : kind;
|
|
5967
|
+
this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper);
|
|
5489
5968
|
} else {
|
|
5490
|
-
this.parseClassField(
|
|
5969
|
+
this.parseClassField(node);
|
|
5491
5970
|
}
|
|
5492
|
-
return
|
|
5971
|
+
return node;
|
|
5493
5972
|
};
|
|
5494
5973
|
pp$8.isClassElementNameStart = function() {
|
|
5495
5974
|
return this.type === types$1.name || this.type === types$1.privateId || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword;
|
|
@@ -5547,35 +6026,35 @@ pp$8.parseClassField = function(field) {
|
|
|
5547
6026
|
this.semicolon();
|
|
5548
6027
|
return this.finishNode(field, "PropertyDefinition");
|
|
5549
6028
|
};
|
|
5550
|
-
pp$8.parseClassStaticBlock = function(
|
|
5551
|
-
|
|
6029
|
+
pp$8.parseClassStaticBlock = function(node) {
|
|
6030
|
+
node.body = [];
|
|
5552
6031
|
var oldLabels = this.labels;
|
|
5553
6032
|
this.labels = [];
|
|
5554
6033
|
this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER);
|
|
5555
6034
|
while (this.type !== types$1.braceR) {
|
|
5556
6035
|
var stmt = this.parseStatement(null);
|
|
5557
|
-
|
|
6036
|
+
node.body.push(stmt);
|
|
5558
6037
|
}
|
|
5559
6038
|
this.next();
|
|
5560
6039
|
this.exitScope();
|
|
5561
6040
|
this.labels = oldLabels;
|
|
5562
|
-
return this.finishNode(
|
|
6041
|
+
return this.finishNode(node, "StaticBlock");
|
|
5563
6042
|
};
|
|
5564
|
-
pp$8.parseClassId = function(
|
|
6043
|
+
pp$8.parseClassId = function(node, isStatement) {
|
|
5565
6044
|
if (this.type === types$1.name) {
|
|
5566
|
-
|
|
6045
|
+
node.id = this.parseIdent();
|
|
5567
6046
|
if (isStatement) {
|
|
5568
|
-
this.checkLValSimple(
|
|
6047
|
+
this.checkLValSimple(node.id, BIND_LEXICAL, false);
|
|
5569
6048
|
}
|
|
5570
6049
|
} else {
|
|
5571
6050
|
if (isStatement === true) {
|
|
5572
6051
|
this.unexpected();
|
|
5573
6052
|
}
|
|
5574
|
-
|
|
6053
|
+
node.id = null;
|
|
5575
6054
|
}
|
|
5576
6055
|
};
|
|
5577
|
-
pp$8.parseClassSuper = function(
|
|
5578
|
-
|
|
6056
|
+
pp$8.parseClassSuper = function(node) {
|
|
6057
|
+
node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null;
|
|
5579
6058
|
};
|
|
5580
6059
|
pp$8.enterClassBody = function() {
|
|
5581
6060
|
var element = { declared: /* @__PURE__ */ Object.create(null), used: [] };
|
|
@@ -5619,57 +6098,57 @@ function isPrivateNameConflicted(privateNameMap, element) {
|
|
|
5619
6098
|
return true;
|
|
5620
6099
|
}
|
|
5621
6100
|
}
|
|
5622
|
-
function checkKeyName(
|
|
5623
|
-
var computed =
|
|
5624
|
-
var key =
|
|
6101
|
+
function checkKeyName(node, name) {
|
|
6102
|
+
var computed = node.computed;
|
|
6103
|
+
var key = node.key;
|
|
5625
6104
|
return !computed && (key.type === "Identifier" && key.name === name || key.type === "Literal" && key.value === name);
|
|
5626
6105
|
}
|
|
5627
|
-
pp$8.parseExportAllDeclaration = function(
|
|
6106
|
+
pp$8.parseExportAllDeclaration = function(node, exports) {
|
|
5628
6107
|
if (this.options.ecmaVersion >= 11) {
|
|
5629
6108
|
if (this.eatContextual("as")) {
|
|
5630
|
-
|
|
5631
|
-
this.checkExport(exports,
|
|
6109
|
+
node.exported = this.parseModuleExportName();
|
|
6110
|
+
this.checkExport(exports, node.exported, this.lastTokStart);
|
|
5632
6111
|
} else {
|
|
5633
|
-
|
|
6112
|
+
node.exported = null;
|
|
5634
6113
|
}
|
|
5635
6114
|
}
|
|
5636
6115
|
this.expectContextual("from");
|
|
5637
6116
|
if (this.type !== types$1.string) {
|
|
5638
6117
|
this.unexpected();
|
|
5639
6118
|
}
|
|
5640
|
-
|
|
6119
|
+
node.source = this.parseExprAtom();
|
|
5641
6120
|
this.semicolon();
|
|
5642
|
-
return this.finishNode(
|
|
6121
|
+
return this.finishNode(node, "ExportAllDeclaration");
|
|
5643
6122
|
};
|
|
5644
|
-
pp$8.parseExport = function(
|
|
6123
|
+
pp$8.parseExport = function(node, exports) {
|
|
5645
6124
|
this.next();
|
|
5646
6125
|
if (this.eat(types$1.star)) {
|
|
5647
|
-
return this.parseExportAllDeclaration(
|
|
6126
|
+
return this.parseExportAllDeclaration(node, exports);
|
|
5648
6127
|
}
|
|
5649
6128
|
if (this.eat(types$1._default)) {
|
|
5650
6129
|
this.checkExport(exports, "default", this.lastTokStart);
|
|
5651
|
-
|
|
5652
|
-
return this.finishNode(
|
|
6130
|
+
node.declaration = this.parseExportDefaultDeclaration();
|
|
6131
|
+
return this.finishNode(node, "ExportDefaultDeclaration");
|
|
5653
6132
|
}
|
|
5654
6133
|
if (this.shouldParseExportStatement()) {
|
|
5655
|
-
|
|
5656
|
-
if (
|
|
5657
|
-
this.checkVariableExport(exports,
|
|
6134
|
+
node.declaration = this.parseExportDeclaration(node);
|
|
6135
|
+
if (node.declaration.type === "VariableDeclaration") {
|
|
6136
|
+
this.checkVariableExport(exports, node.declaration.declarations);
|
|
5658
6137
|
} else {
|
|
5659
|
-
this.checkExport(exports,
|
|
6138
|
+
this.checkExport(exports, node.declaration.id, node.declaration.id.start);
|
|
5660
6139
|
}
|
|
5661
|
-
|
|
5662
|
-
|
|
6140
|
+
node.specifiers = [];
|
|
6141
|
+
node.source = null;
|
|
5663
6142
|
} else {
|
|
5664
|
-
|
|
5665
|
-
|
|
6143
|
+
node.declaration = null;
|
|
6144
|
+
node.specifiers = this.parseExportSpecifiers(exports);
|
|
5666
6145
|
if (this.eatContextual("from")) {
|
|
5667
6146
|
if (this.type !== types$1.string) {
|
|
5668
6147
|
this.unexpected();
|
|
5669
6148
|
}
|
|
5670
|
-
|
|
6149
|
+
node.source = this.parseExprAtom();
|
|
5671
6150
|
} else {
|
|
5672
|
-
for (var i = 0, list =
|
|
6151
|
+
for (var i = 0, list = node.specifiers; i < list.length; i += 1) {
|
|
5673
6152
|
var spec = list[i];
|
|
5674
6153
|
this.checkUnreserved(spec.local);
|
|
5675
6154
|
this.checkLocalExport(spec.local);
|
|
@@ -5677,13 +6156,13 @@ pp$8.parseExport = function(node2, exports) {
|
|
|
5677
6156
|
this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
|
|
5678
6157
|
}
|
|
5679
6158
|
}
|
|
5680
|
-
|
|
6159
|
+
node.source = null;
|
|
5681
6160
|
}
|
|
5682
6161
|
this.semicolon();
|
|
5683
6162
|
}
|
|
5684
|
-
return this.finishNode(
|
|
6163
|
+
return this.finishNode(node, "ExportNamedDeclaration");
|
|
5685
6164
|
};
|
|
5686
|
-
pp$8.parseExportDeclaration = function(
|
|
6165
|
+
pp$8.parseExportDeclaration = function(node) {
|
|
5687
6166
|
return this.parseStatement(null);
|
|
5688
6167
|
};
|
|
5689
6168
|
pp$8.parseExportDefaultDeclaration = function() {
|
|
@@ -5753,15 +6232,15 @@ pp$8.shouldParseExportStatement = function() {
|
|
|
5753
6232
|
return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
|
|
5754
6233
|
};
|
|
5755
6234
|
pp$8.parseExportSpecifier = function(exports) {
|
|
5756
|
-
var
|
|
5757
|
-
|
|
5758
|
-
|
|
6235
|
+
var node = this.startNode();
|
|
6236
|
+
node.local = this.parseModuleExportName();
|
|
6237
|
+
node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
|
|
5759
6238
|
this.checkExport(
|
|
5760
6239
|
exports,
|
|
5761
|
-
|
|
5762
|
-
|
|
6240
|
+
node.exported,
|
|
6241
|
+
node.exported.start
|
|
5763
6242
|
);
|
|
5764
|
-
return this.finishNode(
|
|
6243
|
+
return this.finishNode(node, "ExportSpecifier");
|
|
5765
6244
|
};
|
|
5766
6245
|
pp$8.parseExportSpecifiers = function(exports) {
|
|
5767
6246
|
var nodes = [], first = true;
|
|
@@ -5779,44 +6258,44 @@ pp$8.parseExportSpecifiers = function(exports) {
|
|
|
5779
6258
|
}
|
|
5780
6259
|
return nodes;
|
|
5781
6260
|
};
|
|
5782
|
-
pp$8.parseImport = function(
|
|
6261
|
+
pp$8.parseImport = function(node) {
|
|
5783
6262
|
this.next();
|
|
5784
6263
|
if (this.type === types$1.string) {
|
|
5785
|
-
|
|
5786
|
-
|
|
6264
|
+
node.specifiers = empty$1;
|
|
6265
|
+
node.source = this.parseExprAtom();
|
|
5787
6266
|
} else {
|
|
5788
|
-
|
|
6267
|
+
node.specifiers = this.parseImportSpecifiers();
|
|
5789
6268
|
this.expectContextual("from");
|
|
5790
|
-
|
|
6269
|
+
node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected();
|
|
5791
6270
|
}
|
|
5792
6271
|
this.semicolon();
|
|
5793
|
-
return this.finishNode(
|
|
6272
|
+
return this.finishNode(node, "ImportDeclaration");
|
|
5794
6273
|
};
|
|
5795
6274
|
pp$8.parseImportSpecifier = function() {
|
|
5796
|
-
var
|
|
5797
|
-
|
|
6275
|
+
var node = this.startNode();
|
|
6276
|
+
node.imported = this.parseModuleExportName();
|
|
5798
6277
|
if (this.eatContextual("as")) {
|
|
5799
|
-
|
|
6278
|
+
node.local = this.parseIdent();
|
|
5800
6279
|
} else {
|
|
5801
|
-
this.checkUnreserved(
|
|
5802
|
-
|
|
6280
|
+
this.checkUnreserved(node.imported);
|
|
6281
|
+
node.local = node.imported;
|
|
5803
6282
|
}
|
|
5804
|
-
this.checkLValSimple(
|
|
5805
|
-
return this.finishNode(
|
|
6283
|
+
this.checkLValSimple(node.local, BIND_LEXICAL);
|
|
6284
|
+
return this.finishNode(node, "ImportSpecifier");
|
|
5806
6285
|
};
|
|
5807
6286
|
pp$8.parseImportDefaultSpecifier = function() {
|
|
5808
|
-
var
|
|
5809
|
-
|
|
5810
|
-
this.checkLValSimple(
|
|
5811
|
-
return this.finishNode(
|
|
6287
|
+
var node = this.startNode();
|
|
6288
|
+
node.local = this.parseIdent();
|
|
6289
|
+
this.checkLValSimple(node.local, BIND_LEXICAL);
|
|
6290
|
+
return this.finishNode(node, "ImportDefaultSpecifier");
|
|
5812
6291
|
};
|
|
5813
6292
|
pp$8.parseImportNamespaceSpecifier = function() {
|
|
5814
|
-
var
|
|
6293
|
+
var node = this.startNode();
|
|
5815
6294
|
this.next();
|
|
5816
6295
|
this.expectContextual("as");
|
|
5817
|
-
|
|
5818
|
-
this.checkLValSimple(
|
|
5819
|
-
return this.finishNode(
|
|
6296
|
+
node.local = this.parseIdent();
|
|
6297
|
+
this.checkLValSimple(node.local, BIND_LEXICAL);
|
|
6298
|
+
return this.finishNode(node, "ImportNamespaceSpecifier");
|
|
5820
6299
|
};
|
|
5821
6300
|
pp$8.parseImportSpecifiers = function() {
|
|
5822
6301
|
var nodes = [], first = true;
|
|
@@ -5864,12 +6343,12 @@ pp$8.isDirectiveCandidate = function(statement) {
|
|
|
5864
6343
|
(this.input[statement.start] === '"' || this.input[statement.start] === "'");
|
|
5865
6344
|
};
|
|
5866
6345
|
var pp$7 = Parser.prototype;
|
|
5867
|
-
pp$7.toAssignable = function(
|
|
5868
|
-
if (this.options.ecmaVersion >= 6 &&
|
|
5869
|
-
switch (
|
|
6346
|
+
pp$7.toAssignable = function(node, isBinding, refDestructuringErrors) {
|
|
6347
|
+
if (this.options.ecmaVersion >= 6 && node) {
|
|
6348
|
+
switch (node.type) {
|
|
5870
6349
|
case "Identifier":
|
|
5871
|
-
if (this.inAsync &&
|
|
5872
|
-
this.raise(
|
|
6350
|
+
if (this.inAsync && node.name === "await") {
|
|
6351
|
+
this.raise(node.start, "Cannot use 'await' as identifier inside an async function");
|
|
5873
6352
|
}
|
|
5874
6353
|
break;
|
|
5875
6354
|
case "ObjectPattern":
|
|
@@ -5878,11 +6357,11 @@ pp$7.toAssignable = function(node2, isBinding, refDestructuringErrors) {
|
|
|
5878
6357
|
case "RestElement":
|
|
5879
6358
|
break;
|
|
5880
6359
|
case "ObjectExpression":
|
|
5881
|
-
|
|
6360
|
+
node.type = "ObjectPattern";
|
|
5882
6361
|
if (refDestructuringErrors) {
|
|
5883
6362
|
this.checkPatternErrors(refDestructuringErrors, true);
|
|
5884
6363
|
}
|
|
5885
|
-
for (var i = 0, list =
|
|
6364
|
+
for (var i = 0, list = node.properties; i < list.length; i += 1) {
|
|
5886
6365
|
var prop = list[i];
|
|
5887
6366
|
this.toAssignable(prop, isBinding);
|
|
5888
6367
|
if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) {
|
|
@@ -5891,50 +6370,50 @@ pp$7.toAssignable = function(node2, isBinding, refDestructuringErrors) {
|
|
|
5891
6370
|
}
|
|
5892
6371
|
break;
|
|
5893
6372
|
case "Property":
|
|
5894
|
-
if (
|
|
5895
|
-
this.raise(
|
|
6373
|
+
if (node.kind !== "init") {
|
|
6374
|
+
this.raise(node.key.start, "Object pattern can't contain getter or setter");
|
|
5896
6375
|
}
|
|
5897
|
-
this.toAssignable(
|
|
6376
|
+
this.toAssignable(node.value, isBinding);
|
|
5898
6377
|
break;
|
|
5899
6378
|
case "ArrayExpression":
|
|
5900
|
-
|
|
6379
|
+
node.type = "ArrayPattern";
|
|
5901
6380
|
if (refDestructuringErrors) {
|
|
5902
6381
|
this.checkPatternErrors(refDestructuringErrors, true);
|
|
5903
6382
|
}
|
|
5904
|
-
this.toAssignableList(
|
|
6383
|
+
this.toAssignableList(node.elements, isBinding);
|
|
5905
6384
|
break;
|
|
5906
6385
|
case "SpreadElement":
|
|
5907
|
-
|
|
5908
|
-
this.toAssignable(
|
|
5909
|
-
if (
|
|
5910
|
-
this.raise(
|
|
6386
|
+
node.type = "RestElement";
|
|
6387
|
+
this.toAssignable(node.argument, isBinding);
|
|
6388
|
+
if (node.argument.type === "AssignmentPattern") {
|
|
6389
|
+
this.raise(node.argument.start, "Rest elements cannot have a default value");
|
|
5911
6390
|
}
|
|
5912
6391
|
break;
|
|
5913
6392
|
case "AssignmentExpression":
|
|
5914
|
-
if (
|
|
5915
|
-
this.raise(
|
|
6393
|
+
if (node.operator !== "=") {
|
|
6394
|
+
this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
|
|
5916
6395
|
}
|
|
5917
|
-
|
|
5918
|
-
delete
|
|
5919
|
-
this.toAssignable(
|
|
6396
|
+
node.type = "AssignmentPattern";
|
|
6397
|
+
delete node.operator;
|
|
6398
|
+
this.toAssignable(node.left, isBinding);
|
|
5920
6399
|
break;
|
|
5921
6400
|
case "ParenthesizedExpression":
|
|
5922
|
-
this.toAssignable(
|
|
6401
|
+
this.toAssignable(node.expression, isBinding, refDestructuringErrors);
|
|
5923
6402
|
break;
|
|
5924
6403
|
case "ChainExpression":
|
|
5925
|
-
this.raiseRecoverable(
|
|
6404
|
+
this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side");
|
|
5926
6405
|
break;
|
|
5927
6406
|
case "MemberExpression":
|
|
5928
6407
|
if (!isBinding) {
|
|
5929
6408
|
break;
|
|
5930
6409
|
}
|
|
5931
6410
|
default:
|
|
5932
|
-
this.raise(
|
|
6411
|
+
this.raise(node.start, "Assigning to rvalue");
|
|
5933
6412
|
}
|
|
5934
6413
|
} else if (refDestructuringErrors) {
|
|
5935
6414
|
this.checkPatternErrors(refDestructuringErrors, true);
|
|
5936
6415
|
}
|
|
5937
|
-
return
|
|
6416
|
+
return node;
|
|
5938
6417
|
};
|
|
5939
6418
|
pp$7.toAssignableList = function(exprList, isBinding) {
|
|
5940
6419
|
var end = exprList.length;
|
|
@@ -5953,28 +6432,28 @@ pp$7.toAssignableList = function(exprList, isBinding) {
|
|
|
5953
6432
|
return exprList;
|
|
5954
6433
|
};
|
|
5955
6434
|
pp$7.parseSpread = function(refDestructuringErrors) {
|
|
5956
|
-
var
|
|
6435
|
+
var node = this.startNode();
|
|
5957
6436
|
this.next();
|
|
5958
|
-
|
|
5959
|
-
return this.finishNode(
|
|
6437
|
+
node.argument = this.parseMaybeAssign(false, refDestructuringErrors);
|
|
6438
|
+
return this.finishNode(node, "SpreadElement");
|
|
5960
6439
|
};
|
|
5961
6440
|
pp$7.parseRestBinding = function() {
|
|
5962
|
-
var
|
|
6441
|
+
var node = this.startNode();
|
|
5963
6442
|
this.next();
|
|
5964
6443
|
if (this.options.ecmaVersion === 6 && this.type !== types$1.name) {
|
|
5965
6444
|
this.unexpected();
|
|
5966
6445
|
}
|
|
5967
|
-
|
|
5968
|
-
return this.finishNode(
|
|
6446
|
+
node.argument = this.parseBindingAtom();
|
|
6447
|
+
return this.finishNode(node, "RestElement");
|
|
5969
6448
|
};
|
|
5970
6449
|
pp$7.parseBindingAtom = function() {
|
|
5971
6450
|
if (this.options.ecmaVersion >= 6) {
|
|
5972
6451
|
switch (this.type) {
|
|
5973
6452
|
case types$1.bracketL:
|
|
5974
|
-
var
|
|
6453
|
+
var node = this.startNode();
|
|
5975
6454
|
this.next();
|
|
5976
|
-
|
|
5977
|
-
return this.finishNode(
|
|
6455
|
+
node.elements = this.parseBindingList(types$1.bracketR, true, true);
|
|
6456
|
+
return this.finishNode(node, "ArrayPattern");
|
|
5978
6457
|
case types$1.braceL:
|
|
5979
6458
|
return this.parseObj(true);
|
|
5980
6459
|
}
|
|
@@ -6021,10 +6500,10 @@ pp$7.parseMaybeDefault = function(startPos, startLoc, left) {
|
|
|
6021
6500
|
if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) {
|
|
6022
6501
|
return left;
|
|
6023
6502
|
}
|
|
6024
|
-
var
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
return this.finishNode(
|
|
6503
|
+
var node = this.startNodeAt(startPos, startLoc);
|
|
6504
|
+
node.left = left;
|
|
6505
|
+
node.right = this.parseMaybeAssign();
|
|
6506
|
+
return this.finishNode(node, "AssignmentPattern");
|
|
6028
6507
|
};
|
|
6029
6508
|
pp$7.checkLValSimple = function(expr, bindingType, checkClashes) {
|
|
6030
6509
|
if (bindingType === void 0)
|
|
@@ -6309,12 +6788,12 @@ pp$5.parseExpression = function(forInit, refDestructuringErrors) {
|
|
|
6309
6788
|
var startPos = this.start, startLoc = this.startLoc;
|
|
6310
6789
|
var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
|
|
6311
6790
|
if (this.type === types$1.comma) {
|
|
6312
|
-
var
|
|
6313
|
-
|
|
6791
|
+
var node = this.startNodeAt(startPos, startLoc);
|
|
6792
|
+
node.expressions = [expr];
|
|
6314
6793
|
while (this.eat(types$1.comma)) {
|
|
6315
|
-
|
|
6794
|
+
node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors));
|
|
6316
6795
|
}
|
|
6317
|
-
return this.finishNode(
|
|
6796
|
+
return this.finishNode(node, "SequenceExpression");
|
|
6318
6797
|
}
|
|
6319
6798
|
return expr;
|
|
6320
6799
|
};
|
|
@@ -6346,8 +6825,8 @@ pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse
|
|
|
6346
6825
|
left = afterLeftParse.call(this, left, startPos, startLoc);
|
|
6347
6826
|
}
|
|
6348
6827
|
if (this.type.isAssign) {
|
|
6349
|
-
var
|
|
6350
|
-
|
|
6828
|
+
var node = this.startNodeAt(startPos, startLoc);
|
|
6829
|
+
node.operator = this.value;
|
|
6351
6830
|
if (this.type === types$1.eq) {
|
|
6352
6831
|
left = this.toAssignable(left, false, refDestructuringErrors);
|
|
6353
6832
|
}
|
|
@@ -6362,13 +6841,13 @@ pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse
|
|
|
6362
6841
|
} else {
|
|
6363
6842
|
this.checkLValSimple(left);
|
|
6364
6843
|
}
|
|
6365
|
-
|
|
6844
|
+
node.left = left;
|
|
6366
6845
|
this.next();
|
|
6367
|
-
|
|
6846
|
+
node.right = this.parseMaybeAssign(forInit);
|
|
6368
6847
|
if (oldDoubleProto > -1) {
|
|
6369
6848
|
refDestructuringErrors.doubleProto = oldDoubleProto;
|
|
6370
6849
|
}
|
|
6371
|
-
return this.finishNode(
|
|
6850
|
+
return this.finishNode(node, "AssignmentExpression");
|
|
6372
6851
|
} else {
|
|
6373
6852
|
if (ownDestructuringErrors) {
|
|
6374
6853
|
this.checkExpressionErrors(refDestructuringErrors, true);
|
|
@@ -6389,12 +6868,12 @@ pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) {
|
|
|
6389
6868
|
return expr;
|
|
6390
6869
|
}
|
|
6391
6870
|
if (this.eat(types$1.question)) {
|
|
6392
|
-
var
|
|
6393
|
-
|
|
6394
|
-
|
|
6871
|
+
var node = this.startNodeAt(startPos, startLoc);
|
|
6872
|
+
node.test = expr;
|
|
6873
|
+
node.consequent = this.parseMaybeAssign();
|
|
6395
6874
|
this.expect(types$1.colon);
|
|
6396
|
-
|
|
6397
|
-
return this.finishNode(
|
|
6875
|
+
node.alternate = this.parseMaybeAssign(forInit);
|
|
6876
|
+
return this.finishNode(node, "ConditionalExpression");
|
|
6398
6877
|
}
|
|
6399
6878
|
return expr;
|
|
6400
6879
|
};
|
|
@@ -6419,11 +6898,11 @@ pp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit)
|
|
|
6419
6898
|
this.next();
|
|
6420
6899
|
var startPos = this.start, startLoc = this.startLoc;
|
|
6421
6900
|
var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit);
|
|
6422
|
-
var
|
|
6901
|
+
var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
|
|
6423
6902
|
if (logical && this.type === types$1.coalesce || coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND)) {
|
|
6424
6903
|
this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");
|
|
6425
6904
|
}
|
|
6426
|
-
return this.parseExprOp(
|
|
6905
|
+
return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit);
|
|
6427
6906
|
}
|
|
6428
6907
|
}
|
|
6429
6908
|
return left;
|
|
@@ -6432,11 +6911,11 @@ pp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) {
|
|
|
6432
6911
|
if (right.type === "PrivateIdentifier") {
|
|
6433
6912
|
this.raise(right.start, "Private identifier can only be left side of binary expression");
|
|
6434
6913
|
}
|
|
6435
|
-
var
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
return this.finishNode(
|
|
6914
|
+
var node = this.startNodeAt(startPos, startLoc);
|
|
6915
|
+
node.left = left;
|
|
6916
|
+
node.operator = op;
|
|
6917
|
+
node.right = right;
|
|
6918
|
+
return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression");
|
|
6440
6919
|
};
|
|
6441
6920
|
pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
|
|
6442
6921
|
var startPos = this.start, startLoc = this.startLoc, expr;
|
|
@@ -6444,22 +6923,22 @@ pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forIni
|
|
|
6444
6923
|
expr = this.parseAwait(forInit);
|
|
6445
6924
|
sawUnary = true;
|
|
6446
6925
|
} else if (this.type.prefix) {
|
|
6447
|
-
var
|
|
6448
|
-
|
|
6449
|
-
|
|
6926
|
+
var node = this.startNode(), update = this.type === types$1.incDec;
|
|
6927
|
+
node.operator = this.value;
|
|
6928
|
+
node.prefix = true;
|
|
6450
6929
|
this.next();
|
|
6451
|
-
|
|
6930
|
+
node.argument = this.parseMaybeUnary(null, true, update, forInit);
|
|
6452
6931
|
this.checkExpressionErrors(refDestructuringErrors, true);
|
|
6453
6932
|
if (update) {
|
|
6454
|
-
this.checkLValSimple(
|
|
6455
|
-
} else if (this.strict &&
|
|
6456
|
-
this.raiseRecoverable(
|
|
6457
|
-
} else if (
|
|
6458
|
-
this.raiseRecoverable(
|
|
6933
|
+
this.checkLValSimple(node.argument);
|
|
6934
|
+
} else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") {
|
|
6935
|
+
this.raiseRecoverable(node.start, "Deleting local variable in strict mode");
|
|
6936
|
+
} else if (node.operator === "delete" && isPrivateFieldAccess(node.argument)) {
|
|
6937
|
+
this.raiseRecoverable(node.start, "Private fields can not be deleted");
|
|
6459
6938
|
} else {
|
|
6460
6939
|
sawUnary = true;
|
|
6461
6940
|
}
|
|
6462
|
-
expr = this.finishNode(
|
|
6941
|
+
expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
|
|
6463
6942
|
} else if (!sawUnary && this.type === types$1.privateId) {
|
|
6464
6943
|
if ((forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields) {
|
|
6465
6944
|
this.unexpected();
|
|
@@ -6493,8 +6972,8 @@ pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forIni
|
|
|
6493
6972
|
return expr;
|
|
6494
6973
|
}
|
|
6495
6974
|
};
|
|
6496
|
-
function isPrivateFieldAccess(
|
|
6497
|
-
return
|
|
6975
|
+
function isPrivateFieldAccess(node) {
|
|
6976
|
+
return node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || node.type === "ChainExpression" && isPrivateFieldAccess(node.expression);
|
|
6498
6977
|
}
|
|
6499
6978
|
pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) {
|
|
6500
6979
|
var startPos = this.start, startLoc = this.startLoc;
|
|
@@ -6549,21 +7028,21 @@ pp$5.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArro
|
|
|
6549
7028
|
}
|
|
6550
7029
|
var computed = this.eat(types$1.bracketL);
|
|
6551
7030
|
if (computed || optional && this.type !== types$1.parenL && this.type !== types$1.backQuote || this.eat(types$1.dot)) {
|
|
6552
|
-
var
|
|
6553
|
-
|
|
7031
|
+
var node = this.startNodeAt(startPos, startLoc);
|
|
7032
|
+
node.object = base;
|
|
6554
7033
|
if (computed) {
|
|
6555
|
-
|
|
7034
|
+
node.property = this.parseExpression();
|
|
6556
7035
|
this.expect(types$1.bracketR);
|
|
6557
7036
|
} else if (this.type === types$1.privateId && base.type !== "Super") {
|
|
6558
|
-
|
|
7037
|
+
node.property = this.parsePrivateIdent();
|
|
6559
7038
|
} else {
|
|
6560
|
-
|
|
7039
|
+
node.property = this.parseIdent(this.options.allowReserved !== "never");
|
|
6561
7040
|
}
|
|
6562
|
-
|
|
7041
|
+
node.computed = !!computed;
|
|
6563
7042
|
if (optionalSupported) {
|
|
6564
|
-
|
|
7043
|
+
node.optional = optional;
|
|
6565
7044
|
}
|
|
6566
|
-
base = this.finishNode(
|
|
7045
|
+
base = this.finishNode(node, "MemberExpression");
|
|
6567
7046
|
} else if (!noCalls && this.eat(types$1.parenL)) {
|
|
6568
7047
|
var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
|
|
6569
7048
|
this.yieldPos = 0;
|
|
@@ -6607,25 +7086,25 @@ pp$5.parseExprAtom = function(refDestructuringErrors, forInit, forNew) {
|
|
|
6607
7086
|
if (this.type === types$1.slash) {
|
|
6608
7087
|
this.readRegexp();
|
|
6609
7088
|
}
|
|
6610
|
-
var
|
|
7089
|
+
var node, canBeArrow = this.potentialArrowAt === this.start;
|
|
6611
7090
|
switch (this.type) {
|
|
6612
7091
|
case types$1._super:
|
|
6613
7092
|
if (!this.allowSuper) {
|
|
6614
7093
|
this.raise(this.start, "'super' keyword outside a method");
|
|
6615
7094
|
}
|
|
6616
|
-
|
|
7095
|
+
node = this.startNode();
|
|
6617
7096
|
this.next();
|
|
6618
7097
|
if (this.type === types$1.parenL && !this.allowDirectSuper) {
|
|
6619
|
-
this.raise(
|
|
7098
|
+
this.raise(node.start, "super() call outside constructor of a subclass");
|
|
6620
7099
|
}
|
|
6621
7100
|
if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL) {
|
|
6622
7101
|
this.unexpected();
|
|
6623
7102
|
}
|
|
6624
|
-
return this.finishNode(
|
|
7103
|
+
return this.finishNode(node, "Super");
|
|
6625
7104
|
case types$1._this:
|
|
6626
|
-
|
|
7105
|
+
node = this.startNode();
|
|
6627
7106
|
this.next();
|
|
6628
|
-
return this.finishNode(
|
|
7107
|
+
return this.finishNode(node, "ThisExpression");
|
|
6629
7108
|
case types$1.name:
|
|
6630
7109
|
var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;
|
|
6631
7110
|
var id = this.parseIdent(false);
|
|
@@ -6648,20 +7127,20 @@ pp$5.parseExprAtom = function(refDestructuringErrors, forInit, forNew) {
|
|
|
6648
7127
|
return id;
|
|
6649
7128
|
case types$1.regexp:
|
|
6650
7129
|
var value = this.value;
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
return
|
|
7130
|
+
node = this.parseLiteral(value.value);
|
|
7131
|
+
node.regex = { pattern: value.pattern, flags: value.flags };
|
|
7132
|
+
return node;
|
|
6654
7133
|
case types$1.num:
|
|
6655
7134
|
case types$1.string:
|
|
6656
7135
|
return this.parseLiteral(this.value);
|
|
6657
7136
|
case types$1._null:
|
|
6658
7137
|
case types$1._true:
|
|
6659
7138
|
case types$1._false:
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
7139
|
+
node = this.startNode();
|
|
7140
|
+
node.value = this.type === types$1._null ? null : this.type === types$1._true;
|
|
7141
|
+
node.raw = this.type.keyword;
|
|
6663
7142
|
this.next();
|
|
6664
|
-
return this.finishNode(
|
|
7143
|
+
return this.finishNode(node, "Literal");
|
|
6665
7144
|
case types$1.parenL:
|
|
6666
7145
|
var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit);
|
|
6667
7146
|
if (refDestructuringErrors) {
|
|
@@ -6674,17 +7153,17 @@ pp$5.parseExprAtom = function(refDestructuringErrors, forInit, forNew) {
|
|
|
6674
7153
|
}
|
|
6675
7154
|
return expr;
|
|
6676
7155
|
case types$1.bracketL:
|
|
6677
|
-
|
|
7156
|
+
node = this.startNode();
|
|
6678
7157
|
this.next();
|
|
6679
|
-
|
|
6680
|
-
return this.finishNode(
|
|
7158
|
+
node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors);
|
|
7159
|
+
return this.finishNode(node, "ArrayExpression");
|
|
6681
7160
|
case types$1.braceL:
|
|
6682
7161
|
this.overrideContext(types.b_expr);
|
|
6683
7162
|
return this.parseObj(false, refDestructuringErrors);
|
|
6684
7163
|
case types$1._function:
|
|
6685
|
-
|
|
7164
|
+
node = this.startNode();
|
|
6686
7165
|
this.next();
|
|
6687
|
-
return this.parseFunction(
|
|
7166
|
+
return this.parseFunction(node, 0);
|
|
6688
7167
|
case types$1._class:
|
|
6689
7168
|
return this.parseClass(this.startNode(), false);
|
|
6690
7169
|
case types$1._new:
|
|
@@ -6705,25 +7184,25 @@ pp$5.parseExprAtomDefault = function() {
|
|
|
6705
7184
|
this.unexpected();
|
|
6706
7185
|
};
|
|
6707
7186
|
pp$5.parseExprImport = function(forNew) {
|
|
6708
|
-
var
|
|
7187
|
+
var node = this.startNode();
|
|
6709
7188
|
if (this.containsEsc) {
|
|
6710
7189
|
this.raiseRecoverable(this.start, "Escape sequence in keyword import");
|
|
6711
7190
|
}
|
|
6712
7191
|
this.next();
|
|
6713
7192
|
if (this.type === types$1.parenL && !forNew) {
|
|
6714
|
-
return this.parseDynamicImport(
|
|
7193
|
+
return this.parseDynamicImport(node);
|
|
6715
7194
|
} else if (this.type === types$1.dot) {
|
|
6716
|
-
var meta = this.startNodeAt(
|
|
7195
|
+
var meta = this.startNodeAt(node.start, node.loc && node.loc.start);
|
|
6717
7196
|
meta.name = "import";
|
|
6718
|
-
|
|
6719
|
-
return this.parseImportMeta(
|
|
7197
|
+
node.meta = this.finishNode(meta, "Identifier");
|
|
7198
|
+
return this.parseImportMeta(node);
|
|
6720
7199
|
} else {
|
|
6721
7200
|
this.unexpected();
|
|
6722
7201
|
}
|
|
6723
7202
|
};
|
|
6724
|
-
pp$5.parseDynamicImport = function(
|
|
7203
|
+
pp$5.parseDynamicImport = function(node) {
|
|
6725
7204
|
this.next();
|
|
6726
|
-
|
|
7205
|
+
node.source = this.parseMaybeAssign();
|
|
6727
7206
|
if (!this.eat(types$1.parenR)) {
|
|
6728
7207
|
var errorPos = this.start;
|
|
6729
7208
|
if (this.eat(types$1.comma) && this.eat(types$1.parenR)) {
|
|
@@ -6732,32 +7211,32 @@ pp$5.parseDynamicImport = function(node2) {
|
|
|
6732
7211
|
this.unexpected(errorPos);
|
|
6733
7212
|
}
|
|
6734
7213
|
}
|
|
6735
|
-
return this.finishNode(
|
|
7214
|
+
return this.finishNode(node, "ImportExpression");
|
|
6736
7215
|
};
|
|
6737
|
-
pp$5.parseImportMeta = function(
|
|
7216
|
+
pp$5.parseImportMeta = function(node) {
|
|
6738
7217
|
this.next();
|
|
6739
7218
|
var containsEsc = this.containsEsc;
|
|
6740
|
-
|
|
6741
|
-
if (
|
|
6742
|
-
this.raiseRecoverable(
|
|
7219
|
+
node.property = this.parseIdent(true);
|
|
7220
|
+
if (node.property.name !== "meta") {
|
|
7221
|
+
this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'");
|
|
6743
7222
|
}
|
|
6744
7223
|
if (containsEsc) {
|
|
6745
|
-
this.raiseRecoverable(
|
|
7224
|
+
this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters");
|
|
6746
7225
|
}
|
|
6747
7226
|
if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) {
|
|
6748
|
-
this.raiseRecoverable(
|
|
7227
|
+
this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module");
|
|
6749
7228
|
}
|
|
6750
|
-
return this.finishNode(
|
|
7229
|
+
return this.finishNode(node, "MetaProperty");
|
|
6751
7230
|
};
|
|
6752
7231
|
pp$5.parseLiteral = function(value) {
|
|
6753
|
-
var
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
if (
|
|
6757
|
-
|
|
7232
|
+
var node = this.startNode();
|
|
7233
|
+
node.value = value;
|
|
7234
|
+
node.raw = this.input.slice(this.start, this.end);
|
|
7235
|
+
if (node.raw.charCodeAt(node.raw.length - 1) === 110) {
|
|
7236
|
+
node.bigint = node.raw.slice(0, -1).replace(/_/g, "");
|
|
6758
7237
|
}
|
|
6759
7238
|
this.next();
|
|
6760
|
-
return this.finishNode(
|
|
7239
|
+
return this.finishNode(node, "Literal");
|
|
6761
7240
|
};
|
|
6762
7241
|
pp$5.parseParenExpression = function() {
|
|
6763
7242
|
this.expect(types$1.parenL);
|
|
@@ -6843,34 +7322,34 @@ pp$5.parseNew = function() {
|
|
|
6843
7322
|
if (this.containsEsc) {
|
|
6844
7323
|
this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
6845
7324
|
}
|
|
6846
|
-
var
|
|
7325
|
+
var node = this.startNode();
|
|
6847
7326
|
this.next();
|
|
6848
7327
|
if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) {
|
|
6849
|
-
var meta = this.startNodeAt(
|
|
7328
|
+
var meta = this.startNodeAt(node.start, node.loc && node.loc.start);
|
|
6850
7329
|
meta.name = "new";
|
|
6851
|
-
|
|
7330
|
+
node.meta = this.finishNode(meta, "Identifier");
|
|
6852
7331
|
this.next();
|
|
6853
7332
|
var containsEsc = this.containsEsc;
|
|
6854
|
-
|
|
6855
|
-
if (
|
|
6856
|
-
this.raiseRecoverable(
|
|
7333
|
+
node.property = this.parseIdent(true);
|
|
7334
|
+
if (node.property.name !== "target") {
|
|
7335
|
+
this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'");
|
|
6857
7336
|
}
|
|
6858
7337
|
if (containsEsc) {
|
|
6859
|
-
this.raiseRecoverable(
|
|
7338
|
+
this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters");
|
|
6860
7339
|
}
|
|
6861
7340
|
if (!this.allowNewDotTarget) {
|
|
6862
|
-
this.raiseRecoverable(
|
|
7341
|
+
this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block");
|
|
6863
7342
|
}
|
|
6864
|
-
return this.finishNode(
|
|
7343
|
+
return this.finishNode(node, "MetaProperty");
|
|
6865
7344
|
}
|
|
6866
7345
|
var startPos = this.start, startLoc = this.startLoc;
|
|
6867
|
-
|
|
7346
|
+
node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false);
|
|
6868
7347
|
if (this.eat(types$1.parenL)) {
|
|
6869
|
-
|
|
7348
|
+
node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false);
|
|
6870
7349
|
} else {
|
|
6871
|
-
|
|
7350
|
+
node.arguments = empty;
|
|
6872
7351
|
}
|
|
6873
|
-
return this.finishNode(
|
|
7352
|
+
return this.finishNode(node, "NewExpression");
|
|
6874
7353
|
};
|
|
6875
7354
|
pp$5.parseTemplateElement = function(ref2) {
|
|
6876
7355
|
var isTagged = ref2.isTagged;
|
|
@@ -6899,29 +7378,29 @@ pp$5.parseTemplate = function(ref2) {
|
|
|
6899
7378
|
var isTagged = ref2.isTagged;
|
|
6900
7379
|
if (isTagged === void 0)
|
|
6901
7380
|
isTagged = false;
|
|
6902
|
-
var
|
|
7381
|
+
var node = this.startNode();
|
|
6903
7382
|
this.next();
|
|
6904
|
-
|
|
7383
|
+
node.expressions = [];
|
|
6905
7384
|
var curElt = this.parseTemplateElement({ isTagged });
|
|
6906
|
-
|
|
7385
|
+
node.quasis = [curElt];
|
|
6907
7386
|
while (!curElt.tail) {
|
|
6908
7387
|
if (this.type === types$1.eof) {
|
|
6909
7388
|
this.raise(this.pos, "Unterminated template literal");
|
|
6910
7389
|
}
|
|
6911
7390
|
this.expect(types$1.dollarBraceL);
|
|
6912
|
-
|
|
7391
|
+
node.expressions.push(this.parseExpression());
|
|
6913
7392
|
this.expect(types$1.braceR);
|
|
6914
|
-
|
|
7393
|
+
node.quasis.push(curElt = this.parseTemplateElement({ isTagged }));
|
|
6915
7394
|
}
|
|
6916
7395
|
this.next();
|
|
6917
|
-
return this.finishNode(
|
|
7396
|
+
return this.finishNode(node, "TemplateLiteral");
|
|
6918
7397
|
};
|
|
6919
7398
|
pp$5.isAsyncProp = function(prop) {
|
|
6920
7399
|
return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types$1.star) && !lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
|
|
6921
7400
|
};
|
|
6922
7401
|
pp$5.parseObj = function(isPattern, refDestructuringErrors) {
|
|
6923
|
-
var
|
|
6924
|
-
|
|
7402
|
+
var node = this.startNode(), first = true, propHash = {};
|
|
7403
|
+
node.properties = [];
|
|
6925
7404
|
this.next();
|
|
6926
7405
|
while (!this.eat(types$1.braceR)) {
|
|
6927
7406
|
if (!first) {
|
|
@@ -6936,9 +7415,9 @@ pp$5.parseObj = function(isPattern, refDestructuringErrors) {
|
|
|
6936
7415
|
if (!isPattern) {
|
|
6937
7416
|
this.checkPropClash(prop, propHash, refDestructuringErrors);
|
|
6938
7417
|
}
|
|
6939
|
-
|
|
7418
|
+
node.properties.push(prop);
|
|
6940
7419
|
}
|
|
6941
|
-
return this.finishNode(
|
|
7420
|
+
return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
|
|
6942
7421
|
};
|
|
6943
7422
|
pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
|
|
6944
7423
|
var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
|
|
@@ -7053,67 +7532,67 @@ pp$5.parsePropertyName = function(prop) {
|
|
|
7053
7532
|
}
|
|
7054
7533
|
return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
|
|
7055
7534
|
};
|
|
7056
|
-
pp$5.initFunction = function(
|
|
7057
|
-
|
|
7535
|
+
pp$5.initFunction = function(node) {
|
|
7536
|
+
node.id = null;
|
|
7058
7537
|
if (this.options.ecmaVersion >= 6) {
|
|
7059
|
-
|
|
7538
|
+
node.generator = node.expression = false;
|
|
7060
7539
|
}
|
|
7061
7540
|
if (this.options.ecmaVersion >= 8) {
|
|
7062
|
-
|
|
7541
|
+
node.async = false;
|
|
7063
7542
|
}
|
|
7064
7543
|
};
|
|
7065
7544
|
pp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
|
|
7066
|
-
var
|
|
7067
|
-
this.initFunction(
|
|
7545
|
+
var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
|
|
7546
|
+
this.initFunction(node);
|
|
7068
7547
|
if (this.options.ecmaVersion >= 6) {
|
|
7069
|
-
|
|
7548
|
+
node.generator = isGenerator;
|
|
7070
7549
|
}
|
|
7071
7550
|
if (this.options.ecmaVersion >= 8) {
|
|
7072
|
-
|
|
7551
|
+
node.async = !!isAsync;
|
|
7073
7552
|
}
|
|
7074
7553
|
this.yieldPos = 0;
|
|
7075
7554
|
this.awaitPos = 0;
|
|
7076
7555
|
this.awaitIdentPos = 0;
|
|
7077
|
-
this.enterScope(functionFlags(isAsync,
|
|
7556
|
+
this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
|
|
7078
7557
|
this.expect(types$1.parenL);
|
|
7079
|
-
|
|
7558
|
+
node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
|
|
7080
7559
|
this.checkYieldAwaitInDefaultParams();
|
|
7081
|
-
this.parseFunctionBody(
|
|
7560
|
+
this.parseFunctionBody(node, false, true, false);
|
|
7082
7561
|
this.yieldPos = oldYieldPos;
|
|
7083
7562
|
this.awaitPos = oldAwaitPos;
|
|
7084
7563
|
this.awaitIdentPos = oldAwaitIdentPos;
|
|
7085
|
-
return this.finishNode(
|
|
7564
|
+
return this.finishNode(node, "FunctionExpression");
|
|
7086
7565
|
};
|
|
7087
|
-
pp$5.parseArrowExpression = function(
|
|
7566
|
+
pp$5.parseArrowExpression = function(node, params, isAsync, forInit) {
|
|
7088
7567
|
var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
|
|
7089
7568
|
this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW);
|
|
7090
|
-
this.initFunction(
|
|
7569
|
+
this.initFunction(node);
|
|
7091
7570
|
if (this.options.ecmaVersion >= 8) {
|
|
7092
|
-
|
|
7571
|
+
node.async = !!isAsync;
|
|
7093
7572
|
}
|
|
7094
7573
|
this.yieldPos = 0;
|
|
7095
7574
|
this.awaitPos = 0;
|
|
7096
7575
|
this.awaitIdentPos = 0;
|
|
7097
|
-
|
|
7098
|
-
this.parseFunctionBody(
|
|
7576
|
+
node.params = this.toAssignableList(params, true);
|
|
7577
|
+
this.parseFunctionBody(node, true, false, forInit);
|
|
7099
7578
|
this.yieldPos = oldYieldPos;
|
|
7100
7579
|
this.awaitPos = oldAwaitPos;
|
|
7101
7580
|
this.awaitIdentPos = oldAwaitIdentPos;
|
|
7102
|
-
return this.finishNode(
|
|
7581
|
+
return this.finishNode(node, "ArrowFunctionExpression");
|
|
7103
7582
|
};
|
|
7104
|
-
pp$5.parseFunctionBody = function(
|
|
7583
|
+
pp$5.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) {
|
|
7105
7584
|
var isExpression = isArrowFunction && this.type !== types$1.braceL;
|
|
7106
7585
|
var oldStrict = this.strict, useStrict = false;
|
|
7107
7586
|
if (isExpression) {
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
this.checkParams(
|
|
7587
|
+
node.body = this.parseMaybeAssign(forInit);
|
|
7588
|
+
node.expression = true;
|
|
7589
|
+
this.checkParams(node, false);
|
|
7111
7590
|
} else {
|
|
7112
|
-
var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(
|
|
7591
|
+
var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);
|
|
7113
7592
|
if (!oldStrict || nonSimple) {
|
|
7114
7593
|
useStrict = this.strictDirective(this.end);
|
|
7115
7594
|
if (useStrict && nonSimple) {
|
|
7116
|
-
this.raiseRecoverable(
|
|
7595
|
+
this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list");
|
|
7117
7596
|
}
|
|
7118
7597
|
}
|
|
7119
7598
|
var oldLabels = this.labels;
|
|
@@ -7121,13 +7600,13 @@ pp$5.parseFunctionBody = function(node2, isArrowFunction, isMethod, forInit) {
|
|
|
7121
7600
|
if (useStrict) {
|
|
7122
7601
|
this.strict = true;
|
|
7123
7602
|
}
|
|
7124
|
-
this.checkParams(
|
|
7125
|
-
if (this.strict &&
|
|
7126
|
-
this.checkLValSimple(
|
|
7603
|
+
this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params));
|
|
7604
|
+
if (this.strict && node.id) {
|
|
7605
|
+
this.checkLValSimple(node.id, BIND_OUTSIDE);
|
|
7127
7606
|
}
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
this.adaptDirectivePrologue(
|
|
7607
|
+
node.body = this.parseBlock(false, void 0, useStrict && !oldStrict);
|
|
7608
|
+
node.expression = false;
|
|
7609
|
+
this.adaptDirectivePrologue(node.body.body);
|
|
7131
7610
|
this.labels = oldLabels;
|
|
7132
7611
|
}
|
|
7133
7612
|
this.exitScope();
|
|
@@ -7141,9 +7620,9 @@ pp$5.isSimpleParamList = function(params) {
|
|
|
7141
7620
|
}
|
|
7142
7621
|
return true;
|
|
7143
7622
|
};
|
|
7144
|
-
pp$5.checkParams = function(
|
|
7623
|
+
pp$5.checkParams = function(node, allowDuplicates) {
|
|
7145
7624
|
var nameHash = /* @__PURE__ */ Object.create(null);
|
|
7146
|
-
for (var i = 0, list =
|
|
7625
|
+
for (var i = 0, list = node.params; i < list.length; i += 1) {
|
|
7147
7626
|
var param = list[i];
|
|
7148
7627
|
this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash);
|
|
7149
7628
|
}
|
|
@@ -7205,73 +7684,73 @@ pp$5.checkUnreserved = function(ref2) {
|
|
|
7205
7684
|
}
|
|
7206
7685
|
};
|
|
7207
7686
|
pp$5.parseIdent = function(liberal) {
|
|
7208
|
-
var
|
|
7687
|
+
var node = this.parseIdentNode();
|
|
7209
7688
|
this.next(!!liberal);
|
|
7210
|
-
this.finishNode(
|
|
7689
|
+
this.finishNode(node, "Identifier");
|
|
7211
7690
|
if (!liberal) {
|
|
7212
|
-
this.checkUnreserved(
|
|
7213
|
-
if (
|
|
7214
|
-
this.awaitIdentPos =
|
|
7691
|
+
this.checkUnreserved(node);
|
|
7692
|
+
if (node.name === "await" && !this.awaitIdentPos) {
|
|
7693
|
+
this.awaitIdentPos = node.start;
|
|
7215
7694
|
}
|
|
7216
7695
|
}
|
|
7217
|
-
return
|
|
7696
|
+
return node;
|
|
7218
7697
|
};
|
|
7219
7698
|
pp$5.parseIdentNode = function() {
|
|
7220
|
-
var
|
|
7699
|
+
var node = this.startNode();
|
|
7221
7700
|
if (this.type === types$1.name) {
|
|
7222
|
-
|
|
7701
|
+
node.name = this.value;
|
|
7223
7702
|
} else if (this.type.keyword) {
|
|
7224
|
-
|
|
7225
|
-
if ((
|
|
7703
|
+
node.name = this.type.keyword;
|
|
7704
|
+
if ((node.name === "class" || node.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
|
|
7226
7705
|
this.context.pop();
|
|
7227
7706
|
}
|
|
7228
7707
|
this.type = types$1.name;
|
|
7229
7708
|
} else {
|
|
7230
7709
|
this.unexpected();
|
|
7231
7710
|
}
|
|
7232
|
-
return
|
|
7711
|
+
return node;
|
|
7233
7712
|
};
|
|
7234
7713
|
pp$5.parsePrivateIdent = function() {
|
|
7235
|
-
var
|
|
7714
|
+
var node = this.startNode();
|
|
7236
7715
|
if (this.type === types$1.privateId) {
|
|
7237
|
-
|
|
7716
|
+
node.name = this.value;
|
|
7238
7717
|
} else {
|
|
7239
7718
|
this.unexpected();
|
|
7240
7719
|
}
|
|
7241
7720
|
this.next();
|
|
7242
|
-
this.finishNode(
|
|
7721
|
+
this.finishNode(node, "PrivateIdentifier");
|
|
7243
7722
|
if (this.options.checkPrivateFields) {
|
|
7244
7723
|
if (this.privateNameStack.length === 0) {
|
|
7245
|
-
this.raise(
|
|
7724
|
+
this.raise(node.start, "Private field '#" + node.name + "' must be declared in an enclosing class");
|
|
7246
7725
|
} else {
|
|
7247
|
-
this.privateNameStack[this.privateNameStack.length - 1].used.push(
|
|
7726
|
+
this.privateNameStack[this.privateNameStack.length - 1].used.push(node);
|
|
7248
7727
|
}
|
|
7249
7728
|
}
|
|
7250
|
-
return
|
|
7729
|
+
return node;
|
|
7251
7730
|
};
|
|
7252
7731
|
pp$5.parseYield = function(forInit) {
|
|
7253
7732
|
if (!this.yieldPos) {
|
|
7254
7733
|
this.yieldPos = this.start;
|
|
7255
7734
|
}
|
|
7256
|
-
var
|
|
7735
|
+
var node = this.startNode();
|
|
7257
7736
|
this.next();
|
|
7258
7737
|
if (this.type === types$1.semi || this.canInsertSemicolon() || this.type !== types$1.star && !this.type.startsExpr) {
|
|
7259
|
-
|
|
7260
|
-
|
|
7738
|
+
node.delegate = false;
|
|
7739
|
+
node.argument = null;
|
|
7261
7740
|
} else {
|
|
7262
|
-
|
|
7263
|
-
|
|
7741
|
+
node.delegate = this.eat(types$1.star);
|
|
7742
|
+
node.argument = this.parseMaybeAssign(forInit);
|
|
7264
7743
|
}
|
|
7265
|
-
return this.finishNode(
|
|
7744
|
+
return this.finishNode(node, "YieldExpression");
|
|
7266
7745
|
};
|
|
7267
7746
|
pp$5.parseAwait = function(forInit) {
|
|
7268
7747
|
if (!this.awaitPos) {
|
|
7269
7748
|
this.awaitPos = this.start;
|
|
7270
7749
|
}
|
|
7271
|
-
var
|
|
7750
|
+
var node = this.startNode();
|
|
7272
7751
|
this.next();
|
|
7273
|
-
|
|
7274
|
-
return this.finishNode(
|
|
7752
|
+
node.argument = this.parseMaybeUnary(null, true, false, forInit);
|
|
7753
|
+
return this.finishNode(node, "AwaitExpression");
|
|
7275
7754
|
};
|
|
7276
7755
|
var pp$4 = Parser.prototype;
|
|
7277
7756
|
pp$4.raise = function(pos, message) {
|
|
@@ -7391,27 +7870,27 @@ pp$2.startNode = function() {
|
|
|
7391
7870
|
pp$2.startNodeAt = function(pos, loc) {
|
|
7392
7871
|
return new Node(this, pos, loc);
|
|
7393
7872
|
};
|
|
7394
|
-
function finishNodeAt(
|
|
7395
|
-
|
|
7396
|
-
|
|
7873
|
+
function finishNodeAt(node, type, pos, loc) {
|
|
7874
|
+
node.type = type;
|
|
7875
|
+
node.end = pos;
|
|
7397
7876
|
if (this.options.locations) {
|
|
7398
|
-
|
|
7877
|
+
node.loc.end = loc;
|
|
7399
7878
|
}
|
|
7400
7879
|
if (this.options.ranges) {
|
|
7401
|
-
|
|
7880
|
+
node.range[1] = pos;
|
|
7402
7881
|
}
|
|
7403
|
-
return
|
|
7882
|
+
return node;
|
|
7404
7883
|
}
|
|
7405
|
-
pp$2.finishNode = function(
|
|
7406
|
-
return finishNodeAt.call(this,
|
|
7884
|
+
pp$2.finishNode = function(node, type) {
|
|
7885
|
+
return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc);
|
|
7407
7886
|
};
|
|
7408
|
-
pp$2.finishNodeAt = function(
|
|
7409
|
-
return finishNodeAt.call(this,
|
|
7887
|
+
pp$2.finishNodeAt = function(node, type, pos, loc) {
|
|
7888
|
+
return finishNodeAt.call(this, node, type, pos, loc);
|
|
7410
7889
|
};
|
|
7411
|
-
pp$2.copyNode = function(
|
|
7412
|
-
var newNode = new Node(this,
|
|
7413
|
-
for (var prop in
|
|
7414
|
-
newNode[prop] =
|
|
7890
|
+
pp$2.copyNode = function(node) {
|
|
7891
|
+
var newNode = new Node(this, node.start, this.startLoc);
|
|
7892
|
+
for (var prop in node) {
|
|
7893
|
+
newNode[prop] = node[prop];
|
|
7415
7894
|
}
|
|
7416
7895
|
return newNode;
|
|
7417
7896
|
};
|
|
@@ -8005,14 +8484,14 @@ pp$1.regexp_eatAtomEscape = function(state) {
|
|
|
8005
8484
|
pp$1.regexp_eatBackReference = function(state) {
|
|
8006
8485
|
var start = state.pos;
|
|
8007
8486
|
if (this.regexp_eatDecimalEscape(state)) {
|
|
8008
|
-
var
|
|
8487
|
+
var n2 = state.lastIntValue;
|
|
8009
8488
|
if (state.switchU) {
|
|
8010
|
-
if (
|
|
8011
|
-
state.maxBackReference =
|
|
8489
|
+
if (n2 > state.maxBackReference) {
|
|
8490
|
+
state.maxBackReference = n2;
|
|
8012
8491
|
}
|
|
8013
8492
|
return true;
|
|
8014
8493
|
}
|
|
8015
|
-
if (
|
|
8494
|
+
if (n2 <= state.numCapturingParens) {
|
|
8016
8495
|
return true;
|
|
8017
8496
|
}
|
|
8018
8497
|
state.pos = start;
|
|
@@ -9455,11 +9934,11 @@ pp.readEscapedChar = function(inTemplate) {
|
|
|
9455
9934
|
};
|
|
9456
9935
|
pp.readHexChar = function(len) {
|
|
9457
9936
|
var codePos = this.pos;
|
|
9458
|
-
var
|
|
9459
|
-
if (
|
|
9937
|
+
var n2 = this.readInt(16, len);
|
|
9938
|
+
if (n2 === null) {
|
|
9460
9939
|
this.invalidStringToken(codePos, "Bad character escape sequence");
|
|
9461
9940
|
}
|
|
9462
|
-
return
|
|
9941
|
+
return n2;
|
|
9463
9942
|
};
|
|
9464
9943
|
pp.readWord1 = function() {
|
|
9465
9944
|
this.containsEsc = false;
|
|
@@ -10963,75 +11442,118 @@ function resolvePackage(name, options = {}) {
|
|
|
10963
11442
|
}
|
|
10964
11443
|
}
|
|
10965
11444
|
|
|
10966
|
-
// src/configs/
|
|
10967
|
-
|
|
11445
|
+
// src/configs/antfu.ts
|
|
11446
|
+
var antfu = async () => {
|
|
10968
11447
|
return [
|
|
10969
11448
|
{
|
|
10970
|
-
name: "jsse:
|
|
11449
|
+
name: "jsse:antfu",
|
|
10971
11450
|
plugins: {
|
|
10972
11451
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
10973
|
-
|
|
11452
|
+
antfu: default4
|
|
10974
11453
|
},
|
|
10975
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
10976
11454
|
rules: {
|
|
10977
|
-
|
|
10978
|
-
|
|
11455
|
+
"antfu/no-import-node-modules-by-path": "error",
|
|
11456
|
+
"antfu/top-level-function": "error"
|
|
10979
11457
|
}
|
|
10980
|
-
}
|
|
10981
|
-
];
|
|
10982
|
-
}
|
|
10983
|
-
|
|
10984
|
-
// src/configs/stylistic.ts
|
|
10985
|
-
function jsxStylistic({
|
|
10986
|
-
indent
|
|
10987
|
-
}) {
|
|
10988
|
-
return {
|
|
10989
|
-
"@stylistic/jsx-curly-brace-presence": [
|
|
10990
|
-
"error",
|
|
10991
|
-
{ propElementValues: "always" }
|
|
10992
|
-
],
|
|
10993
|
-
"@stylistic/jsx-indent": [
|
|
10994
|
-
"error",
|
|
10995
|
-
indent,
|
|
10996
|
-
{ checkAttributes: true, indentLogicalExpressions: true }
|
|
10997
|
-
],
|
|
10998
|
-
"@stylistic/jsx-quotes": "error"
|
|
10999
|
-
};
|
|
11000
|
-
}
|
|
11001
|
-
function stylistic(options = {}) {
|
|
11002
|
-
const { indent = 2, jsx = true, quotes = "double" } = options;
|
|
11003
|
-
return [
|
|
11458
|
+
},
|
|
11004
11459
|
{
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11008
|
-
"@stylistic": default2
|
|
11009
|
-
},
|
|
11460
|
+
files: ["**/src/**/*"],
|
|
11461
|
+
name: "jsse:antfu:bin",
|
|
11010
11462
|
rules: {
|
|
11011
|
-
"
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
|
|
11017
|
-
|
|
11463
|
+
"antfu/no-import-dist": "error"
|
|
11464
|
+
}
|
|
11465
|
+
},
|
|
11466
|
+
{
|
|
11467
|
+
files: ["**/bin/**/*", `**/bin.${GLOB_SRC_EXT}`],
|
|
11468
|
+
name: "jsse:antfu:bin",
|
|
11469
|
+
rules: {
|
|
11470
|
+
"antfu/no-import-dist": "off",
|
|
11471
|
+
"antfu/no-import-node-modules-by-path": "off"
|
|
11018
11472
|
}
|
|
11019
11473
|
}
|
|
11020
11474
|
];
|
|
11021
|
-
}
|
|
11475
|
+
};
|
|
11022
11476
|
|
|
11023
|
-
// src/
|
|
11024
|
-
var
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11029
|
-
|
|
11030
|
-
|
|
11477
|
+
// src/lager.ts
|
|
11478
|
+
var levels = {
|
|
11479
|
+
trace: 10,
|
|
11480
|
+
debug: 20,
|
|
11481
|
+
info: 30,
|
|
11482
|
+
warn: 40,
|
|
11483
|
+
error: 50,
|
|
11484
|
+
fatal: 60
|
|
11485
|
+
};
|
|
11486
|
+
function isLagerLevel(level) {
|
|
11487
|
+
return level === "trace" || level === "debug" || level === "info" || level === "warn" || level === "error" || level === "fatal";
|
|
11488
|
+
}
|
|
11489
|
+
var Lager = class {
|
|
11490
|
+
constructor(options) {
|
|
11491
|
+
this._level = "info";
|
|
11492
|
+
this.id = "lager";
|
|
11493
|
+
this.levelNo = levels[this._level];
|
|
11494
|
+
const { level, id } = {
|
|
11495
|
+
level: "info",
|
|
11496
|
+
id: "lager",
|
|
11497
|
+
...options
|
|
11498
|
+
};
|
|
11499
|
+
this.id = id;
|
|
11500
|
+
this._level = isLagerLevel(level) ? level : "info";
|
|
11501
|
+
this.levelNo = levels[this._level];
|
|
11502
|
+
this.log = this.log.bind(this);
|
|
11503
|
+
this.debug = this.debug.bind(this);
|
|
11504
|
+
}
|
|
11505
|
+
get level() {
|
|
11506
|
+
return this._level;
|
|
11507
|
+
}
|
|
11508
|
+
set level(level) {
|
|
11509
|
+
this._level = level;
|
|
11510
|
+
this.levelNo = levels[level];
|
|
11511
|
+
}
|
|
11512
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11513
|
+
log(...args) {
|
|
11514
|
+
console.log(...args);
|
|
11515
|
+
}
|
|
11516
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11517
|
+
trace(...args) {
|
|
11518
|
+
if (this.levelNo > levels.trace) {
|
|
11519
|
+
return;
|
|
11520
|
+
}
|
|
11521
|
+
console.trace(...args);
|
|
11522
|
+
}
|
|
11523
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11524
|
+
debug(...args) {
|
|
11525
|
+
if (this.levelNo > levels.debug) {
|
|
11526
|
+
return;
|
|
11527
|
+
}
|
|
11528
|
+
console.debug(...args);
|
|
11529
|
+
}
|
|
11530
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11531
|
+
info(...args) {
|
|
11532
|
+
if (this.levelNo > levels.info) {
|
|
11533
|
+
return;
|
|
11534
|
+
}
|
|
11535
|
+
console.info(...args);
|
|
11536
|
+
}
|
|
11537
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11538
|
+
warn(...args) {
|
|
11539
|
+
if (this.levelNo > levels.warn) {
|
|
11540
|
+
return;
|
|
11541
|
+
}
|
|
11542
|
+
console.warn(...args);
|
|
11543
|
+
}
|
|
11544
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11545
|
+
error(...args) {
|
|
11546
|
+
if (this.levelNo > levels.error) {
|
|
11547
|
+
return;
|
|
11548
|
+
}
|
|
11549
|
+
console.error(...args);
|
|
11550
|
+
}
|
|
11551
|
+
};
|
|
11552
|
+
var log = new Lager();
|
|
11031
11553
|
|
|
11032
11554
|
// src/configs/md.ts
|
|
11033
|
-
|
|
11034
|
-
const { componentExts = [], overrides = {} } = options;
|
|
11555
|
+
var markdown = async (options) => {
|
|
11556
|
+
const { componentExts = [], overrides = {} } = options ?? {};
|
|
11035
11557
|
const tsRulesOff = Object.fromEntries(
|
|
11036
11558
|
// @ts-expect-error - undefined
|
|
11037
11559
|
Object.keys(typescriptRulesTypeAware()).map((key) => [
|
|
@@ -11044,7 +11566,7 @@ function markdown(options = {}) {
|
|
|
11044
11566
|
name: "jsse:markdown:setup",
|
|
11045
11567
|
plugins: {
|
|
11046
11568
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
11047
|
-
markdown:
|
|
11569
|
+
markdown: default7
|
|
11048
11570
|
}
|
|
11049
11571
|
},
|
|
11050
11572
|
{
|
|
@@ -11091,11 +11613,72 @@ function markdown(options = {}) {
|
|
|
11091
11613
|
}
|
|
11092
11614
|
}
|
|
11093
11615
|
];
|
|
11616
|
+
};
|
|
11617
|
+
|
|
11618
|
+
// src/configs/stylistic.ts
|
|
11619
|
+
function jsxStylistic({
|
|
11620
|
+
indent
|
|
11621
|
+
}) {
|
|
11622
|
+
return {
|
|
11623
|
+
"@stylistic/jsx-curly-brace-presence": [
|
|
11624
|
+
"error",
|
|
11625
|
+
{ propElementValues: "always" }
|
|
11626
|
+
],
|
|
11627
|
+
"@stylistic/jsx-indent": [
|
|
11628
|
+
"error",
|
|
11629
|
+
indent,
|
|
11630
|
+
{ checkAttributes: true, indentLogicalExpressions: true }
|
|
11631
|
+
],
|
|
11632
|
+
"@stylistic/jsx-quotes": "error"
|
|
11633
|
+
};
|
|
11094
11634
|
}
|
|
11635
|
+
var stylistic = async (options) => {
|
|
11636
|
+
const { indent = 2, jsx = true, quotes = "double" } = options ?? {};
|
|
11637
|
+
return [
|
|
11638
|
+
{
|
|
11639
|
+
name: "jsse:stylistic",
|
|
11640
|
+
plugins: {
|
|
11641
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11642
|
+
"@stylistic": default2
|
|
11643
|
+
},
|
|
11644
|
+
rules: {
|
|
11645
|
+
"@stylistic/quote-props": ["error", "as-needed"],
|
|
11646
|
+
"@stylistic/quotes": [
|
|
11647
|
+
"error",
|
|
11648
|
+
quotes,
|
|
11649
|
+
{ allowTemplateLiterals: false, avoidEscape: true }
|
|
11650
|
+
],
|
|
11651
|
+
...jsx ? jsxStylistic({ indent }) : {}
|
|
11652
|
+
}
|
|
11653
|
+
}
|
|
11654
|
+
];
|
|
11655
|
+
};
|
|
11656
|
+
|
|
11657
|
+
// src/configs/tailwind.ts
|
|
11658
|
+
var tailwind = async () => {
|
|
11659
|
+
return [
|
|
11660
|
+
{
|
|
11661
|
+
name: "jsse:tailwind",
|
|
11662
|
+
plugins: {
|
|
11663
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
11664
|
+
tailwindcss: default13
|
|
11665
|
+
},
|
|
11666
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
11667
|
+
rules: {
|
|
11668
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
11669
|
+
...default13.configs.recommended.rules
|
|
11670
|
+
}
|
|
11671
|
+
}
|
|
11672
|
+
];
|
|
11673
|
+
};
|
|
11095
11674
|
|
|
11096
11675
|
// src/configs/yml.ts
|
|
11097
|
-
|
|
11098
|
-
const {
|
|
11676
|
+
var yml = async (options) => {
|
|
11677
|
+
const {
|
|
11678
|
+
files = [GLOB_YAML],
|
|
11679
|
+
overrides = {},
|
|
11680
|
+
stylistic: stylistic2 = true
|
|
11681
|
+
} = options ?? {};
|
|
11099
11682
|
const { indent = 2, quotes = "single" } = typeof stylistic2 === "boolean" ? {} : stylistic2;
|
|
11100
11683
|
const [pluginYaml, parserYaml] = await Promise.all([
|
|
11101
11684
|
interopDefault(import("eslint-plugin-yml")),
|
|
@@ -11140,7 +11723,16 @@ async function yml(options = {}) {
|
|
|
11140
11723
|
}
|
|
11141
11724
|
}
|
|
11142
11725
|
];
|
|
11143
|
-
}
|
|
11726
|
+
};
|
|
11727
|
+
|
|
11728
|
+
// src/slow.ts
|
|
11729
|
+
var slowRules = [
|
|
11730
|
+
"@typescript-eslint/no-misused-promises",
|
|
11731
|
+
"@typescript-eslint/no-unsafe-assignment",
|
|
11732
|
+
"@typescript-eslint/no-unsafe-call",
|
|
11733
|
+
"@typescript-eslint/no-unsafe-member-access",
|
|
11734
|
+
"@typescript-eslint/no-unsafe-return"
|
|
11735
|
+
];
|
|
11144
11736
|
|
|
11145
11737
|
// src/factory.ts
|
|
11146
11738
|
var flatConfigProps = [
|
|
@@ -11153,10 +11745,11 @@ var flatConfigProps = [
|
|
|
11153
11745
|
"rules",
|
|
11154
11746
|
"settings"
|
|
11155
11747
|
];
|
|
11748
|
+
var DEBUG = !!(process5.env.DEBUG?.toLowerCase() === "true" || process5.env.DEBUG === "1");
|
|
11156
11749
|
function defaultOptions2() {
|
|
11157
11750
|
return {
|
|
11158
11751
|
componentExts: [],
|
|
11159
|
-
debug:
|
|
11752
|
+
debug: DEBUG && process5.env.TEST !== "true",
|
|
11160
11753
|
fast: false,
|
|
11161
11754
|
gitignore: true,
|
|
11162
11755
|
isInEditor: isInEditor(),
|
|
@@ -11167,6 +11760,7 @@ function defaultOptions2() {
|
|
|
11167
11760
|
prettier: true,
|
|
11168
11761
|
react: false,
|
|
11169
11762
|
reportUnusedDisableDirectives: true,
|
|
11763
|
+
rootId: "jsse",
|
|
11170
11764
|
stylistic: true,
|
|
11171
11765
|
test: true,
|
|
11172
11766
|
tsPrefix: "@typescript-eslint",
|
|
@@ -11212,13 +11806,33 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
11212
11806
|
typescript: enableTypeScript
|
|
11213
11807
|
} = normalizedOptions;
|
|
11214
11808
|
if (debug) {
|
|
11215
|
-
|
|
11216
|
-
console.log("@jsse/eslint-config isInEditor", isInEditor2);
|
|
11217
|
-
console.log("@jsse/eslint-config enableTypeScript", enableTypeScript);
|
|
11809
|
+
log.level = "debug";
|
|
11218
11810
|
}
|
|
11811
|
+
log.debug("@jsse/eslint-config debug=true");
|
|
11812
|
+
log.debug("@jsse/eslint-config isInEditor", isInEditor2);
|
|
11813
|
+
log.debug("@jsse/eslint-config enableTypeScript", enableTypeScript);
|
|
11814
|
+
log.debug("@jsse/eslint-config normalizedOptions", normalizedOptions);
|
|
11219
11815
|
const configs = [];
|
|
11220
|
-
if (enableGitignore
|
|
11221
|
-
|
|
11816
|
+
if (enableGitignore) {
|
|
11817
|
+
if (typeof enableGitignore === "boolean") {
|
|
11818
|
+
if (fs2.existsSync(".gitignore"))
|
|
11819
|
+
configs.push(
|
|
11820
|
+
interopDefault(import("eslint-config-flat-gitignore")).then((r2) => {
|
|
11821
|
+
const res = r2();
|
|
11822
|
+
log.debug("Using eslint-config-flat-gitignore", res);
|
|
11823
|
+
return [res];
|
|
11824
|
+
})
|
|
11825
|
+
);
|
|
11826
|
+
} else {
|
|
11827
|
+
configs.push(
|
|
11828
|
+
interopDefault(import("eslint-config-flat-gitignore")).then((r2) => {
|
|
11829
|
+
log.debug("Using eslint-config-flat-gitignore", r2);
|
|
11830
|
+
const res = r2(enableGitignore);
|
|
11831
|
+
log.debug("Using eslint-config-flat-gitignore", res);
|
|
11832
|
+
return [res];
|
|
11833
|
+
})
|
|
11834
|
+
);
|
|
11835
|
+
}
|
|
11222
11836
|
}
|
|
11223
11837
|
configs.push(
|
|
11224
11838
|
ignores(),
|
|
@@ -11228,16 +11842,17 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
11228
11842
|
reportUnusedDisableDirectives
|
|
11229
11843
|
}),
|
|
11230
11844
|
comments(),
|
|
11231
|
-
|
|
11845
|
+
n(),
|
|
11232
11846
|
jsdoc(),
|
|
11233
11847
|
imports({
|
|
11234
11848
|
stylistic: stylisticOptions
|
|
11235
11849
|
}),
|
|
11236
11850
|
unicorn(),
|
|
11851
|
+
antfu(),
|
|
11237
11852
|
perfectionist()
|
|
11238
11853
|
);
|
|
11239
11854
|
if (enableTypeScript) {
|
|
11240
|
-
const tscfg =
|
|
11855
|
+
const tscfg = typescript({
|
|
11241
11856
|
...typeof enableTypeScript === "boolean" ? {} : enableTypeScript,
|
|
11242
11857
|
componentExts,
|
|
11243
11858
|
overrides: overrides.typescript,
|
|
@@ -11254,7 +11869,7 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
11254
11869
|
configs.push(markdown());
|
|
11255
11870
|
}
|
|
11256
11871
|
if (normalizedOptions.yaml) {
|
|
11257
|
-
const ymlConfig =
|
|
11872
|
+
const ymlConfig = yml();
|
|
11258
11873
|
configs.push(ymlConfig);
|
|
11259
11874
|
}
|
|
11260
11875
|
if (normalizedOptions.react) {
|
|
@@ -11301,7 +11916,22 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
11301
11916
|
if (Object.keys(fusedConfig).length > 0) {
|
|
11302
11917
|
configs.push([fusedConfig]);
|
|
11303
11918
|
}
|
|
11919
|
+
const combinedConfigs = await combineAsync(...configs, ...userConfigs);
|
|
11304
11920
|
if (off && off.length > 0) {
|
|
11921
|
+
log.debug("Turning off rules", off);
|
|
11922
|
+
const currentlyActiveRules = /* @__PURE__ */ new Set();
|
|
11923
|
+
combinedConfigs.forEach((config) => {
|
|
11924
|
+
Object.keys(config.rules ?? {}).forEach(
|
|
11925
|
+
(rule) => currentlyActiveRules.add(rule)
|
|
11926
|
+
);
|
|
11927
|
+
});
|
|
11928
|
+
off.forEach((rule) => {
|
|
11929
|
+
if (!currentlyActiveRules.has(rule)) {
|
|
11930
|
+
log.info(
|
|
11931
|
+
`Rule \`${rule}\` is not active in the current config, you can remove it from the off list`
|
|
11932
|
+
);
|
|
11933
|
+
}
|
|
11934
|
+
});
|
|
11305
11935
|
configs.push(
|
|
11306
11936
|
off.map((rule) => ({
|
|
11307
11937
|
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
@@ -11311,7 +11941,32 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
11311
11941
|
}))
|
|
11312
11942
|
);
|
|
11313
11943
|
}
|
|
11314
|
-
|
|
11944
|
+
if (normalizedOptions.rootId !== "jsse") {
|
|
11945
|
+
combinedConfigs.forEach((config) => {
|
|
11946
|
+
if (config.name && config.name.startsWith("jsse:")) {
|
|
11947
|
+
config.name = config.name.replace(
|
|
11948
|
+
"jsse:",
|
|
11949
|
+
`${normalizedOptions.rootId}:`
|
|
11950
|
+
);
|
|
11951
|
+
}
|
|
11952
|
+
});
|
|
11953
|
+
}
|
|
11954
|
+
if (normalizedOptions.preReturn) {
|
|
11955
|
+
log.debug("Running preReturn");
|
|
11956
|
+
const preReturned = normalizedOptions.preReturn(combinedConfigs);
|
|
11957
|
+
if (preReturned instanceof Promise) {
|
|
11958
|
+
const res = await preReturned;
|
|
11959
|
+
log.debug("preReturn finished");
|
|
11960
|
+
log.debug("final config", res);
|
|
11961
|
+
return res;
|
|
11962
|
+
} else {
|
|
11963
|
+
const res = preReturned;
|
|
11964
|
+
log.debug("preReturn finished");
|
|
11965
|
+
log.debug("final config", res);
|
|
11966
|
+
return res;
|
|
11967
|
+
}
|
|
11968
|
+
}
|
|
11969
|
+
return combinedConfigs;
|
|
11315
11970
|
}
|
|
11316
11971
|
|
|
11317
11972
|
// src/presets.ts
|
|
@@ -11352,6 +12007,7 @@ export {
|
|
|
11352
12007
|
GLOB_TSX,
|
|
11353
12008
|
GLOB_YAML,
|
|
11354
12009
|
combine,
|
|
12010
|
+
combineAsync,
|
|
11355
12011
|
comments,
|
|
11356
12012
|
jsse as default,
|
|
11357
12013
|
eslintConfigPrettierRules,
|
|
@@ -11366,28 +12022,29 @@ export {
|
|
|
11366
12022
|
jsse,
|
|
11367
12023
|
jsseReact,
|
|
11368
12024
|
jssestd,
|
|
11369
|
-
|
|
11370
|
-
|
|
12025
|
+
n,
|
|
12026
|
+
default17 as parserJsonc,
|
|
11371
12027
|
parserTs,
|
|
11372
12028
|
perfectionist,
|
|
11373
|
-
default4 as
|
|
12029
|
+
default4 as pluginAntfu,
|
|
12030
|
+
default5 as pluginEslintComments,
|
|
11374
12031
|
pluginImport,
|
|
11375
|
-
|
|
12032
|
+
default6 as pluginJsdoc,
|
|
11376
12033
|
pluginJsonc,
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
|
|
11381
|
-
|
|
11382
|
-
|
|
12034
|
+
default7 as pluginMarkdown,
|
|
12035
|
+
default8 as pluginN,
|
|
12036
|
+
default9 as pluginNoOnlyTests,
|
|
12037
|
+
default10 as pluginPerfectionist,
|
|
12038
|
+
default11 as pluginReact,
|
|
12039
|
+
default12 as pluginReactHooks,
|
|
11383
12040
|
pluginReactRefresh,
|
|
11384
12041
|
pluginSortKeys,
|
|
11385
12042
|
default2 as pluginStylistic,
|
|
11386
|
-
|
|
12043
|
+
default13 as pluginTailwind,
|
|
11387
12044
|
default3 as pluginTs,
|
|
11388
|
-
|
|
11389
|
-
|
|
11390
|
-
|
|
12045
|
+
default14 as pluginUnicorn,
|
|
12046
|
+
default15 as pluginUnusedImports,
|
|
12047
|
+
default16 as pluginVitest,
|
|
11391
12048
|
prettier,
|
|
11392
12049
|
react,
|
|
11393
12050
|
reactHooks,
|