Skip to content

Commit

Permalink
fix(plugin-swc): update core-js (#4558)
Browse files Browse the repository at this point in the history
  • Loading branch information
JSerFeng committed Aug 31, 2023
1 parent 7ad82bd commit fb1589a
Show file tree
Hide file tree
Showing 19 changed files with 195 additions and 109 deletions.
7 changes: 7 additions & 0 deletions .changeset/strong-news-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/builder-plugin-swc': patch
---

fix(plugin-swc): update core-js

fix(plugin-swc): 升级 core-js
2 changes: 1 addition & 1 deletion packages/builder/builder-rspack-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@swc/helpers": "0.5.1",
"rspack-manifest-plugin": "5.0.0-alpha0",
"caniuse-lite": "^1.0.30001520",
"core-js": "~3.30.0",
"core-js": "~3.32.1",
"react-refresh": "0.14.0",
"rspack-plugin-virtual-module": "0.1.7",
"style-loader": "3.3.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = `
},
],
"presetEnv": {
"coreJs": "3.30",
"coreJs": "3.32",
"mode": "entry",
"targets": [
"> 0.01%",
Expand Down Expand Up @@ -789,7 +789,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod
},
],
"presetEnv": {
"coreJs": "3.30",
"coreJs": "3.32",
"mode": "entry",
"targets": [
"> 0.01%",
Expand Down Expand Up @@ -2046,7 +2046,7 @@ exports[`tools.rspack > should match snapshot 1`] = `
},
],
"presetEnv": {
"coreJs": "3.30",
"coreJs": "3.32",
"mode": "entry",
"targets": [
"> 0.01%",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`plugins/swc > should add antd pluginImport 1`] = `
},
],
"presetEnv": {
"coreJs": "3.30",
"coreJs": "3.32",
"mode": "entry",
"targets": [
"> 0.01%",
Expand Down Expand Up @@ -47,7 +47,7 @@ exports[`plugins/swc > should add browserslist 1`] = `
"legacy": true,
},
"presetEnv": {
"coreJs": "3.30",
"coreJs": "3.32",
"mode": "entry",
"targets": [
"chrome 98",
Expand Down Expand Up @@ -78,7 +78,7 @@ exports[`plugins/swc > should add browserslist 2`] = `
"legacy": true,
},
"presetEnv": {
"coreJs": "3.30",
"coreJs": "3.32",
"mode": "entry",
"targets": [
"chrome 98",
Expand Down Expand Up @@ -114,7 +114,7 @@ exports[`plugins/swc > should add pluginImport 1`] = `
},
],
"presetEnv": {
"coreJs": "3.30",
"coreJs": "3.32",
"mode": "entry",
"targets": [
"> 0.01%",
Expand Down Expand Up @@ -147,7 +147,7 @@ exports[`plugins/swc > should disable all pluginImport 1`] = `
"legacy": true,
},
"presetEnv": {
"coreJs": "3.30",
"coreJs": "3.32",
"mode": "entry",
"targets": [
"> 0.01%",
Expand Down Expand Up @@ -223,7 +223,7 @@ exports[`plugins/swc > should enable entry mode preset_env 1`] = `
"legacy": true,
},
"presetEnv": {
"coreJs": "3.30",
"coreJs": "3.32",
"mode": "entry",
"targets": [
"> 0.01%",
Expand Down Expand Up @@ -256,7 +256,7 @@ exports[`plugins/swc > should has correct core-js 1`] = `
"legacy": true,
},
"presetEnv": {
"coreJs": "3.30",
"coreJs": "3.32",
"mode": "entry",
"targets": [
"> 0.01%",
Expand Down Expand Up @@ -289,7 +289,7 @@ exports[`plugins/swc > should has correct core-js 2`] = `
"legacy": true,
},
"presetEnv": {
"coreJs": "3.30",
"coreJs": "3.32",
"mode": "entry",
"targets": [
"> 0.01%",
Expand Down Expand Up @@ -342,7 +342,7 @@ exports[`plugins/swc > should'n override browserslist when target platform is no
"legacy": true,
},
"presetEnv": {
"coreJs": "3.30",
"coreJs": "3.32",
"mode": "entry",
"targets": [
"> 0.01%",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ exports[`webpackConfig > should not have any pluginImport in Babel 1`] = `
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -330,7 +330,7 @@ exports[`webpackConfig > should not have any pluginImport in Babel 1`] = `
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -449,7 +449,7 @@ exports[`webpackConfig > should not set default pluginImport for Babel 1`] = `
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -558,7 +558,7 @@ exports[`webpackConfig > should not set default pluginImport for Babel 1`] = `
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -699,7 +699,7 @@ exports[`webpackConfig > should set proper pluginImport option in Babel 1`] = `
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -807,7 +807,7 @@ exports[`webpackConfig > should set proper pluginImport option in Babel 1`] = `
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ exports[`plugins/babel > should add rule to compile Data URI when enable source.
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -188,7 +188,7 @@ exports[`plugins/babel > should add rule to compile Data URI when enable source.
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -509,7 +509,7 @@ exports[`plugins/babel > should apply exclude condition when using source.exclud
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -609,7 +609,7 @@ exports[`plugins/babel > should apply exclude condition when using source.exclud
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -731,7 +731,7 @@ exports[`plugins/babel > should override targets of babel-preset-env when using
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -829,7 +829,7 @@ exports[`plugins/babel > should override targets of babel-preset-env when using
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -941,7 +941,7 @@ exports[`plugins/babel > should set babel-loader 1`] = `
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -1041,7 +1041,7 @@ exports[`plugins/babel > should set babel-loader 1`] = `
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -1159,7 +1159,7 @@ exports[`plugins/babel > should set include/exclude 1`] = `
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -1259,7 +1259,7 @@ exports[`plugins/babel > should set include/exclude 1`] = `
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = `
"bugfixes": true,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -709,7 +709,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = `
"bugfixes": true,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -1505,7 +1505,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when produ
"bugfixes": true,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -1650,7 +1650,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when produ
"bugfixes": true,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -3196,7 +3196,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe
"bugfixes": true,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -3341,7 +3341,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe
"bugfixes": true,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ exports[`plugins/react > should work with babel-loader 1`] = `
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down Expand Up @@ -194,7 +194,7 @@ exports[`plugins/react > should work with babel-loader 1`] = `
"bugfixes": false,
"corejs": {
"proposals": true,
"version": "3.30",
"version": "3.32",
},
"exclude": [
"transform-typeof-symbol",
Expand Down
2 changes: 1 addition & 1 deletion packages/builder/plugin-swc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"@modern-js/swc-plugins": "0.6.0",
"@modern-js/utils": "workspace:*",
"@swc/helpers": "0.5.1",
"core-js": "~3.30.0"
"core-js": "~3.32.1"
},
"devDependencies": {
"@modern-js/builder-webpack-provider": "workspace:*",
Expand Down
Loading

0 comments on commit fb1589a

Please sign in to comment.