-
-
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.
feat(es/preset-env): Add ES2022 features to
preset-env
(#3072)
- Loading branch information
1 parent
46994e0
commit 7beaabd
Showing
7 changed files
with
133 additions
and
83 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const data = require("@babel/compat-data/plugins"); | ||
|
||
const transform_data_json = path.join( | ||
__dirname, | ||
"..", | ||
"src", | ||
"transform_data.json" | ||
); | ||
|
||
fs.writeFileSync(transform_data_json, JSON.stringify(data, null, 4) + "\n"); |
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
156 changes: 78 additions & 78 deletions
156
crates/swc_ecma_preset_env/src/transform_data_bugfixes.json
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,79 +1,79 @@ | ||
{ | ||
"transform-async-to-generator": { | ||
"chrome": "55", | ||
"opera": "42", | ||
"edge": "15", | ||
"firefox": "52", | ||
"safari": "10.1", | ||
"node": "7.6", | ||
"ios": "10.3", | ||
"samsung": "6", | ||
"electron": "1.6" | ||
}, | ||
"bugfix/transform-async-arrows-in-class": { | ||
"chrome": "55", | ||
"opera": "42", | ||
"edge": "15", | ||
"firefox": "52", | ||
"safari": "11", | ||
"node": "7.6", | ||
"ios": "11", | ||
"samsung": "6", | ||
"electron": "1.6" | ||
}, | ||
"transform-parameters": { | ||
"chrome": "49", | ||
"opera": "36", | ||
"edge": "15", | ||
"firefox": "53", | ||
"safari": "10", | ||
"node": "6", | ||
"ios": "10", | ||
"samsung": "5", | ||
"electron": "0.37" | ||
}, | ||
"bugfix/transform-edge-default-parameters": { | ||
"chrome": "49", | ||
"opera": "36", | ||
"edge": "18", | ||
"firefox": "52", | ||
"safari": "10", | ||
"node": "6", | ||
"ios": "10", | ||
"samsung": "5", | ||
"electron": "0.37" | ||
}, | ||
"transform-block-scoping": { | ||
"chrome": "49", | ||
"opera": "36", | ||
"edge": "14", | ||
"firefox": "51", | ||
"safari": "10", | ||
"node": "6", | ||
"ios": "10", | ||
"samsung": "5", | ||
"electron": "0.37" | ||
}, | ||
"transform-template-literals": { | ||
"chrome": "41", | ||
"opera": "28", | ||
"edge": "13", | ||
"firefox": "34", | ||
"safari": "9", | ||
"node": "4", | ||
"ios": "9", | ||
"samsung": "3.4", | ||
"electron": "0.21" | ||
}, | ||
"bugfix/transform-tagged-template-caching": { | ||
"chrome": "41", | ||
"opera": "28", | ||
"edge": "12", | ||
"firefox": "34", | ||
"safari": "13", | ||
"node": "4", | ||
"ios": "13", | ||
"samsung": "3.4", | ||
"electron": "0.21" | ||
} | ||
} | ||
"transform-async-to-generator": { | ||
"chrome": "55", | ||
"opera": "42", | ||
"edge": "15", | ||
"firefox": "52", | ||
"safari": "10.1", | ||
"node": "7.6", | ||
"ios": "10.3", | ||
"samsung": "6", | ||
"electron": "1.6" | ||
}, | ||
"bugfix/transform-async-arrows-in-class": { | ||
"chrome": "55", | ||
"opera": "42", | ||
"edge": "15", | ||
"firefox": "52", | ||
"safari": "11", | ||
"node": "7.6", | ||
"ios": "11", | ||
"samsung": "6", | ||
"electron": "1.6" | ||
}, | ||
"transform-parameters": { | ||
"chrome": "49", | ||
"opera": "36", | ||
"edge": "15", | ||
"firefox": "53", | ||
"safari": "10", | ||
"node": "6", | ||
"ios": "10", | ||
"samsung": "5", | ||
"electron": "0.37" | ||
}, | ||
"bugfix/transform-edge-default-parameters": { | ||
"chrome": "49", | ||
"opera": "36", | ||
"edge": "18", | ||
"firefox": "52", | ||
"safari": "10", | ||
"node": "6", | ||
"ios": "10", | ||
"samsung": "5", | ||
"electron": "0.37" | ||
}, | ||
"transform-block-scoping": { | ||
"chrome": "49", | ||
"opera": "36", | ||
"edge": "14", | ||
"firefox": "51", | ||
"safari": "10", | ||
"node": "6", | ||
"ios": "10", | ||
"samsung": "5", | ||
"electron": "0.37" | ||
}, | ||
"transform-template-literals": { | ||
"chrome": "41", | ||
"opera": "28", | ||
"edge": "13", | ||
"firefox": "34", | ||
"safari": "9", | ||
"node": "4", | ||
"ios": "9", | ||
"samsung": "3.4", | ||
"electron": "0.21" | ||
}, | ||
"bugfix/transform-tagged-template-caching": { | ||
"chrome": "41", | ||
"opera": "28", | ||
"edge": "12", | ||
"firefox": "34", | ||
"safari": "13", | ||
"node": "4", | ||
"ios": "13", | ||
"samsung": "3.4", | ||
"electron": "0.21" | ||
} | ||
} |
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
7beaabd
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
full_es2015
226546007
ns/iter (± 9684189
)187536972
ns/iter (± 24964500
)1.21
full_es2016
186975514
ns/iter (± 5197239
)129433059
ns/iter (± 21689541
)1.44
full_es2017
192614918
ns/iter (± 11680164
)157279917
ns/iter (± 29123659
)1.22
full_es2018
191842268
ns/iter (± 11863546
)157384992
ns/iter (± 27772420
)1.22
full_es2019
191084025
ns/iter (± 12221751
)130492578
ns/iter (± 9311101
)1.46
full_es2020
189798797
ns/iter (± 11303498
)129468050
ns/iter (± 7431969
)1.47
full_es3
262605993
ns/iter (± 10796475
)189342190
ns/iter (± 28932563
)1.39
full_es5
239215762
ns/iter (± 12761165
)174356016
ns/iter (± 8796922
)1.37
parser
831546
ns/iter (± 18625
)592287
ns/iter (± 35225
)1.40
This comment was automatically generated by workflow using github-action-benchmark.