-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/helpers): Use
.mjs
extension in helper imports (#4979)
- Loading branch information
1 parent
7ffcc88
commit 9484cf8
Showing
41 changed files
with
267 additions
and
189 deletions.
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
2 changes: 1 addition & 1 deletion
2
crates/swc/tests/fixture/deno/paths/issue-2724/output/src/index.ts
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"use strict"; | ||
var _interop_require_default = require("@swc/helpers/lib/_interop_require_default.js").default; | ||
var _interop_require_default = require("../../../../../../../packages/swc-helpers/src/_interop_require_default.mjs").default; | ||
var _a = _interop_require_default(require("./subfolder/A")); | ||
console.log(_a.default); |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"use strict"; | ||
var _interop_require_default = require("@swc/helpers/lib/_interop_require_default.js").default; | ||
var _interop_require_default = require("../../../../../../../../packages/swc-helpers/src/_interop_require_default.mjs").default; | ||
var _handlebars = _interop_require_default(require("handlebars")); | ||
console.log(_handlebars.default); |
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,13 @@ | ||
#/usr/bin/env bash | ||
set -eux | ||
|
||
npx swc src -d lib | ||
ls -alR ./lib | ||
|
||
# fsync | ||
|
||
if [[ "$OSTYPE" == 'darwin'* ]]; then | ||
sed -i '' 's/.mjs/.js/g' ./lib/*.js | ||
else | ||
sed -i 's/.mjs/.js/g' ./lib/*.js | ||
fi |
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
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
4 changes: 2 additions & 2 deletions
4
packages/swc-helpers/src/_class_private_field_destructure.mjs
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
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
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
6 changes: 3 additions & 3 deletions
6
packages/swc-helpers/src/_class_static_private_field_destructure.mjs
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
6 changes: 3 additions & 3 deletions
6
packages/swc-helpers/src/_class_static_private_field_spec_get.mjs
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
6 changes: 3 additions & 3 deletions
6
packages/swc-helpers/src/_class_static_private_field_spec_set.mjs
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
6 changes: 3 additions & 3 deletions
6
packages/swc-helpers/src/_class_static_private_field_update.mjs
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
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
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
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
Oops, something went wrong.
9484cf8
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/minify/libraries/antd
1624448968
ns/iter (± 7947026
)1655511989
ns/iter (± 24062066
)0.98
es/full/minify/libraries/d3
402647417
ns/iter (± 8652671
)431069187
ns/iter (± 11539538
)0.93
es/full/minify/libraries/echarts
1589467094
ns/iter (± 20206989
)1661887120
ns/iter (± 23065145
)0.96
es/full/minify/libraries/jquery
88090435
ns/iter (± 1291455
)101493536
ns/iter (± 8241726
)0.87
es/full/minify/libraries/lodash
115743643
ns/iter (± 1566376
)137868492
ns/iter (± 6196097
)0.84
es/full/minify/libraries/moment
51139080
ns/iter (± 2014246
)56827452
ns/iter (± 1981060
)0.90
es/full/minify/libraries/react
17232931
ns/iter (± 188536
)17212638
ns/iter (± 415655
)1.00
es/full/minify/libraries/terser
595255087
ns/iter (± 6133319
)617477773
ns/iter (± 10661538
)0.96
es/full/minify/libraries/three
538980394
ns/iter (± 2183453
)551238374
ns/iter (± 15642080
)0.98
es/full/minify/libraries/typescript
3432126864
ns/iter (± 43137317
)3485358620
ns/iter (± 44560113
)0.98
es/full/minify/libraries/victory
742087901
ns/iter (± 25651757
)721414568
ns/iter (± 15308612
)1.03
es/full/minify/libraries/vue
145344069
ns/iter (± 9570264
)133919720
ns/iter (± 6046272
)1.09
es/full/codegen/es3
31762
ns/iter (± 267
)31081
ns/iter (± 586
)1.02
es/full/codegen/es5
31741
ns/iter (± 362
)31232
ns/iter (± 594
)1.02
es/full/codegen/es2015
31712
ns/iter (± 598
)31156
ns/iter (± 968
)1.02
es/full/codegen/es2016
31730
ns/iter (± 934
)31147
ns/iter (± 1071
)1.02
es/full/codegen/es2017
31684
ns/iter (± 797
)30950
ns/iter (± 1361
)1.02
es/full/codegen/es2018
31676
ns/iter (± 973
)30977
ns/iter (± 1260
)1.02
es/full/codegen/es2019
31661
ns/iter (± 237
)31479
ns/iter (± 1780
)1.01
es/full/codegen/es2020
31664
ns/iter (± 373
)31625
ns/iter (± 511
)1.00
es/full/all/es3
188403413
ns/iter (± 5897523
)184145196
ns/iter (± 4236340
)1.02
es/full/all/es5
176221633
ns/iter (± 5132567
)172616552
ns/iter (± 3530685
)1.02
es/full/all/es2015
142090219
ns/iter (± 3053906
)139973589
ns/iter (± 2724357
)1.02
es/full/all/es2016
140830270
ns/iter (± 3987663
)138897525
ns/iter (± 2536120
)1.01
es/full/all/es2017
140733023
ns/iter (± 4147642
)138557783
ns/iter (± 2893128
)1.02
es/full/all/es2018
140936244
ns/iter (± 5879315
)137336396
ns/iter (± 2715720
)1.03
es/full/all/es2019
139106706
ns/iter (± 3710195
)136009995
ns/iter (± 3872274
)1.02
es/full/all/es2020
127676537
ns/iter (± 5027033
)131584352
ns/iter (± 2808420
)0.97
es/full/parser
703521
ns/iter (± 28443
)711265
ns/iter (± 17425
)0.99
es/full/base/fixer
29604
ns/iter (± 815
)29298
ns/iter (± 924
)1.01
es/full/base/resolver_and_hygiene
86847
ns/iter (± 3892
)87231
ns/iter (± 2999
)1.00
serialization of ast node
210
ns/iter (± 2
)208
ns/iter (± 4
)1.01
serialization of serde
228
ns/iter (± 3
)225
ns/iter (± 6
)1.01
This comment was automatically generated by workflow using github-action-benchmark.