-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(es/config): Accept
jsc.experimental.keepImportAssertions
(#7995)
**Related issue:** - Closes #7923.
- Loading branch information
Showing
4 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/swcrc", | ||
"jsc": { | ||
"parser": { | ||
"syntax": "typescript" | ||
}, | ||
"target": "es2022", | ||
"experimental": { | ||
"keepImportAssertions": true, | ||
"emitAssertForImportAttributes": true | ||
} | ||
}, | ||
"module": { | ||
"type": "es6" | ||
}, | ||
"isModule": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import packageJSON from "./package.json" assert { type: "json" }; | ||
|
||
console.log(packageJSON) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import packageJSON from "./package.json" assert { | ||
type: "json" | ||
}; | ||
console.log(packageJSON); |
4d777ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
es/full/bugs-1
283240
ns/iter (± 7254
)297607
ns/iter (± 8541
)0.95
es/full/minify/libraries/antd
1296888030
ns/iter (± 13059408
)1283896678
ns/iter (± 4594032
)1.01
es/full/minify/libraries/d3
269135674
ns/iter (± 8073816
)274417339
ns/iter (± 2726438
)0.98
es/full/minify/libraries/echarts
1030946492
ns/iter (± 4831296
)1029627309
ns/iter (± 2813423
)1.00
es/full/minify/libraries/jquery
83643992
ns/iter (± 121682
)83825385
ns/iter (± 176378
)1.00
es/full/minify/libraries/lodash
96553814
ns/iter (± 231185
)96655034
ns/iter (± 518171
)1.00
es/full/minify/libraries/moment
49393130
ns/iter (± 80265
)49633868
ns/iter (± 171645
)1.00
es/full/minify/libraries/react
17891753
ns/iter (± 68805
)17970240
ns/iter (± 52560
)1.00
es/full/minify/libraries/terser
215076483
ns/iter (± 487305
)215533657
ns/iter (± 443593
)1.00
es/full/minify/libraries/three
379500770
ns/iter (± 1689192
)381557056
ns/iter (± 1048138
)0.99
es/full/minify/libraries/typescript
2611459704
ns/iter (± 8794086
)2615778577
ns/iter (± 10439416
)1.00
es/full/minify/libraries/victory
555289440
ns/iter (± 1072699
)554696831
ns/iter (± 2742219
)1.00
es/full/minify/libraries/vue
118549009
ns/iter (± 288783
)118846659
ns/iter (± 171917
)1.00
es/full/codegen/es3
33117
ns/iter (± 104
)34024
ns/iter (± 92
)0.97
es/full/codegen/es5
33090
ns/iter (± 131
)33979
ns/iter (± 48
)0.97
es/full/codegen/es2015
33182
ns/iter (± 124
)34045
ns/iter (± 196
)0.97
es/full/codegen/es2016
33181
ns/iter (± 130
)34000
ns/iter (± 67
)0.98
es/full/codegen/es2017
33021
ns/iter (± 47
)34111
ns/iter (± 167
)0.97
es/full/codegen/es2018
33059
ns/iter (± 70
)34010
ns/iter (± 89
)0.97
es/full/codegen/es2019
33108
ns/iter (± 109
)34058
ns/iter (± 66
)0.97
es/full/codegen/es2020
33041
ns/iter (± 105
)33937
ns/iter (± 100
)0.97
es/full/all/es3
170099877
ns/iter (± 1195318
)166978566
ns/iter (± 666042
)1.02
es/full/all/es5
161228901
ns/iter (± 993254
)159012941
ns/iter (± 970484
)1.01
es/full/all/es2015
120218999
ns/iter (± 1305778
)119122138
ns/iter (± 711059
)1.01
es/full/all/es2016
119877490
ns/iter (± 1083904
)117911983
ns/iter (± 317688
)1.02
es/full/all/es2017
118158402
ns/iter (± 1418573
)117627730
ns/iter (± 516064
)1.00
es/full/all/es2018
115648685
ns/iter (± 1046126
)116040373
ns/iter (± 855054
)1.00
es/full/all/es2019
115548679
ns/iter (± 927669
)114897776
ns/iter (± 577638
)1.01
es/full/all/es2020
111699163
ns/iter (± 617339
)111262511
ns/iter (± 835463
)1.00
es/full/parser
489365
ns/iter (± 5482
)489766
ns/iter (± 5675
)1.00
es/full/base/fixer
20000
ns/iter (± 350
)17246
ns/iter (± 90
)1.16
es/full/base/resolver_and_hygiene
79810
ns/iter (± 171
)80893
ns/iter (± 194
)0.99
serialization of serde
292
ns/iter (± 1
)281
ns/iter (± 5
)1.04
css/minify/libraries/bootstrap
28702854
ns/iter (± 44832
)28594055
ns/iter (± 113718
)1.00
css/visitor/compare/clone
1658890
ns/iter (± 3192
)1678181
ns/iter (± 3846
)0.99
css/visitor/compare/visit_mut_span
1792290
ns/iter (± 5764
)1810458
ns/iter (± 6767
)0.99
css/visitor/compare/visit_mut_span_panic
1862530
ns/iter (± 5461
)1853377
ns/iter (± 8012
)1.00
css/visitor/compare/fold_span
2582462
ns/iter (± 9925
)2557621
ns/iter (± 6513
)1.01
css/visitor/compare/fold_span_panic
2778904
ns/iter (± 9362
)2757814
ns/iter (± 10065
)1.01
css/lexer/bootstrap_5_1_3
4417824
ns/iter (± 2944
)4390570
ns/iter (± 3026
)1.01
css/lexer/foundation_6_7_4
3729092
ns/iter (± 1704
)3698518
ns/iter (± 1701
)1.01
css/lexer/tailwind_3_1_1
710483
ns/iter (± 408
)704555
ns/iter (± 673
)1.01
css/parser/bootstrap_5_1_3
19294308
ns/iter (± 31077
)19038527
ns/iter (± 61870
)1.01
css/parser/foundation_6_7_4
15349917
ns/iter (± 23549
)15328075
ns/iter (± 19321
)1.00
css/parser/tailwind_3_1_1
2930985
ns/iter (± 1693
)2998017
ns/iter (± 8495
)0.98
es/codegen/colors
728131
ns/iter (± 396683
)733587
ns/iter (± 398671
)0.99
es/codegen/large
3140778
ns/iter (± 1666760
)3120948
ns/iter (± 1643783
)1.01
es/codegen/with-parser/colors
45635
ns/iter (± 566
)45218
ns/iter (± 498
)1.01
es/codegen/with-parser/large
493846
ns/iter (± 567
)490148
ns/iter (± 1680
)1.01
es/minify/libraries/antd
1130360904
ns/iter (± 4179013
)1126214268
ns/iter (± 5520519
)1.00
es/minify/libraries/d3
238278105
ns/iter (± 316502
)237276772
ns/iter (± 182268
)1.00
es/minify/libraries/echarts
885626532
ns/iter (± 1930322
)886446876
ns/iter (± 2526154
)1.00
es/minify/libraries/jquery
73296836
ns/iter (± 146269
)73079015
ns/iter (± 189367
)1.00
es/minify/libraries/lodash
86931852
ns/iter (± 206022
)86857909
ns/iter (± 449507
)1.00
es/minify/libraries/moment
43603566
ns/iter (± 54507
)43460577
ns/iter (± 44601
)1.00
es/minify/libraries/react
16073564
ns/iter (± 40473
)16053523
ns/iter (± 37702
)1.00
es/minify/libraries/terser
185073348
ns/iter (± 388583
)185316046
ns/iter (± 511675
)1.00
es/minify/libraries/three
318865624
ns/iter (± 1340933
)318208819
ns/iter (± 997911
)1.00
es/minify/libraries/typescript
2226914408
ns/iter (± 7853767
)2210895606
ns/iter (± 7098106
)1.01
es/minify/libraries/victory
467215028
ns/iter (± 1625987
)473703488
ns/iter (± 1357807
)0.99
es/minify/libraries/vue
106117817
ns/iter (± 279455
)105926932
ns/iter (± 220188
)1.00
es/visitor/compare/clone
1984341
ns/iter (± 11036
)1947651
ns/iter (± 4497
)1.02
es/visitor/compare/visit_mut_span
2321145
ns/iter (± 3886
)2287648
ns/iter (± 2497
)1.01
es/visitor/compare/visit_mut_span_panic
2368963
ns/iter (± 2585
)2328482
ns/iter (± 3404
)1.02
es/visitor/compare/fold_span
3420873
ns/iter (± 10195
)3374126
ns/iter (± 5366
)1.01
es/visitor/compare/fold_span_panic
3531160
ns/iter (± 8429
)3524103
ns/iter (± 6734
)1.00
es/lexer/colors
13129
ns/iter (± 69
)12987
ns/iter (± 29
)1.01
es/lexer/angular
6082539
ns/iter (± 27162
)6048882
ns/iter (± 4899
)1.01
es/lexer/backbone
790861
ns/iter (± 2448
)783688
ns/iter (± 1587
)1.01
es/lexer/jquery
4480271
ns/iter (± 11093
)4457157
ns/iter (± 7582
)1.01
es/lexer/jquery mobile
6827525
ns/iter (± 8624
)6799878
ns/iter (± 3546
)1.00
es/lexer/mootools
3541648
ns/iter (± 2573
)3552536
ns/iter (± 3605
)1.00
es/lexer/underscore
660445
ns/iter (± 2560
)657814
ns/iter (± 584
)1.00
es/lexer/three
21303476
ns/iter (± 26449
)21234086
ns/iter (± 22684
)1.00
es/lexer/yui
3801815
ns/iter (± 1645
)3811984
ns/iter (± 3565
)1.00
es/parser/colors
27433
ns/iter (± 59
)27183
ns/iter (± 306
)1.01
es/parser/angular
13642420
ns/iter (± 63125
)13464198
ns/iter (± 62492
)1.01
es/parser/backbone
1998844
ns/iter (± 8229
)1978158
ns/iter (± 6890
)1.01
es/parser/jquery
10890298
ns/iter (± 46957
)10804561
ns/iter (± 32622
)1.01
es/parser/jquery mobile
16717955
ns/iter (± 53104
)16563899
ns/iter (± 38647
)1.01
es/parser/mootools
8404599
ns/iter (± 13437
)8293186
ns/iter (± 22110
)1.01
es/parser/underscore
1726729
ns/iter (± 9525
)1703983
ns/iter (± 9088
)1.01
es/parser/three
46980362
ns/iter (± 134006
)46269613
ns/iter (± 184271
)1.02
es/parser/yui
8347608
ns/iter (± 66983
)8242486
ns/iter (± 43097
)1.01
es/preset-env/usage/builtin_type
136532
ns/iter (± 32308
)137214
ns/iter (± 32344
)1.00
es/preset-env/usage/property
16930
ns/iter (± 40
)17750
ns/iter (± 76
)0.95
es/resolver/typescript
88782878
ns/iter (± 1400300
)90003999
ns/iter (± 933630
)0.99
es/fixer/typescript
63927277
ns/iter (± 1144102
)63726236
ns/iter (± 338585
)1.00
es/hygiene/typescript
130305792
ns/iter (± 828110
)129647575
ns/iter (± 853641
)1.01
es/resolver_with_hygiene/typescript
239742106
ns/iter (± 1079473
)241726141
ns/iter (± 1133580
)0.99
es/visitor/base-perf/module_clone
58500
ns/iter (± 387
)58654
ns/iter (± 335
)1.00
es/visitor/base-perf/fold_empty
62664
ns/iter (± 281
)62449
ns/iter (± 318
)1.00
es/visitor/base-perf/fold_noop_impl_all
63211
ns/iter (± 282
)63030
ns/iter (± 298
)1.00
es/visitor/base-perf/fold_noop_impl_vec
63169
ns/iter (± 250
)63594
ns/iter (± 378
)0.99
es/visitor/base-perf/boxing_boxed_clone
56
ns/iter (± 0
)55
ns/iter (± 0
)1.02
es/visitor/base-perf/boxing_unboxed_clone
40
ns/iter (± 0
)39
ns/iter (± 0
)1.03
es/visitor/base-perf/boxing_boxed
105
ns/iter (± 0
)108
ns/iter (± 0
)0.97
es/visitor/base-perf/boxing_unboxed
75
ns/iter (± 0
)77
ns/iter (± 0
)0.97
es/visitor/base-perf/visit_empty
0
ns/iter (± 0
)0
ns/iter (± 0
)NaN
es/visitor/base-perf/visit_contains_this
2540
ns/iter (± 17
)2498
ns/iter (± 10
)1.02
es/base/parallel/resolver/typescript
3883603621
ns/iter (± 256419883
)3638941708
ns/iter (± 300674919
)1.07
es/base/parallel/hygiene/typescript
1434465689
ns/iter (± 16512604
)1459946319
ns/iter (± 13387235
)0.98
misc/visitors/time-complexity/time 5
133
ns/iter (± 7
)150
ns/iter (± 0
)0.89
misc/visitors/time-complexity/time 10
411
ns/iter (± 0
)438
ns/iter (± 0
)0.94
misc/visitors/time-complexity/time 15
788
ns/iter (± 2
)797
ns/iter (± 2
)0.99
misc/visitors/time-complexity/time 20
1282
ns/iter (± 5
)1459
ns/iter (± 73
)0.88
misc/visitors/time-complexity/time 40
4357
ns/iter (± 8
)4396
ns/iter (± 23
)0.99
misc/visitors/time-complexity/time 60
8986
ns/iter (± 12
)9129
ns/iter (± 18
)0.98
es/full-target/es2016
235573
ns/iter (± 677
)237026
ns/iter (± 1344
)0.99
es/full-target/es2017
222295
ns/iter (± 788
)221679
ns/iter (± 1051
)1.00
es/full-target/es2018
210633
ns/iter (± 576
)210171
ns/iter (± 658
)1.00
es2020_nullish_coalescing
71153
ns/iter (± 329
)72170
ns/iter (± 380
)0.99
es2020_optional_chaining
77231
ns/iter (± 148
)77487
ns/iter (± 348
)1.00
es2022_class_properties
115695
ns/iter (± 252
)115808
ns/iter (± 519
)1.00
es2018_object_rest_spread
74636
ns/iter (± 201
)75249
ns/iter (± 170
)0.99
es2019_optional_catch_binding
65249
ns/iter (± 300
)65121
ns/iter (± 257
)1.00
es2017_async_to_generator
64873
ns/iter (± 165
)64291
ns/iter (± 155
)1.01
es2016_exponentiation
69587
ns/iter (± 242
)67827
ns/iter (± 949
)1.03
es2015_arrow
72921
ns/iter (± 418
)70239
ns/iter (± 226
)1.04
es2015_block_scoped_fn
68986
ns/iter (± 193
)66914
ns/iter (± 173
)1.03
es2015_block_scoping
123616
ns/iter (± 343
)121331
ns/iter (± 333
)1.02
This comment was automatically generated by workflow using github-action-benchmark.