File tree 5 files changed +2
-55
lines changed
5 files changed +2
-55
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -21,14 +21,6 @@ fn issue_4390() {
21
21
dbg ! ( & rc) ;
22
22
}
23
23
24
- #[ test]
25
- fn issue_1532 ( ) {
26
- let res = serde_json:: from_str :: < Options > ( include_str ! ( "issue-1532.json" ) ) ;
27
-
28
- let err = res. expect_err ( "should fail" ) ;
29
- assert ! ( err. to_string( ) . contains( "unknown variant `esnext`" ) ) ;
30
- }
31
-
32
24
#[ test]
33
25
fn jsonc ( ) {
34
26
let rc = parse_swcrc ( include_str ! ( "jsonc.json" ) ) . expect ( "failed to parse" ) ;
Original file line number Diff line number Diff line change @@ -40,14 +40,6 @@ fn swcrc_simple() {
40
40
println ! ( "{}" , f) ;
41
41
}
42
42
43
- #[ test]
44
- fn issue_1532 ( ) {
45
- let f = file ( "tests/swcrc_errors/issue-1532/index.js" ) ;
46
- println ! ( "{}" , f) ;
47
-
48
- assert ! ( f. contains( "unknown variant `esnext`" ) )
49
- }
50
-
51
43
#[ testing:: fixture( "tests/errors/**/input.js" ) ]
52
44
#[ testing:: fixture( "tests/errors/**/input.ts" ) ]
53
45
fn fixture ( input : PathBuf ) {
Original file line number Diff line number Diff line change @@ -126,6 +126,8 @@ pub enum EsVersion {
126
126
Es2021 ,
127
127
#[ serde( rename = "es2022" ) ]
128
128
Es2022 ,
129
+ #[ serde( rename = "esnext" ) ]
130
+ EsNext ,
129
131
}
130
132
131
133
impl EsVersion {
Original file line number Diff line number Diff line change @@ -10,34 +10,6 @@ it("should work", () => {
10
10
} ) . toThrow ( "jsc" ) ;
11
11
} ) ;
12
12
13
-
14
- it ( "should work" , ( ) => {
15
- expect ( ( ) => {
16
- const filename = 'index.ts' ;
17
-
18
- const code = `
19
- export async function getDependency(): Promise<any> {
20
- return import('./dep').then(({dependency}) => dependency);
21
- }
22
- `
23
-
24
- const options = {
25
- jsc : {
26
- parser : {
27
- syntax : 'typescript' ,
28
- dynamicImport : true
29
- } ,
30
- externalHelpers : true ,
31
- target : 'esnext'
32
- } ,
33
- sourceMaps : true ,
34
- filename
35
- }
36
-
37
- swc . transformSync ( code , options )
38
- } ) . toThrow ( "unknown variant `esnext`" ) ;
39
- } ) ;
40
-
41
13
it ( "should report good error" , ( ) => {
42
14
expect ( ( ) => {
43
15
swc . transformFileSync ( __dirname + "/../tests/error/simple.js" ) ;
You can’t perform that action at this time.
1 commit comments
github-actions[bot] commentedon Jan 16, 2023
Benchmark
es/full/bugs-1
295111
ns/iter (± 16896
)304515
ns/iter (± 7450
)0.97
es/full/minify/libraries/antd
1680128647
ns/iter (± 23547024
)1854877937
ns/iter (± 31292205
)0.91
es/full/minify/libraries/d3
302234398
ns/iter (± 6244631
)312642764
ns/iter (± 13335425
)0.97
es/full/minify/libraries/echarts
1256390360
ns/iter (± 8714939
)1381907367
ns/iter (± 25433493
)0.91
es/full/minify/libraries/jquery
89492168
ns/iter (± 412475
)91833579
ns/iter (± 2132950
)0.97
es/full/minify/libraries/lodash
104962716
ns/iter (± 1213045
)109116610
ns/iter (± 1593623
)0.96
es/full/minify/libraries/moment
52532509
ns/iter (± 416623
)54411793
ns/iter (± 856876
)0.97
es/full/minify/libraries/react
18983768
ns/iter (± 111898
)19261678
ns/iter (± 166101
)0.99
es/full/minify/libraries/terser
245494361
ns/iter (± 1401205
)266904267
ns/iter (± 6290252
)0.92
es/full/minify/libraries/three
437974852
ns/iter (± 3795905
)489623040
ns/iter (± 13274416
)0.89
es/full/minify/libraries/typescript
3209235567
ns/iter (± 11931984
)3428460748
ns/iter (± 29308447
)0.94
es/full/minify/libraries/victory
669307232
ns/iter (± 7648092
)741289873
ns/iter (± 24994798
)0.90
es/full/minify/libraries/vue
129886275
ns/iter (± 854848
)134819730
ns/iter (± 3097038
)0.96
es/full/codegen/es3
26251
ns/iter (± 140
)27791
ns/iter (± 72
)0.94
es/full/codegen/es5
26250
ns/iter (± 39
)27757
ns/iter (± 129
)0.95
es/full/codegen/es2015
26266
ns/iter (± 62
)27671
ns/iter (± 110
)0.95
es/full/codegen/es2016
26210
ns/iter (± 59
)27636
ns/iter (± 103
)0.95
es/full/codegen/es2017
26226
ns/iter (± 80
)27636
ns/iter (± 78
)0.95
es/full/codegen/es2018
26216
ns/iter (± 63
)27650
ns/iter (± 120
)0.95
es/full/codegen/es2019
26194
ns/iter (± 101
)27662
ns/iter (± 59
)0.95
es/full/codegen/es2020
26142
ns/iter (± 121
)27660
ns/iter (± 69
)0.95
es/full/all/es3
169238517
ns/iter (± 3014886
)170640653
ns/iter (± 3765234
)0.99
es/full/all/es5
162000014
ns/iter (± 4491625
)161551892
ns/iter (± 3211046
)1.00
es/full/all/es2015
123066283
ns/iter (± 1280961
)121008773
ns/iter (± 904803
)1.02
es/full/all/es2016
120950620
ns/iter (± 672051
)119084216
ns/iter (± 1141781
)1.02
es/full/all/es2017
120414797
ns/iter (± 771047
)118727818
ns/iter (± 1066007
)1.01
es/full/all/es2018
119106359
ns/iter (± 733289
)116879747
ns/iter (± 1365651
)1.02
es/full/all/es2019
118196666
ns/iter (± 735222
)115794814
ns/iter (± 1203764
)1.02
es/full/all/es2020
113395914
ns/iter (± 986321
)112165781
ns/iter (± 817712
)1.01
es/full/parser
539176
ns/iter (± 8153
)514672
ns/iter (± 7100
)1.05
es/full/base/fixer
22065
ns/iter (± 43
)22163
ns/iter (± 137
)1.00
es/full/base/resolver_and_hygiene
79831
ns/iter (± 105
)77632
ns/iter (± 103
)1.03
serialization of ast node
145
ns/iter (± 0
)118
ns/iter (± 0
)1.23
serialization of serde
132
ns/iter (± 0
)122
ns/iter (± 0
)1.08
css/minify/libraries/bootstrap
27755783
ns/iter (± 247454
)27809179
ns/iter (± 214535
)1.00
css/visitor/compare/clone
2091515
ns/iter (± 8170
)2068165
ns/iter (± 6849
)1.01
css/visitor/compare/visit_mut_span
2256780
ns/iter (± 2701
)2251975
ns/iter (± 8885
)1.00
css/visitor/compare/visit_mut_span_panic
2342644
ns/iter (± 5970
)2315802
ns/iter (± 7145
)1.01
css/visitor/compare/fold_span
3085293
ns/iter (± 20814
)3042551
ns/iter (± 18630
)1.01
css/visitor/compare/fold_span_panic
3148981
ns/iter (± 23180
)3171105
ns/iter (± 25660
)0.99
css/lexer/bootstrap_5_1_3
5170005
ns/iter (± 6301
)5206138
ns/iter (± 10404
)0.99
css/lexer/foundation_6_7_4
4348867
ns/iter (± 4109
)4353362
ns/iter (± 17650
)1.00
css/lexer/tailwind_3_1_1
827394
ns/iter (± 1769
)823250
ns/iter (± 3233
)1.01
css/parser/bootstrap_5_1_3
21526990
ns/iter (± 48804
)22155424
ns/iter (± 233696
)0.97
css/parser/foundation_6_7_4
17119472
ns/iter (± 57317
)17508096
ns/iter (± 124496
)0.98
css/parser/tailwind_3_1_1
3304146
ns/iter (± 17404
)3326884
ns/iter (± 10777
)0.99
es/codegen/colors
329116
ns/iter (± 184962
)325743
ns/iter (± 182951
)1.01
es/codegen/large
1214477
ns/iter (± 630704
)1237413
ns/iter (± 629214
)0.98
es/codegen/with-parser/colors
48576
ns/iter (± 351
)44955
ns/iter (± 953
)1.08
es/codegen/with-parser/large
532732
ns/iter (± 1881
)509196
ns/iter (± 1370
)1.05
es/minify/libraries/antd
1470006385
ns/iter (± 20867572
)1580132941
ns/iter (± 26952827
)0.93
es/minify/libraries/d3
251152729
ns/iter (± 4124471
)263494710
ns/iter (± 6421313
)0.95
es/minify/libraries/echarts
1072330149
ns/iter (± 10252582
)1213845562
ns/iter (± 35480726
)0.88
es/minify/libraries/jquery
77055814
ns/iter (± 500506
)79566186
ns/iter (± 1496004
)0.97
es/minify/libraries/lodash
94218308
ns/iter (± 1368156
)98800095
ns/iter (± 2941700
)0.95
es/minify/libraries/moment
45300337
ns/iter (± 181547
)46864140
ns/iter (± 494185
)0.97
es/minify/libraries/react
16768671
ns/iter (± 73296
)17221228
ns/iter (± 468732
)0.97
es/minify/libraries/terser
211486512
ns/iter (± 4394916
)229303054
ns/iter (± 4420781
)0.92
es/minify/libraries/three
360990279
ns/iter (± 3704829
)404202903
ns/iter (± 8538797
)0.89
es/minify/libraries/typescript
2828154446
ns/iter (± 43196056
)2898973144
ns/iter (± 19516617
)0.98
es/minify/libraries/victory
575960525
ns/iter (± 5207387
)644451634
ns/iter (± 24894660
)0.89
es/minify/libraries/vue
115982961
ns/iter (± 931630
)121361452
ns/iter (± 2028366
)0.96
es/visitor/compare/clone
2416421
ns/iter (± 12342
)2453217
ns/iter (± 21000
)0.99
es/visitor/compare/visit_mut_span
2770322
ns/iter (± 3459
)2819075
ns/iter (± 8979
)0.98
es/visitor/compare/visit_mut_span_panic
2823930
ns/iter (± 4717
)2865932
ns/iter (± 9565
)0.99
es/visitor/compare/fold_span
3902664
ns/iter (± 8288
)3954756
ns/iter (± 16213
)0.99
es/visitor/compare/fold_span_panic
4080627
ns/iter (± 6250
)4125534
ns/iter (± 29372
)0.99
es/lexer/colors
17249
ns/iter (± 12
)17398
ns/iter (± 34
)0.99
es/lexer/angular
8249266
ns/iter (± 4460
)8282341
ns/iter (± 13137
)1.00
es/lexer/backbone
1081490
ns/iter (± 597
)1079328
ns/iter (± 597
)1.00
es/lexer/jquery
5999557
ns/iter (± 5337
)5964923
ns/iter (± 25315
)1.01
es/lexer/jquery mobile
9242252
ns/iter (± 8381
)9226574
ns/iter (± 15310
)1.00
es/lexer/mootools
4693012
ns/iter (± 3456
)4717838
ns/iter (± 10102
)0.99
es/lexer/underscore
900267
ns/iter (± 288
)905361
ns/iter (± 1698
)0.99
es/lexer/three
28025355
ns/iter (± 60345
)28103642
ns/iter (± 59289
)1.00
es/lexer/yui
5052582
ns/iter (± 2455
)5079161
ns/iter (± 6569
)0.99
es/parser/colors
31799
ns/iter (± 91
)31451
ns/iter (± 171
)1.01
es/parser/angular
16251067
ns/iter (± 250593
)16491140
ns/iter (± 361325
)0.99
es/parser/backbone
2348502
ns/iter (± 14921
)2349262
ns/iter (± 13308
)1.00
es/parser/jquery
12645220
ns/iter (± 62060
)13183280
ns/iter (± 482297
)0.96
es/parser/jquery mobile
19942695
ns/iter (± 358419
)21336885
ns/iter (± 553534
)0.93
es/parser/mootools
9637981
ns/iter (± 34155
)9715211
ns/iter (± 141412
)0.99
es/parser/underscore
1992652
ns/iter (± 12316
)1991522
ns/iter (± 10995
)1.00
es/parser/three
58799528
ns/iter (± 604131
)62558964
ns/iter (± 816921
)0.94
es/parser/yui
9784201
ns/iter (± 47292
)9813364
ns/iter (± 71455
)1.00
es/preset-env/usage/builtin_type
139189
ns/iter (± 31294
)138415
ns/iter (± 30054
)1.01
es/preset-env/usage/property
21368
ns/iter (± 98
)21281
ns/iter (± 119
)1.00
es/resolver/typescript
118681510
ns/iter (± 2197098
)122715983
ns/iter (± 2291553
)0.97
es/fixer/typescript
97614557
ns/iter (± 2995652
)98348642
ns/iter (± 1823031
)0.99
es/hygiene/typescript
207777378
ns/iter (± 2737012
)195612488
ns/iter (± 2717438
)1.06
es/resolver_with_hygiene/typescript
350265583
ns/iter (± 2111743
)336849247
ns/iter (± 2560062
)1.04
es/visitor/base-perf/module_clone
76629
ns/iter (± 1144
)75178
ns/iter (± 1776
)1.02
es/visitor/base-perf/fold_empty
86466
ns/iter (± 1204
)84980
ns/iter (± 1293
)1.02
es/visitor/base-perf/fold_noop_impl_all
86221
ns/iter (± 886
)85162
ns/iter (± 1803
)1.01
es/visitor/base-perf/fold_noop_impl_vec
86589
ns/iter (± 852
)85024
ns/iter (± 1588
)1.02
es/visitor/base-perf/boxing_boxed_clone
56
ns/iter (± 0
)56
ns/iter (± 0
)1
es/visitor/base-perf/boxing_unboxed_clone
59
ns/iter (± 0
)59
ns/iter (± 0
)1
es/visitor/base-perf/boxing_boxed
106
ns/iter (± 0
)105
ns/iter (± 0
)1.01
es/visitor/base-perf/boxing_unboxed
105
ns/iter (± 0
)104
ns/iter (± 0
)1.01
es/visitor/base-perf/visit_contains_this
3627
ns/iter (± 52
)3446
ns/iter (± 63
)1.05
es/base/parallel/resolver/typescript
5826706968
ns/iter (± 543462552
)6081347069
ns/iter (± 656318154
)0.96
es/base/parallel/hygiene/typescript
2374325660
ns/iter (± 16966357
)2381054387
ns/iter (± 53427394
)1.00
misc/visitors/time-complexity/time 5
108
ns/iter (± 0
)106
ns/iter (± 0
)1.02
misc/visitors/time-complexity/time 10
359
ns/iter (± 1
)343
ns/iter (± 1
)1.05
misc/visitors/time-complexity/time 15
685
ns/iter (± 4
)672
ns/iter (± 2
)1.02
misc/visitors/time-complexity/time 20
1272
ns/iter (± 1
)1279
ns/iter (± 16
)0.99
misc/visitors/time-complexity/time 40
6791
ns/iter (± 44
)6712
ns/iter (± 20
)1.01
misc/visitors/time-complexity/time 60
17386
ns/iter (± 153
)17249
ns/iter (± 50
)1.01
es/full-target/es2016
190507
ns/iter (± 943
)187375
ns/iter (± 1150
)1.02
es/full-target/es2017
184608
ns/iter (± 672
)183338
ns/iter (± 479
)1.01
es/full-target/es2018
173205
ns/iter (± 441
)172585
ns/iter (± 839
)1.00
es2020_nullish_coalescing
67558
ns/iter (± 145
)66933
ns/iter (± 265
)1.01
es2020_optional_chaining
96391
ns/iter (± 176
)95972
ns/iter (± 367
)1.00
es2022_class_properties
94516
ns/iter (± 238
)93348
ns/iter (± 367
)1.01
es2018_object_rest_spread
72137
ns/iter (± 123
)71207
ns/iter (± 155
)1.01
es2019_optional_catch_binding
61497
ns/iter (± 136
)61097
ns/iter (± 179
)1.01
es2017_async_to_generator
62602
ns/iter (± 114
)61259
ns/iter (± 98
)1.02
es2016_exponentiation
66323
ns/iter (± 116
)64736
ns/iter (± 64
)1.02
es2015_arrow
70735
ns/iter (± 205
)69884
ns/iter (± 169
)1.01
es2015_block_scoped_fn
67285
ns/iter (± 145
)66217
ns/iter (± 113
)1.02
es2015_block_scoping
147762
ns/iter (± 9764
)139303
ns/iter (± 9249
)1.06
es2015_classes
117734
ns/iter (± 454
)118239
ns/iter (± 549
)1.00
es2015_computed_props
61699
ns/iter (± 93
)61183
ns/iter (± 74
)1.01
es2015_destructuring
115578
ns/iter (± 294
)115942
ns/iter (± 175
)1.00
es2015_duplicate_keys
64235
ns/iter (± 61
)64011
ns/iter (± 107
)1.00
es2015_parameters
80282
ns/iter (± 135
)79995
ns/iter (± 153
)1.00
es2015_fn_name
67180
ns/iter (± 422
)66999
ns/iter (± 581
)1.00
es2015_for_of
65142
ns/iter (± 152
)64646
ns/iter (± 138
)1.01
es2015_instanceof
63576
ns/iter (± 103
)63244
ns/iter (± 121
)1.01
es2015_shorthand_property
61904
ns/iter (± 95
)60950
ns/iter (± 126
)1.02
es2015_spread
61642
ns/iter (± 156
)60927
ns/iter (± 93
)1.01
es2015_sticky_regex
62776
ns/iter (± 127
)62380
ns/iter (± 171
)1.01
es2015_typeof_symbol
62811
ns/iter (± 75
)62387
ns/iter (± 111
)1.01
es/transform/baseline/base
52305
ns/iter (± 87
)51639
ns/iter (± 121
)1.01
es/transform/baseline/common_reserved_word
63289
ns/iter (± 85
)62584
ns/iter (± 118
)1.01
es/transform/baseline/common_typescript
144872
ns/iter (± 4008
)159609
ns/iter (± 10323
)0.91
es/target/es3
171351
ns/iter (± 329
)169654
ns/iter (± 297
)1.01
es/target/es2015
630840
ns/iter (± 1829
)628934
ns/iter (± 1386
)1.00
es/target/es2016
66393
ns/iter (± 151
)64944
ns/iter (± 100
)1.02
es/target/es2017
62650
ns/iter (± 105
)61500
ns/iter (± 164
)1.02
es/target/es2018
82335
ns/iter (± 153
)81718
ns/iter (± 214
)1.01
es/target/es2020
133808
ns/iter (± 395
)133295
ns/iter (± 201
)1.00
babelify-only
673462
ns/iter (± 1316
)679443
ns/iter (± 1903
)0.99
parse_and_babelify_angular
43337279
ns/iter (± 980284
)43716373
ns/iter (± 1152575
)0.99
parse_and_babelify_backbone
5443213
ns/iter (± 44492
)5495032
ns/iter (± 88133
)0.99
parse_and_babelify_jquery
33062274
ns/iter (± 471763
)34047966
ns/iter (± 1021052
)0.97
parse_and_babelify_jquery_mobile
55811781
ns/iter (± 903865
)57912546
ns/iter (± 1302472
)0.96
parse_and_babelify_mootools
33466255
ns/iter (± 226806
)35732046
ns/iter (± 605422
)0.94
parse_and_babelify_underscore
4344022
ns/iter (± 10431
)4308161
ns/iter (± 30447
)1.01
parse_and_babelify_yui
32966957
ns/iter (± 310363
)33758447
ns/iter (± 687630
)0.98
html/minify/document/css_spec
41797085
ns/iter (± 258628
)43116740
ns/iter (± 752874
)0.97
html/minify/document/github
17423284
ns/iter (± 14593
)17494318
ns/iter (± 171793
)1.00
html/minify/document/stackoverflow
15673424
ns/iter (± 18131
)15886221
ns/iter (± 101718
)0.99
html/minify/document_fragment/css_spec
39758882
ns/iter (± 285499
)40543382
ns/iter (± 446372
)0.98
html/minify/document_fragment/github
16853455
ns/iter (± 14923
)16849744
ns/iter (± 144672
)1.00
html/minify/document_fragment/stackoverflow
15255934
ns/iter (± 11813
)15446844
ns/iter (± 239104
)0.99
html/document/visitor/compare/clone
339471
ns/iter (± 2121
)338457
ns/iter (± 2344
)1.00
html/document/visitor/compare/visit_mut_span
365420
ns/iter (± 1559
)366213
ns/iter (± 2272
)1.00
html/document/visitor/compare/visit_mut_span_panic
376643
ns/iter (± 2201
)371525
ns/iter (± 2180
)1.01
html/document/visitor/compare/fold_span
405990
ns/iter (± 2025
)409141
ns/iter (± 2011
)0.99
html/document/visitor/compare/fold_span_panic
464573
ns/iter (± 3050
)458760
ns/iter (± 2214
)1.01
html/document_fragment/visitor/compare/clone
339023
ns/iter (± 1787
)337284
ns/iter (± 1448
)1.01
html/document_fragment/visitor/compare/visit_mut_span
366342
ns/iter (± 1939
)364126
ns/iter (± 2801
)1.01
html/document_fragment/visitor/compare/visit_mut_span_panic
373829
ns/iter (± 2301
)368774
ns/iter (± 1157
)1.01
html/document_fragment/visitor/compare/fold_span
408121
ns/iter (± 2790
)400124
ns/iter (± 2901
)1.02
html/document_fragment/visitor/compare/fold_span_panic
458326
ns/iter (± 1578
)465596
ns/iter (± 1943
)0.98
html/lexer/css_2021_spec
15587407
ns/iter (± 21710
)15594973
ns/iter (± 84813
)1.00
html/lexer/github_com_17_05_2022
6018909
ns/iter (± 4789
)6039844
ns/iter (± 10106
)1.00
html/lexer/stackoverflow_com_17_05_2022
5616949
ns/iter (± 3505
)5630534
ns/iter (± 15601
)1.00
html/parser/parser_document/css_2021_spec
25773651
ns/iter (± 234002
)25984017
ns/iter (± 299475
)0.99
html/parser/parser_document/github_com_17_05_2022
8745539
ns/iter (± 5867
)8750039
ns/iter (± 25074
)1.00
html/parser/parser_document/stackoverflow_com_17_05_2022
7707589
ns/iter (± 9178
)7681354
ns/iter (± 16224
)1.00
html/parser/parser_document_fragment/css_2021_spec
25829663
ns/iter (± 134795
)26101068
ns/iter (± 475956
)0.99
html/parser/parser_document_fragment/github_com_17_05_2022
8731558
ns/iter (± 9175
)8767930
ns/iter (± 18351
)1.00
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022
7731663
ns/iter (± 6278
)7670153
ns/iter (± 25933
)1.01
This comment was automatically generated by workflow using github-action-benchmark.