Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(es/preset-env): Update preset-env data #9573

Merged
merged 23 commits into from
Oct 8, 2024
Merged
6 changes: 6 additions & 0 deletions .changeset/sharp-apricots-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
swc_ecma_preset_env: patch
swc_core: patch
---

feat(es/preset-env): Update preset-env data
15 changes: 15 additions & 0 deletions crates/swc/tests/fixture/issues-9xxx/9544/input/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://swc.rs/schema.json",
"jsc": {
"parser": {
"syntax": "ecmascript",
},
},
"env": {
"targets": {
"chrome": "40"
},
"mode": "usage",
"coreJs": "3.22"
}
}
3 changes: 3 additions & 0 deletions crates/swc/tests/fixture/issues-9xxx/9544/input/1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
document.querySelectorAll('div').forEach(el => {
console.log(el);
})
4 changes: 4 additions & 0 deletions crates/swc/tests/fixture/issues-9xxx/9544/output/1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require("core-js/modules/es.object.to-string.js");
document.querySelectorAll('div').forEach(function(el) {
console.log(el);
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kdy1 to fix #9544, it should also load web.dom-collections.for-each, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I'll reopen it.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"transform-duplicate-named-capturing-groups-regex": {
"chrome": "126",
"opera": "112",
"edge": "126",
"firefox": "129",
"safari": "17.4",
Expand All @@ -22,7 +23,7 @@
"chrome": "98",
"opera": "84",
"edge": "98",
"firefox": "95",
"firefox": "75",
"safari": "15",
"node": "12",
"deno": "1.18",
Expand Down
Loading
Loading