From 921a20115646eb1d855cd96dd31e34fc8c32c193 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 31 Jan 2024 06:43:41 +0000 Subject: [PATCH 1/3] feat: update rsbuild version --- .../builder-webpack-provider/package.json | 2 +- packages/builder/builder/package.json | 2 +- packages/builder/uni-builder/package.json | 36 +- packages/cli/plugin-swc/package.json | 2 +- packages/devtools/client/package.json | 2 +- .../review/eslint-config-app/package.json | 2 +- packages/runtime/plugin-testing/package.json | 2 +- packages/server/server/package.json | 2 +- packages/server/utils/package.json | 2 +- packages/solutions/app-tools/package.json | 8 +- pnpm-lock.yaml | 456 +++++++++++------- tests/e2e/builder/package.json | 4 +- 12 files changed, 322 insertions(+), 198 deletions(-) diff --git a/packages/builder/builder-webpack-provider/package.json b/packages/builder/builder-webpack-provider/package.json index 77d88dadd274..6fd494783fc7 100644 --- a/packages/builder/builder-webpack-provider/package.json +++ b/packages/builder/builder-webpack-provider/package.json @@ -96,7 +96,7 @@ "@modern-js/types": "workspace:*", "@modern-js/utils": "workspace:*", "@pmmmwh/react-refresh-webpack-plugin": "0.5.10", - "@rsbuild/babel-preset": "0.3.7", + "@rsbuild/babel-preset": "0.3.11", "@swc/helpers": "0.5.3", "babel-plugin-import": "1.13.5", "babel-plugin-styled-components": "1.13.3", diff --git a/packages/builder/builder/package.json b/packages/builder/builder/package.json index 5570befa6c63..081676ab1681 100644 --- a/packages/builder/builder/package.json +++ b/packages/builder/builder/package.json @@ -62,7 +62,7 @@ "dependencies": { "@modern-js/builder-shared": "workspace:*", "@modern-js/utils": "workspace:*", - "@rsbuild/monorepo-utils": "0.3.7", + "@rsbuild/monorepo-utils": "0.3.11", "@svgr/webpack": "8.1.0", "@swc/helpers": "0.5.3", "deepmerge": "^4.3.1", diff --git a/packages/builder/uni-builder/package.json b/packages/builder/uni-builder/package.json index 3f57ab0a6d6c..deeffdd7d1fe 100644 --- a/packages/builder/uni-builder/package.json +++ b/packages/builder/uni-builder/package.json @@ -35,23 +35,23 @@ "@modern-js/server": "workspace:*", "@modern-js/prod-server": "workspace:*", "@pmmmwh/react-refresh-webpack-plugin": "0.5.10", - "@rsbuild/babel-preset": "0.3.7", - "@rsbuild/core": "0.3.7", - "@rsbuild/plugin-assets-retry": "0.3.7", - "@rsbuild/plugin-babel": "0.3.7", - "@rsbuild/plugin-check-syntax": "0.3.7", - "@rsbuild/plugin-css-minimizer": "0.3.7", - "@rsbuild/plugin-pug": "0.3.7", - "@rsbuild/plugin-react": "0.3.7", - "@rsbuild/plugin-rem": "0.3.7", - "@rsbuild/plugin-source-build": "0.3.7", - "@rsbuild/plugin-styled-components": "0.3.7", - "@rsbuild/plugin-svgr": "0.3.7", - "@rsbuild/plugin-type-check": "0.3.7", - "@rsbuild/plugin-toml": "0.3.7", - "@rsbuild/plugin-yaml": "0.3.7", - "@rsbuild/shared": "0.3.7", - "@rsbuild/webpack": "0.3.7", + "@rsbuild/babel-preset": "0.3.11", + "@rsbuild/core": "0.3.11", + "@rsbuild/plugin-assets-retry": "0.3.11", + "@rsbuild/plugin-babel": "0.3.11", + "@rsbuild/plugin-check-syntax": "0.3.11", + "@rsbuild/plugin-css-minimizer": "0.3.11", + "@rsbuild/plugin-pug": "0.3.11", + "@rsbuild/plugin-react": "0.3.11", + "@rsbuild/plugin-rem": "0.3.11", + "@rsbuild/plugin-source-build": "0.3.11", + "@rsbuild/plugin-styled-components": "0.3.11", + "@rsbuild/plugin-svgr": "0.3.11", + "@rsbuild/plugin-type-check": "0.3.11", + "@rsbuild/plugin-toml": "0.3.11", + "@rsbuild/plugin-yaml": "0.3.11", + "@rsbuild/shared": "0.3.11", + "@rsbuild/webpack": "0.3.11", "@swc/helpers": "0.5.3", "babel-loader": "9.1.3", "babel-plugin-import": "1.13.5", @@ -76,7 +76,7 @@ }, "devDependencies": { "@modern-js/builder-plugin-node-polyfill": "workspace:*", - "@rsbuild/plugin-swc": "0.3.7", + "@rsbuild/plugin-swc": "0.3.11", "@scripts/build": "workspace:*", "@scripts/vitest-config": "workspace:*", "@types/lodash": "^4.14.202", diff --git a/packages/cli/plugin-swc/package.json b/packages/cli/plugin-swc/package.json index fdb385e19854..a421915a70cc 100644 --- a/packages/cli/plugin-swc/package.json +++ b/packages/cli/plugin-swc/package.json @@ -37,7 +37,7 @@ "test": "jest" }, "dependencies": { - "@rsbuild/plugin-swc": "0.3.7", + "@rsbuild/plugin-swc": "0.3.11", "@modern-js/utils": "workspace:*", "@swc/helpers": "0.5.3" }, diff --git a/packages/devtools/client/package.json b/packages/devtools/client/package.json index 5c563eeeb9af..1359f43277f7 100644 --- a/packages/devtools/client/package.json +++ b/packages/devtools/client/package.json @@ -42,7 +42,7 @@ "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-tabs": "^1.0.4", "@radix-ui/themes": "^2.0.0", - "@rsbuild/core": "0.3.7", + "@rsbuild/core": "0.3.11", "@types/jest": "^29", "@types/lodash": "^4.14.202", "@types/node": "~16.11.7", diff --git a/packages/review/eslint-config-app/package.json b/packages/review/eslint-config-app/package.json index 9d8fbdba2ff5..0785b3dfa66d 100644 --- a/packages/review/eslint-config-app/package.json +++ b/packages/review/eslint-config-app/package.json @@ -25,7 +25,7 @@ "@babel/core": "^7.23.2", "@babel/eslint-parser": "^7.22.15", "@babel/eslint-plugin": "^7.22.10", - "@rsbuild/babel-preset": "0.3.7", + "@rsbuild/babel-preset": "0.3.11", "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", "eslint": "^8.28.0", diff --git a/packages/runtime/plugin-testing/package.json b/packages/runtime/plugin-testing/package.json index acb1ce575bb2..cbd3feba3e67 100644 --- a/packages/runtime/plugin-testing/package.json +++ b/packages/runtime/plugin-testing/package.json @@ -128,7 +128,7 @@ "@modern-js/plugin": "workspace:*", "@modern-js/prod-server": "workspace:*", "@modern-js/types": "workspace:*", - "@rsbuild/babel-preset": "0.3.7", + "@rsbuild/babel-preset": "0.3.11", "@testing-library/jest-dom": "^5.16.1", "@testing-library/react": "^13.4.0", "@types/testing-library__jest-dom": "^5.14.3", diff --git a/packages/server/server/package.json b/packages/server/server/package.json index 9d0547f83f37..1f8cd8406585 100644 --- a/packages/server/server/package.json +++ b/packages/server/server/package.json @@ -62,7 +62,7 @@ "axios": "^1.6.0" }, "devDependencies": { - "@rsbuild/shared": "0.3.7", + "@rsbuild/shared": "0.3.11", "@modern-js/server-core": "workspace:*", "@scripts/build": "workspace:*", "@scripts/jest-config": "workspace:*", diff --git a/packages/server/utils/package.json b/packages/server/utils/package.json index f4da87308957..641761fb58c4 100644 --- a/packages/server/utils/package.json +++ b/packages/server/utils/package.json @@ -46,7 +46,7 @@ "@modern-js/babel-compiler": "workspace:*", "@modern-js/utils": "workspace:*", "@modern-js/babel-plugin-module-resolver": "workspace:*", - "@rsbuild/babel-preset": "0.3.7", + "@rsbuild/babel-preset": "0.3.11", "@swc/helpers": "0.5.3", "babel-plugin-transform-typescript-metadata": "^0.3.2" }, diff --git a/packages/solutions/app-tools/package.json b/packages/solutions/app-tools/package.json index 43c9d65170a5..f25eac9c53b4 100644 --- a/packages/solutions/app-tools/package.json +++ b/packages/solutions/app-tools/package.json @@ -90,16 +90,16 @@ "@modern-js/types": "workspace:*", "@modern-js/upgrade": "workspace:*", "@modern-js/utils": "workspace:*", - "@rsbuild/plugin-esbuild": "0.3.7", - "@rsbuild/plugin-node-polyfill": "0.3.7", - "@rsbuild/shared": "0.3.7", + "@rsbuild/plugin-esbuild": "0.3.11", + "@rsbuild/plugin-node-polyfill": "0.3.11", + "@rsbuild/shared": "0.3.11", "es-module-lexer": "^1.1.0", "esbuild": "0.17.19", "@swc/helpers": "0.5.3", "@modern-js/server-core": "workspace:*" }, "devDependencies": { - "@rsbuild/plugin-swc": "0.3.7", + "@rsbuild/plugin-swc": "0.3.11", "@scripts/build": "workspace:*", "@scripts/jest-config": "workspace:*", "@types/babel__traverse": "7.18.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4608078dfb6d..39dcb9b9a15c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -91,8 +91,8 @@ importers: specifier: workspace:* version: link:../../toolkit/utils '@rsbuild/monorepo-utils': - specifier: 0.3.7 - version: 0.3.7(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@swc/helpers@0.5.3) '@svgr/webpack': specifier: 8.1.0 version: 8.1.0(typescript@5.3.3) @@ -331,8 +331,8 @@ importers: specifier: 0.5.10 version: 0.5.10(react-refresh@0.14.0)(webpack@5.89.0) '@rsbuild/babel-preset': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@swc/helpers': specifier: 0.5.3 version: 0.5.3 @@ -649,56 +649,56 @@ importers: specifier: 0.5.10 version: 0.5.10(react-refresh@0.14.0)(webpack@5.89.0) '@rsbuild/babel-preset': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@rsbuild/core': - specifier: 0.3.7 - version: 0.3.7 + specifier: 0.3.11 + version: 0.3.11 '@rsbuild/plugin-assets-retry': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@rsbuild/plugin-babel': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@rsbuild/plugin-check-syntax': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@rsbuild/plugin-css-minimizer': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3)(esbuild@0.17.19)(webpack@5.89.0) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3)(esbuild@0.17.19)(webpack@5.89.0) '@rsbuild/plugin-pug': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@rsbuild/plugin-react': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@rsbuild/plugin-rem': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@rsbuild/plugin-source-build': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@rsbuild/plugin-styled-components': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@rsbuild/plugin-svgr': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3)(typescript@5.3.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3)(typescript@5.3.3) '@rsbuild/plugin-toml': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@rsbuild/plugin-type-check': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3)(typescript@5.3.3)(webpack@5.89.0) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3)(typescript@5.3.3)(webpack@5.89.0) '@rsbuild/plugin-yaml': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@rsbuild/shared': - specifier: 0.3.7 - version: 0.3.7(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@swc/helpers@0.5.3) '@rsbuild/webpack': - specifier: 0.3.7 - version: 0.3.7(@swc/helpers@0.5.3)(esbuild@0.17.19) + specifier: 0.3.11 + version: 0.3.11(@swc/helpers@0.5.3)(esbuild@0.17.19) '@swc/helpers': specifier: 0.5.3 version: 0.5.3 @@ -767,8 +767,8 @@ importers: specifier: workspace:* version: link:../plugin-node-polyfill '@rsbuild/plugin-swc': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11) '@scripts/build': specifier: workspace:* version: link:../../../scripts/build @@ -1244,8 +1244,8 @@ importers: specifier: workspace:* version: link:../../toolkit/utils '@rsbuild/plugin-swc': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11) '@swc/helpers': specifier: 0.5.3 version: 0.5.3 @@ -1378,8 +1378,8 @@ importers: specifier: ^2.0.0 version: 2.0.0(@types/react-dom@18.0.6)(@types/react@18.0.21)(react-dom@18.2.0)(react@18.2.0) '@rsbuild/core': - specifier: 0.3.7 - version: 0.3.7 + specifier: 0.3.11 + version: 0.3.11 '@scripts/jest-config': specifier: workspace:* version: link:../../../scripts/jest-config @@ -3320,8 +3320,8 @@ importers: specifier: ^7.22.10 version: 7.22.10(@babel/eslint-parser@7.22.15)(eslint@8.28.0) '@rsbuild/babel-preset': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@typescript-eslint/eslint-plugin': specifier: ^5.59.0 version: 5.59.6(@typescript-eslint/parser@5.59.6)(eslint@8.28.0)(typescript@5.3.3) @@ -3731,8 +3731,8 @@ importers: specifier: workspace:* version: link:../../toolkit/utils '@rsbuild/babel-preset': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@swc/helpers': specifier: 0.5.3 version: 0.5.3 @@ -4494,8 +4494,8 @@ importers: specifier: workspace:* version: link:../core '@rsbuild/shared': - specifier: 0.3.7 - version: 0.3.7(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@swc/helpers@0.5.3) '@scripts/build': specifier: workspace:* version: link:../../../scripts/build @@ -4566,8 +4566,8 @@ importers: specifier: workspace:* version: link:../../toolkit/utils '@rsbuild/babel-preset': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@swc/helpers': specifier: 0.5.3 version: 0.5.3 @@ -4660,14 +4660,14 @@ importers: specifier: workspace:* version: link:../../toolkit/utils '@rsbuild/plugin-esbuild': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@rsbuild/plugin-node-polyfill': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) '@rsbuild/shared': - specifier: 0.3.7 - version: 0.3.7(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@swc/helpers@0.5.3) '@swc/helpers': specifier: 0.5.3 version: 0.5.3 @@ -4679,8 +4679,8 @@ importers: version: 0.17.19 devDependencies: '@rsbuild/plugin-swc': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11) '@scripts/build': specifier: workspace:* version: link:../../../scripts/build @@ -6011,11 +6011,11 @@ importers: specifier: 1.33.0 version: 1.33.0 '@rsbuild/plugin-swc': - specifier: 0.3.7 - version: 0.3.7(@rsbuild/core@0.3.7) + specifier: 0.3.11 + version: 0.3.11(@rsbuild/core@0.3.11) '@rsbuild/shared': - specifier: 0.3.7 - version: 0.3.7(@swc/helpers@0.5.3) + specifier: 0.3.11 + version: 0.3.11(@swc/helpers@0.5.3) '@types/lodash': specifier: ^4.14.202 version: 4.14.202 @@ -14322,8 +14322,8 @@ packages: rollup: 3.29.4 dev: true - /@rsbuild/babel-preset@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-GeKUdQRZFNzfoRw0tDRyabtKsgj3SXP0tqE/2spmedUriP8W6m5ywbaWwsyiBV6VU/fMljnvk4xlGzcdSfDGgg==} + /@rsbuild/babel-preset@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-9+89ULWAKKySuG4TKu6APzu5HRP3NOYQiPyVcZJ1+QFb/39Sf+MOaD31gv4Bl09+t61gBaML8dXXoFLCUboFVg==} dependencies: '@babel/core': 7.23.6 '@babel/plugin-proposal-decorators': 7.23.6(@babel/core@7.23.6) @@ -14335,8 +14335,8 @@ packages: '@babel/preset-typescript': 7.23.2(@babel/core@7.23.6) '@babel/runtime': 7.23.2 '@babel/types': 7.23.6 - '@rsbuild/plugin-babel': 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/plugin-babel': 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) '@types/babel__core': 7.20.3 babel-plugin-dynamic-import-node: 2.3.3 core-js: 3.32.2 @@ -14359,48 +14359,49 @@ packages: postcss: 8.4.31 dev: true - /@rsbuild/core@0.3.7: - resolution: {integrity: sha512-3CECaT33x0m+tnnvdSMmNkRUn5D0hrd2lSBklmyBKwTASKT8xlhHNWOTFbrOlG4PByjPRCO4PoykZa5OOVvXMA==} + /@rsbuild/core@0.3.11: + resolution: {integrity: sha512-nnjULj8IGyxIQqJZwaZAErXmUES0gVnCVTlcDKxExlMpvufnzhwn2jzgPepYUKsqgUD+BnvEyaV0MZJTPjpScg==} engines: {node: '>=14.0.0'} hasBin: true dependencies: - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) - '@rspack/core': 0.5.0(@swc/helpers@0.5.3) + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) + '@rspack/core': 0.5.3(@swc/helpers@0.5.3) '@swc/helpers': 0.5.3 core-js: 3.32.2 html-webpack-plugin: /html-rspack-plugin@5.5.7 postcss: 8.4.33 - /@rsbuild/monorepo-utils@0.3.7(@swc/helpers@0.5.3): - resolution: {integrity: sha512-sLsvvHTbAf3eaYR8wpc+88s0a13RR+WTa2SEML2BS1865BoHpkaURIDaVbLfIO3FWR6uap8WV5Eazl5fxwb3yQ==} + /@rsbuild/monorepo-utils@0.3.11(@swc/helpers@0.5.3): + resolution: {integrity: sha512-hna2PSOd0GhHWvnnwg2H97Y/ACi8Zd3tN9bEuvtEoP/tA+4+4Ubr3kFKgvNc8e8aPLpHMzEGetuXJInv8ldZzA==} dependencies: - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) fast-glob: 3.3.2 transitivePeerDependencies: - '@swc/helpers' dev: false - /@rsbuild/plugin-assets-retry@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-7Gpj6m18XQf+8BdLF0s5QD7DLYyLac8j1EuOzktSjL+UNFmTBrvkP3csEPSFcr2/n28YbC3CR31ZUVhtBwy0YA==} + /@rsbuild/plugin-assets-retry@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-GCqNctPGhUAtsRG4jOgIJBiFRyjuN6akWg33awK1HEQmW7Pp8Zgu8jKjKJzOEz1w3yXoELhXGcpTlynEgfcD/A==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) serialize-javascript: 6.0.1 transitivePeerDependencies: - '@swc/helpers' dev: false - /@rsbuild/plugin-babel@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-L4ORUCTmy3rv5elWrG04EyaOYea24BnRn5jp9aA0zHgraFVf/YAk430Cxa2qX7G8pWZtAHHRGE06ey3b1eCwBA==} + /@rsbuild/plugin-babel@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-1SKkFaBcazXbrCfhNIeuOIxw1Jqg9X5ACTquyZ/uTbLUBF/0cdvrGohl2Pm4mv2xI3W/TXc7OYf63dkwY4Zwqw==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: '@babel/core': 7.23.6 + '@babel/plugin-proposal-decorators': 7.23.6(@babel/core@7.23.6) '@babel/preset-typescript': 7.23.2(@babel/core@7.23.6) - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) '@types/babel__core': 7.20.3 upath: 2.0.1 transitivePeerDependencies: @@ -14408,13 +14409,13 @@ packages: - supports-color dev: false - /@rsbuild/plugin-check-syntax@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-jh6b4zU0TjbYb/+n3Hco3rj61kEJ46qyOC3zQo06SO3hqQp6K+mwYAHZC48vWxWarYxknJw6YRk+ndEziW5doQ==} + /@rsbuild/plugin-check-syntax@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-QGE2T7PDZH7QSojpUXi+EjwYRP5bAgKdtgXN3rKzDFLmvKVKhxE9ZmgOvlxIB/7mQ+Zp7SDMRjyJtzv133D8NA==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) acorn: 8.11.2 caniuse-lite: 1.0.30001566 htmlparser2: 9.1.0 @@ -14423,13 +14424,13 @@ packages: - '@swc/helpers' dev: false - /@rsbuild/plugin-css-minimizer@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3)(esbuild@0.17.19)(webpack@5.89.0): - resolution: {integrity: sha512-vbc6h3QppxJFBhbDQ9UQ6IT4ilO0kixsIgVUh+xdcHPvnDeA2hGre6Df4sd5ijTdEvnT2mddS4/w/4uYLMsp3w==} + /@rsbuild/plugin-css-minimizer@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3)(esbuild@0.17.19)(webpack@5.89.0): + resolution: {integrity: sha512-xOjVN7p3lKRVlUiXJgktwANFmaXhhWC72l5O24anK9E5tHxFW/LGthB9IrGWuDv8XFXLgXBdu4T6yBaD6zkkgg==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) css-minimizer-webpack-plugin: 5.0.1(esbuild@0.17.19)(webpack@5.89.0) transitivePeerDependencies: - '@parcel/css' @@ -14442,13 +14443,13 @@ packages: - webpack dev: false - /@rsbuild/plugin-esbuild@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-hQE/Dzp6WV58yCIU/BvjBoZpFMFwZ1kE22BpgHM1vvzv2DT0g++3vyUUoucsLWbsJpxluWnt1wS1sj5h+/dx6g==} + /@rsbuild/plugin-esbuild@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-XCfZz1w5Boh0NK1gi1JvNTLZdnEG4Kpma640vaCkOJ/XVVL4DgSN6szS+CXorQJER2QrmnC/r6g1UleBdWIMjw==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) esbuild: 0.17.19 webpack: 5.89.0(esbuild@0.17.19) transitivePeerDependencies: @@ -14458,13 +14459,13 @@ packages: - webpack-cli dev: false - /@rsbuild/plugin-node-polyfill@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-duck7P6dJPCIiTzzSekieA26skDX5//ECy3UAkZNis78Qh13Wr2+DEHiQ5BrFyptssuDCtjoA5x+791BU5N51Q==} + /@rsbuild/plugin-node-polyfill@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-BunJOekqzMefGQOln4Zf5fW7gom+MwDgTZJWBzXAactbRMwRHmveG53xHYXqkV6XDzYqBI8Jj2ROIirBd/6KzQ==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) assert: 2.1.0 browserify-zlib: 0.2.0 buffer: 5.7.1 @@ -14492,13 +14493,13 @@ packages: - '@swc/helpers' dev: false - /@rsbuild/plugin-pug@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-58r6gLsWN6SNqSV8+BpqDsOVn9LO0Vq51XMO4Q/ruSLJBdJEAw/o86XA4Ua36nKFJ7mn7rwxQewEbjd65dL1uQ==} + /@rsbuild/plugin-pug@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-gr4p5Q7oQ+kVjMLeB03KM4Y7tGg/G2fjlLT67sAa1pHwtT4TmEjsfnRvfvhsqS4CTTeWNnSSt5WMWQn+4NQdKw==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) '@types/pug': 2.0.10 pug: 3.0.2 transitivePeerDependencies: @@ -14515,49 +14516,49 @@ packages: - '@swc/helpers' dev: true - /@rsbuild/plugin-react@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-vKjVMZBHp1EEodVsPW5E9cOaA7UvnXxK7ACjWRvuRlMK54VUkYE/npzB2QAxXU3bKK2KiYOH78YYpiHyz1mkFQ==} + /@rsbuild/plugin-react@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-F4r/OFfibtdcF6QQaoUr9XnaYBfkYvk6H60z3DpxN33AS6qGFQCiHOievte6DqnALuwJC+iS9ZGDnTtEREq8pQ==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) - '@rspack/plugin-react-refresh': 0.5.0(react-refresh@0.14.0) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) + '@rspack/plugin-react-refresh': 0.5.3(react-refresh@0.14.0) react-refresh: 0.14.0 transitivePeerDependencies: - '@swc/helpers' - /@rsbuild/plugin-rem@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-72QsjLpDaIN4lA4KlgNVy9KLL1wvFEp9CNl69qtYmJLhFqSMlVBM8a+NEditw4gAokmYBL0abgxqkbEZd+pa2A==} + /@rsbuild/plugin-rem@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-JyKISA1801A3iOE1NRRtnIsBFaHWoMeZYbRWCG35xH5WdIZrnkKDuG9tZs9d5ClY0JRieMwmJ8xwEP8LbnoIqw==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) terser: 5.27.0 transitivePeerDependencies: - '@swc/helpers' dev: false - /@rsbuild/plugin-source-build@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-WtKgwDjpoxzSyuhwiVao86d/L9mDILfLXmNPQ4pHC3ZlJAwCMpQImyG3mfGR18q+V7svdUpdht8E58JcAeeA6A==} + /@rsbuild/plugin-source-build@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-NvLFIdBvTdhXq3x5J6c4yMClxYUIYObZVfqXaXcFCh2j7l9wN51/iHJWRRxkq2Bb9Rdx8xcISmUviYJQ2lWEFw==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/monorepo-utils': 0.3.7(@swc/helpers@0.5.3) - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/monorepo-utils': 0.3.11(@swc/helpers@0.5.3) + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) transitivePeerDependencies: - '@swc/helpers' dev: false - /@rsbuild/plugin-styled-components@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-HTdiTdHbkC7LOqZDoxpy0UhOWDUX72fYlse+AnaRUKEl+v95XnJaXKjbbFuhF6GKsXzKp/TlEkvoePTO1mz4qw==} + /@rsbuild/plugin-styled-components@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-rGBsc8SwoYWEvxZgjtHS0ISLSkiZtNofFi5cQWEwNyOCF/F+OKz7P4muhiW4lffcxGc/Q7jtpLMhxEu6KN93Jg==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) transitivePeerDependencies: - '@swc/helpers' dev: false @@ -14575,14 +14576,14 @@ packages: - typescript dev: true - /@rsbuild/plugin-svgr@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3)(typescript@5.3.3): - resolution: {integrity: sha512-35jIEhV8uWRUmPEIsZn86fkjLrD3eCKniiij0ZpES8+1fC4zpXxz0b60S0S8zNhkVM+K3RtuFYYIyG6xv+hPCQ==} + /@rsbuild/plugin-svgr@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3)(typescript@5.3.3): + resolution: {integrity: sha512-A54TYa0N7Rc3Qd1tJ6qYj8E3iJZUy5BlsBJQ8V1P4zEeBg+Oc3Q/5dVlrPiBaYRnxX1eJZzJcvZdXq2LuyppAQ==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/plugin-react': 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/plugin-react': 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) '@svgr/core': 8.1.0(typescript@5.3.3) '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0) '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0)(typescript@5.3.3) @@ -14592,37 +14593,37 @@ packages: - typescript dev: false - /@rsbuild/plugin-swc@0.3.7(@rsbuild/core@0.3.7): - resolution: {integrity: sha512-i7TNGlwXE0EVwekxcgoMadsejI6hEwoQM86DumsnBhaJ+/KYDmYl1wfH6X16XB0NnVNFG0nj4O3dPJATz9lz8Q==} + /@rsbuild/plugin-swc@0.3.11(@rsbuild/core@0.3.11): + resolution: {integrity: sha512-6+J9WjB1pHyrjn4ZUoOXwVB9SA6wGZYT9hwgHjnlvggKxrSWJb2VpTf9oXHLec1Zn8P2Nzw85f33bhB+3+Vf1w==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: '@modern-js/swc-plugins': 0.6.6(@swc/helpers@0.5.3) - '@rsbuild/core': 0.3.7 - '@rsbuild/plugin-react': 0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3) - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/plugin-react': 0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3) + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) '@swc/helpers': 0.5.3 core-js: 3.32.2 lodash: 4.17.21 - /@rsbuild/plugin-toml@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-/aCYF2GkBeChvzt0ydsZ4+v1t0TQhOqi8kdu0M0SB+QtOH00qnE2uCkrD44XKgYO9fxpAYW06yJLTGq+gXYoxw==} + /@rsbuild/plugin-toml@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-AxX2LlpLtP7rNhZFVKyAClIusvL1gB9RMtFBsi+RGop6OpkiQ970EylfQpheyk4PNHcgoXm+OL/2SqpwfBPJbg==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) transitivePeerDependencies: - '@swc/helpers' dev: false - /@rsbuild/plugin-type-check@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3)(typescript@5.3.3)(webpack@5.89.0): - resolution: {integrity: sha512-8KPu56GTVTuyk9zz7xj23wmTqDltfRzRbhOrV8thaXicLGNd+uVd2Xf453pPnSp6xCNElXM7fU7gpY44HmJu6g==} + /@rsbuild/plugin-type-check@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3)(typescript@5.3.3)(webpack@5.89.0): + resolution: {integrity: sha512-P3MfB5t41i9bndICWB8c30aqLWUkxs6PVM9Vyw+tERJ8aXX1FCg5BGrtYbPBdm1y8EfqC4pjMuE2l+ClxU/fiQ==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.3.3)(webpack@5.89.0) transitivePeerDependencies: - '@swc/helpers' @@ -14630,13 +14631,13 @@ packages: - webpack dev: false - /@rsbuild/plugin-yaml@0.3.7(@rsbuild/core@0.3.7)(@swc/helpers@0.5.3): - resolution: {integrity: sha512-/2BL0OfqLhzA6j0Wrowq/4lTXLyBTUHl/C4tkBKj58IV3V85zvfso6KDJa6put0lFH8wLFOMI+00UzrNo71ulA==} + /@rsbuild/plugin-yaml@0.3.11(@rsbuild/core@0.3.11)(@swc/helpers@0.5.3): + resolution: {integrity: sha512-3s2JjJnbrPmKsKi3Y0WoFUNzmYUiNF7ky8rfHslL17CyTxzT2ryhElnIk/sm1HuMjJwmacH9WIIsu6Ou/6047A==} peerDependencies: - '@rsbuild/core': ^0.3.7 + '@rsbuild/core': ^0.3.11 dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) transitivePeerDependencies: - '@swc/helpers' dev: false @@ -14652,21 +14653,21 @@ packages: - '@swc/helpers' dev: true - /@rsbuild/shared@0.3.7(@swc/helpers@0.5.3): - resolution: {integrity: sha512-XY82H5CzymyuUC3zGxTWDgKEXWXiQnt1kmPQS1T1mS6jwo8SSwTcEub+E5vtpAOn6r1tNGGHZre+7EVJtF51nQ==} + /@rsbuild/shared@0.3.11(@swc/helpers@0.5.3): + resolution: {integrity: sha512-PjjrUe1mstoy7N7A6Xr1i5sAKSGPfNay/cEbRt3SBvdYPOsK87TLE6DS9WtViSp8QYHh97cgJ6z1ufuluElDDw==} dependencies: - '@rspack/core': 0.5.0(@swc/helpers@0.5.3) + '@rspack/core': 0.5.3(@swc/helpers@0.5.3) caniuse-lite: 1.0.30001566 lodash: 4.17.21 postcss: 8.4.33 transitivePeerDependencies: - '@swc/helpers' - /@rsbuild/webpack@0.3.7(@swc/helpers@0.5.3)(esbuild@0.17.19): - resolution: {integrity: sha512-GP/HSftBrxPI0l3VVZ8ZudD7oUgD8iL0PRtLbowy3fkSm9Ym9z86KuUHMKNqjBNXyigWdCVj2wbjRLULynlOzg==} + /@rsbuild/webpack@0.3.11(@swc/helpers@0.5.3)(esbuild@0.17.19): + resolution: {integrity: sha512-WuEffe1OZ5tZntXkcSRYWnx12VC/0wPWpq5T+ok73tVDQSNcNrCGJ8RQS5Wxq1KaNthMVz1//vT4DhChvF+30g==} dependencies: - '@rsbuild/core': 0.3.7 - '@rsbuild/shared': 0.3.7(@swc/helpers@0.5.3) + '@rsbuild/core': 0.3.11 + '@rsbuild/shared': 0.3.11(@swc/helpers@0.5.3) fast-glob: 3.3.2 globby: 11.1.0 html-webpack-plugin: /html-rspack-plugin@5.5.7 @@ -14742,6 +14743,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: true optional: true /@rspack/binding-darwin-arm64@0.5.1: @@ -14752,6 +14754,13 @@ packages: dev: true optional: true + /@rspack/binding-darwin-arm64@0.5.3: + resolution: {integrity: sha512-IgGpPtPwwlWkViTbrGBhywohXoGXwMZGZLPLR3tRZY4oPuSo41cwkPAhf2TZtBIfHGbITrmewsck853A4g7poA==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + optional: true + /@rspack/binding-darwin-x64@0.4.5: resolution: {integrity: sha512-K5HgE4nHwVWizCr2pBLA8N3LXfn1lQCSV5sR+6xQQrVdvRJ5zBhPMwjPOzP+AdmGhrD14zz1j9mktzCvA7FUtg==} cpu: [x64] @@ -14765,6 +14774,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: true optional: true /@rspack/binding-darwin-x64@0.5.1: @@ -14775,6 +14785,13 @@ packages: dev: true optional: true + /@rspack/binding-darwin-x64@0.5.3: + resolution: {integrity: sha512-95lDx4+QTmuGQ3Ilo1BhM22jGHxPAMDvQzBD/4zO1cBtmXrFQuaDVRoM0hwlZDLZwGMP1sSpD5F75kWKhkOTDw==} + cpu: [x64] + os: [darwin] + requiresBuild: true + optional: true + /@rspack/binding-linux-arm64-gnu@0.4.5: resolution: {integrity: sha512-JvESc3imqKbqwal5WesxlV3ix8eIO/07XCj+pkaZWaf4nj/ui02NGtLaeLVxwc1fxHekdLc+ROQrxpdOLhQ1jw==} cpu: [arm64] @@ -14788,6 +14805,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /@rspack/binding-linux-arm64-gnu@0.5.1: @@ -14798,6 +14816,13 @@ packages: dev: true optional: true + /@rspack/binding-linux-arm64-gnu@0.5.3: + resolution: {integrity: sha512-7ZcsDROYK01FWJ9Nv1Oso7gC3b3aP8FLzbZA7ZWFCPEuBoFmIvCIVqs6DSmmpZW3KSw+XoVMELuEJuTjDi869g==} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + /@rspack/binding-linux-arm64-musl@0.4.5: resolution: {integrity: sha512-ziYGYEoLsPEyC0pEAj5clU8XOFr3+r7IExm9/sq2gp+M1as/yTzouEuzO3D8kI0xVfub1WmiEktTBlgjS13CSA==} cpu: [arm64] @@ -14811,6 +14836,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /@rspack/binding-linux-arm64-musl@0.5.1: @@ -14821,6 +14847,13 @@ packages: dev: true optional: true + /@rspack/binding-linux-arm64-musl@0.5.3: + resolution: {integrity: sha512-IBfVGpycRrLbyCWzokzeFIfK+yII68w1WOx2iCoR+tPUKa3M7WAZjrbVB33PHxGKXeF+xX7Lzm50hi4uTK8L6g==} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + /@rspack/binding-linux-x64-gnu@0.4.5: resolution: {integrity: sha512-9cXOIswpSZYhEXeuIWdsQNrgpjHTD4I3v0NPm75cL6cdBtJMHOa/qejO5mdTLzoDdE7waGZAb4uSMfrJOEkwqQ==} cpu: [x64] @@ -14834,6 +14867,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /@rspack/binding-linux-x64-gnu@0.5.1: @@ -14844,6 +14878,13 @@ packages: dev: true optional: true + /@rspack/binding-linux-x64-gnu@0.5.3: + resolution: {integrity: sha512-EiVsp0yaGBmnMsS1U6Z5bitl2AjiVqFN3ArdIDZLlxgpVUHaR1ObXIkVqsX/VK5Jgytv1H7iOmtOnkOqyFmxPw==} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + /@rspack/binding-linux-x64-musl@0.4.5: resolution: {integrity: sha512-wClTj9mbVKprHIWsLEVJg+ZXT5slF93JsyAALIhAFkNMmn5z0B2NPD7+Oaii62edKMk2nS3dpoHu1JCLDmP0cw==} cpu: [x64] @@ -14857,6 +14898,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /@rspack/binding-linux-x64-musl@0.5.1: @@ -14867,6 +14909,13 @@ packages: dev: true optional: true + /@rspack/binding-linux-x64-musl@0.5.3: + resolution: {integrity: sha512-PZbmHZ/sFBC0W2vNNmMgeVORijAxhdkaU0QS95ltacO+bU8npcNb+01QgRzJovuhOfiT7HXDUmH7K0mrUqXpFg==} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + /@rspack/binding-win32-arm64-msvc@0.4.5: resolution: {integrity: sha512-8LNITZqPMKO69nc8hwdcweBXcAS4yAL5W/kZ6zKeb6Ly+X5SBZk7l0WPL7lPMib/vHFkjJjp1buGhzymLU0bzA==} cpu: [arm64] @@ -14880,6 +14929,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: true optional: true /@rspack/binding-win32-arm64-msvc@0.5.1: @@ -14890,6 +14940,13 @@ packages: dev: true optional: true + /@rspack/binding-win32-arm64-msvc@0.5.3: + resolution: {integrity: sha512-bP1tgwQuTe0YSVpe73qEPXdt2rZGUpCUG3nFW+Ve27CJtq6btLqdcnnNEx2cAKs12ArN4H36U+BXfwJDp9/DaQ==} + cpu: [arm64] + os: [win32] + requiresBuild: true + optional: true + /@rspack/binding-win32-ia32-msvc@0.4.5: resolution: {integrity: sha512-dndiXygG1ZmSO3unuZ9Mc+7IvqBtFqwvjFZGKUdIcufFr2CjZDL/KR1zJGTmFIzwHKMV2hEH4cZpa2TwisXvGQ==} cpu: [ia32] @@ -14903,6 +14960,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: true optional: true /@rspack/binding-win32-ia32-msvc@0.5.1: @@ -14913,6 +14971,13 @@ packages: dev: true optional: true + /@rspack/binding-win32-ia32-msvc@0.5.3: + resolution: {integrity: sha512-XKMNgkc5ScDKzt2xFQWD7ELefaEQtm9+1/7xhftDAxAC3AQELC0NqL5qAWpgSXEgVIjCW8r7xiwX5mqEEqqiuw==} + cpu: [ia32] + os: [win32] + requiresBuild: true + optional: true + /@rspack/binding-win32-x64-msvc@0.4.5: resolution: {integrity: sha512-SEu8+pQsnGP7A0/XX5vawsccR825UCOzK5phJ8INSC7Mse8FKzkZpv2Af3PsHl2+N17M0PRgBxTghXR35PXkiw==} cpu: [x64] @@ -14926,6 +14991,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: true optional: true /@rspack/binding-win32-x64-msvc@0.5.1: @@ -14936,6 +15002,13 @@ packages: dev: true optional: true + /@rspack/binding-win32-x64-msvc@0.5.3: + resolution: {integrity: sha512-B0iosD3cTXErnlqnOawn4DqfrO2QaY135vKqBrbqTfm9Zr4ftbqvp39nL9Qot+1QuixZdYwwF/NqBvRoFd9nig==} + cpu: [x64] + os: [win32] + requiresBuild: true + optional: true + /@rspack/binding@0.4.5: resolution: {integrity: sha512-XmSlt9ucpfebhkWI4guPEym0F+8JZGr8UyBVAtHN2/7SQRI8TL8G1BUQGVgmc7+UKA5RM1Qfps1QmtHYzjARBQ==} optionalDependencies: @@ -14962,6 +15035,7 @@ packages: '@rspack/binding-win32-arm64-msvc': 0.5.0 '@rspack/binding-win32-ia32-msvc': 0.5.0 '@rspack/binding-win32-x64-msvc': 0.5.0 + dev: true /@rspack/binding@0.5.1: resolution: {integrity: sha512-2CMZ0oVBEgs+/v2nNzIEDqKS01Al//biWl0aDclh8ypeEIM9tkI/gvhjrovsnyib9oxsO3xCM4tCNCND+nx1CA==} @@ -14977,6 +15051,19 @@ packages: '@rspack/binding-win32-x64-msvc': 0.5.1 dev: true + /@rspack/binding@0.5.3: + resolution: {integrity: sha512-bwxjp2mvSGGgVRk1D+dwilwaSEvzhQTlhe3+f2h+cjampJpEa72jle1T4bpXTOOMM0JRq06AzUWlzoMxKn+JKA==} + optionalDependencies: + '@rspack/binding-darwin-arm64': 0.5.3 + '@rspack/binding-darwin-x64': 0.5.3 + '@rspack/binding-linux-arm64-gnu': 0.5.3 + '@rspack/binding-linux-arm64-musl': 0.5.3 + '@rspack/binding-linux-x64-gnu': 0.5.3 + '@rspack/binding-linux-x64-musl': 0.5.3 + '@rspack/binding-win32-arm64-msvc': 0.5.3 + '@rspack/binding-win32-ia32-msvc': 0.5.3 + '@rspack/binding-win32-x64-msvc': 0.5.3 + /@rspack/core@0.4.5: resolution: {integrity: sha512-X29fvCqTJH9OYN5pqa2lYP9hBLGICGVugtpTIAyLtMxC7gqvjvZkG/qisaVsjPyg4p2eB0NvmosnHkRv0GJ4sg==} engines: {node: '>=16.0.0'} @@ -15022,6 +15109,7 @@ packages: webpack-sources: 3.2.3 zod: 3.22.3 zod-validation-error: 1.3.1(zod@3.22.3) + dev: true /@rspack/core@0.5.1(@swc/helpers@0.5.3): resolution: {integrity: sha512-fsUKPhnBCV7UOE31W03GBfqp7lSRZBcRuvLwrUt1bmTAvl9SRrR0HuWhJAs4O8LvrjKgxRzXPM8Fpysqerfo4w==} @@ -15048,6 +15136,31 @@ packages: zod-validation-error: 1.3.1(zod@3.22.3) dev: true + /@rspack/core@0.5.3(@swc/helpers@0.5.3): + resolution: {integrity: sha512-/WCMUCwcduSrx0za1kVoN3Fdkf/fDK3v6fgvJeeNc+l7/mGttSROUmlVidmz7eyQuD9itr947NB5U087Y99dag==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@swc/helpers': '>=0.5.1' + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@module-federation/runtime-tools': 0.0.8 + '@rspack/binding': 0.5.3 + '@swc/helpers': 0.5.3 + browserslist: 4.22.2 + enhanced-resolve: 5.12.0 + events: 3.3.0 + graceful-fs: 4.2.10 + json-parse-even-better-errors: 3.0.0 + neo-async: 2.6.2 + tapable: 2.2.1 + terminal-link: 2.1.1 + watchpack: 2.4.0 + webpack-sources: 3.2.3 + zod: 3.22.3 + zod-validation-error: 1.3.1(zod@3.22.3) + /@rspack/plugin-html@0.4.5(@rspack/core@0.4.5): resolution: {integrity: sha512-W+m86gTwfY18Zbx/j1SHnF0qQwcvupcxn1UTCrkygVVmJhEtPXIid4DsNLMp9Igs4LBkWBeC9SU+xzF0BUkjGA==} peerDependencies: @@ -15083,6 +15196,17 @@ packages: optional: true dependencies: react-refresh: 0.14.0 + dev: true + + /@rspack/plugin-react-refresh@0.5.3(react-refresh@0.14.0): + resolution: {integrity: sha512-YdEtvfLBpbbtqUO5cxM947FjdZhsTBR3Dp8djxGS1jPUZ+gJ0tOmNI5V3MZtDC/lsiSlnnKwOAImOUSQ9yV1Fw==} + peerDependencies: + react-refresh: '>=0.10.0 <1.0.0' + peerDependenciesMeta: + react-refresh: + optional: true + dependencies: + react-refresh: 0.14.0 /@rspress/core@1.10.1(typescript@5.3.3)(webpack@5.89.0): resolution: {integrity: sha512-o45P7J4EDu0X3U0ai7RFYlJpYaUYmGSBxoP8K3KFmDRBugLuhfAmJ7wr7tTfG7nnH5Q8NaMI8/+FmGWYXA5qww==} diff --git a/tests/e2e/builder/package.json b/tests/e2e/builder/package.json index de644ee6991f..ecdc4eaf06ba 100644 --- a/tests/e2e/builder/package.json +++ b/tests/e2e/builder/package.json @@ -16,8 +16,8 @@ "vue": "^3.3.4" }, "devDependencies": { - "@rsbuild/plugin-swc": "0.3.7", - "@rsbuild/shared": "0.3.7", + "@rsbuild/plugin-swc": "0.3.11", + "@rsbuild/shared": "0.3.11", "@modern-js/uni-builder": "workspace:*", "@modern-js/e2e": "workspace:*", "@modern-js/utils": "workspace:*", From 4640c5dfc7f4121941829c82f7f9a5cafdf1eac9 Mon Sep 17 00:00:00 2001 From: "gaoyuan.1226" Date: Wed, 31 Jan 2024 15:58:55 +0800 Subject: [PATCH 2/3] fix: use source.decorators instead of enableLatestDecorators --- .../src/rspack/plugins/babel-post.ts | 6 +- .../src/shared/parseCommonConfig.ts | 9 +- packages/builder/uni-builder/src/types.ts | 4 + .../uni-builder/src/webpack/plugins/babel.ts | 6 +- .../tests/__snapshots__/babel.test.ts.snap | 32 +- .../tests/__snapshots__/default.test.ts.snap | 613 +++++++++--------- .../__snapshots__/postcssLegacy.test.ts.snap | 291 +++++---- .../styledComponents.test.ts.snap | 2 + .../cases/decorator/latest/index.test.ts | 35 - .../cases/decorator/latest/src/index.js | 51 -- 10 files changed, 496 insertions(+), 553 deletions(-) delete mode 100644 tests/e2e/builder/cases/decorator/latest/index.test.ts delete mode 100644 tests/e2e/builder/cases/decorator/latest/src/index.js diff --git a/packages/builder/uni-builder/src/rspack/plugins/babel-post.ts b/packages/builder/uni-builder/src/rspack/plugins/babel-post.ts index fdec8fc98ca2..a06693f8779d 100644 --- a/packages/builder/uni-builder/src/rspack/plugins/babel-post.ts +++ b/packages/builder/uni-builder/src/rspack/plugins/babel-post.ts @@ -12,6 +12,7 @@ export const pluginBabelPost = (): RsbuildPlugin => ({ setup(api) { api.modifyBundlerChain(async (chain, { CHAIN_ID }) => { + const config = api.getNormalizedConfig(); if (chain.module.rules.get(CHAIN_ID.RULE.JS)) { const babelLoaderOptions = chain.module .rule(CHAIN_ID.RULE.JS) @@ -20,7 +21,10 @@ export const pluginBabelPost = (): RsbuildPlugin => ({ if ( babelLoaderOptions && - lodash.isEqual(getDefaultBabelOptions(), babelLoaderOptions) + lodash.isEqual( + getDefaultBabelOptions(config.source.decorators), + babelLoaderOptions, + ) ) { chain.module.rule(CHAIN_ID.RULE.JS).uses.delete(CHAIN_ID.USE.BABEL); } diff --git a/packages/builder/uni-builder/src/shared/parseCommonConfig.ts b/packages/builder/uni-builder/src/shared/parseCommonConfig.ts index c91d20967970..9119bd82a731 100644 --- a/packages/builder/uni-builder/src/shared/parseCommonConfig.ts +++ b/packages/builder/uni-builder/src/shared/parseCommonConfig.ts @@ -99,6 +99,7 @@ export async function parseCommonConfig( plugins: [...plugins] = [], performance: { ...performanceConfig } = {}, output: { + enableLatestDecorators, cssModuleLocalIdentName, enableInlineScripts, disableCssExtract, @@ -149,7 +150,13 @@ export async function parseCommonConfig( security: securityConfig, }; - const { dev = {}, html = {}, output = {} } = rsbuildConfig; + const { dev = {}, html = {}, output = {}, source = {} } = rsbuildConfig; + + if (enableLatestDecorators) { + source.decorators = { + version: '2022-03', + }; + } if (cssModuleLocalIdentName) { output.cssModules ||= {}; diff --git a/packages/builder/uni-builder/src/types.ts b/packages/builder/uni-builder/src/types.ts index 36a0295bd9ad..0943854df43e 100644 --- a/packages/builder/uni-builder/src/types.ts +++ b/packages/builder/uni-builder/src/types.ts @@ -151,6 +151,10 @@ export type UniBuilderExtraConfig = { resolveExtensionPrefix?: string | Partial>; }; output?: { + /** + * @deprecated use `source.decorators` instead + */ + enableLatestDecorators?: boolean; /** * @deprecated use `output.cssModules.localIdentName` instead */ diff --git a/packages/builder/uni-builder/src/webpack/plugins/babel.ts b/packages/builder/uni-builder/src/webpack/plugins/babel.ts index c60496bdfebc..b586d6a096aa 100644 --- a/packages/builder/uni-builder/src/webpack/plugins/babel.ts +++ b/packages/builder/uni-builder/src/webpack/plugins/babel.ts @@ -56,11 +56,7 @@ export const pluginBabel = (options?: PluginBabelOptions): RsbuildPlugin => ({ }, }; - const decoratorConfig = { - version: config.output.enableLatestDecorators - ? '2018-09' - : 'legacy', - } as const; + const decoratorConfig = config.source.decorators; const baseBabelConfig = isServer || isServiceWorker diff --git a/packages/builder/uni-builder/tests/__snapshots__/babel.test.ts.snap b/packages/builder/uni-builder/tests/__snapshots__/babel.test.ts.snap index 20eb1bfa8d31..046bb4072453 100644 --- a/packages/builder/uni-builder/tests/__snapshots__/babel.test.ts.snap +++ b/packages/builder/uni-builder/tests/__snapshots__/babel.test.ts.snap @@ -2,12 +2,6 @@ exports[`plugin-babel (rspack mode) > should not set babel-loader when babel config not modified 1`] = ` [ - { - "resolve": { - "fullySpecified": false, - }, - "test": /\\\\\\.m\\?js/, - }, { "include": [ { @@ -48,7 +42,7 @@ exports[`plugin-babel (rspack mode) > should not set babel-loader when babel con "decoratorMetadata": true, "legacyDecorator": true, "react": { - "development": true, + "development": false, "refresh": true, "runtime": "automatic", }, @@ -85,17 +79,17 @@ exports[`plugin-babel (rspack mode) > should not set babel-loader when babel con }, ], }, -] -`; - -exports[`plugin-babel (rspack mode) > should set babel-loader when babel config modified 1`] = ` -[ { "resolve": { "fullySpecified": false, }, "test": /\\\\\\.m\\?js/, }, +] +`; + +exports[`plugin-babel (rspack mode) > should set babel-loader when babel config modified 1`] = ` +[ { "include": [ { @@ -136,7 +130,7 @@ exports[`plugin-babel (rspack mode) > should set babel-loader when babel config "decoratorMetadata": true, "legacyDecorator": true, "react": { - "development": true, + "development": false, "refresh": true, "runtime": "automatic", }, @@ -178,6 +172,12 @@ exports[`plugin-babel (rspack mode) > should set babel-loader when babel config "compact": false, "configFile": false, "plugins": [ + [ + "/node_modules//@babel/plugin-proposal-decorators/lib/index.js", + { + "version": "legacy", + }, + ], [ "babel-plugin-import", { @@ -203,6 +203,12 @@ exports[`plugin-babel (rspack mode) > should set babel-loader when babel config }, ], }, + { + "resolve": { + "fullySpecified": false, + }, + "test": /\\\\\\.m\\?js/, + }, ] `; diff --git a/packages/builder/uni-builder/tests/__snapshots__/default.test.ts.snap b/packages/builder/uni-builder/tests/__snapshots__/default.test.ts.snap index a6f8b11ed725..0691150cba5f 100644 --- a/packages/builder/uni-builder/tests/__snapshots__/default.test.ts.snap +++ b/packages/builder/uni-builder/tests/__snapshots__/default.test.ts.snap @@ -33,6 +33,156 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` }, }, "rules": [ + { + "include": [ + { + "and": [ + "", + { + "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, + }, + ], + }, + /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, + ], + "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, + "type": "javascript/auto", + "use": [ + { + "loader": "builtin:swc-loader", + "options": { + "env": { + "coreJs": "3.32", + "mode": "entry", + "targets": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + }, + "isModule": "unknown", + "jsc": { + "externalHelpers": true, + "parser": { + "decorators": true, + "syntax": "typescript", + "tsx": true, + }, + "preserveAllComments": true, + "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, + "react": { + "development": true, + "refresh": true, + "runtime": "automatic", + }, + }, + }, + "rspackExperiments": { + "import": [ + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + ], + "styledComponents": { + "displayName": true, + "pure": false, + "ssr": false, + "transpileTemplateLiterals": true, + }, + }, + "sourceMaps": true, + }, + }, + ], + }, + { + "mimetype": { + "or": [ + "text/javascript", + "application/javascript", + ], + }, + "resolve": { + "fullySpecified": false, + }, + "use": [ + { + "loader": "builtin:swc-loader", + "options": { + "env": { + "coreJs": "3.32", + "mode": "entry", + "targets": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + }, + "isModule": "unknown", + "jsc": { + "externalHelpers": true, + "parser": { + "decorators": true, + "syntax": "typescript", + "tsx": true, + }, + "preserveAllComments": true, + "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, + "react": { + "development": true, + "refresh": true, + "runtime": "automatic", + }, + }, + }, + "rspackExperiments": { + "import": [ + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + ], + "styledComponents": { + "displayName": true, + "pure": false, + "ssr": false, + "transpileTemplateLiterals": true, + }, + }, + "sourceMaps": true, + }, + }, + ], + }, { "resolve": { "fullySpecified": false, @@ -465,172 +615,25 @@ exports[`uni-builder rspack > should generator rspack config correctly 1`] = ` "test": /\\\\\\.s\\(\\?:a\\|c\\)ss\\$/, }, { - "include": [ + "test": /\\\\\\.toml\\$/, + "type": "javascript/auto", + "use": [ { - "and": [ - "", - { - "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, - }, - ], + "loader": "/node_modules//@rsbuild/plugin-toml/compiled/toml-loader", }, - /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, ], - "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, + }, + { + "test": /\\\\\\.ya\\?ml\\$/, "type": "javascript/auto", "use": [ { - "loader": "builtin:swc-loader", - "options": { - "env": { - "coreJs": "3.32", - "mode": "entry", - "targets": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - }, - "isModule": "unknown", - "jsc": { - "externalHelpers": true, - "parser": { - "decorators": true, - "syntax": "typescript", - "tsx": true, - }, - "preserveAllComments": true, - "transform": { - "decoratorMetadata": true, - "legacyDecorator": true, - "react": { - "development": true, - "refresh": true, - "runtime": "automatic", - }, - }, - }, - "rspackExperiments": { - "import": [ - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - ], - "styledComponents": { - "displayName": true, - "pure": false, - "ssr": false, - "transpileTemplateLiterals": true, - }, - }, - "sourceMaps": true, - }, + "loader": "/node_modules//@rsbuild/plugin-yaml/compiled/yaml-loader", }, ], }, { - "mimetype": { - "or": [ - "text/javascript", - "application/javascript", - ], - }, - "use": [ - { - "loader": "builtin:swc-loader", - "options": { - "env": { - "coreJs": "3.32", - "mode": "entry", - "targets": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - }, - "isModule": "unknown", - "jsc": { - "externalHelpers": true, - "parser": { - "decorators": true, - "syntax": "typescript", - "tsx": true, - }, - "preserveAllComments": true, - "transform": { - "decoratorMetadata": true, - "legacyDecorator": true, - "react": { - "development": true, - "refresh": true, - "runtime": "automatic", - }, - }, - }, - "rspackExperiments": { - "import": [ - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - ], - "styledComponents": { - "displayName": true, - "pure": false, - "ssr": false, - "transpileTemplateLiterals": true, - }, - }, - "sourceMaps": true, - }, - }, - ], - }, - { - "test": /\\\\\\.toml\\$/, - "type": "javascript/auto", - "use": [ - { - "loader": "/node_modules//@rsbuild/plugin-toml/compiled/toml-loader", - }, - ], - }, - { - "test": /\\\\\\.ya\\?ml\\$/, - "type": "javascript/auto", - "use": [ - { - "loader": "/node_modules//@rsbuild/plugin-yaml/compiled/yaml-loader", - }, - ], - }, - { - "oneOf": [ + "oneOf": [ { "generator": { "filename": "static/svg/[name].[contenthash:8].svg", @@ -984,6 +987,7 @@ exports[`uni-builder rspack > should generator rspack config correctly 2`] = ` "rsbuild:start-url", "rsbuild:inline-chunk", "rsbuild:bundle-analyzer", + "rsbuild:rsdoctor", "plugin-network-performance", "plugin-preload-or-prefetch", "rsbuild:performance", @@ -1038,6 +1042,156 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod }, }, "rules": [ + { + "include": [ + { + "and": [ + "", + { + "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, + }, + ], + }, + /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, + ], + "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, + "type": "javascript/auto", + "use": [ + { + "loader": "builtin:swc-loader", + "options": { + "env": { + "coreJs": "3.32", + "mode": "entry", + "targets": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + }, + "isModule": "unknown", + "jsc": { + "externalHelpers": true, + "parser": { + "decorators": true, + "syntax": "typescript", + "tsx": true, + }, + "preserveAllComments": true, + "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, + "react": { + "development": false, + "refresh": false, + "runtime": "automatic", + }, + }, + }, + "rspackExperiments": { + "import": [ + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + ], + "styledComponents": { + "displayName": true, + "pure": true, + "ssr": false, + "transpileTemplateLiterals": true, + }, + }, + "sourceMaps": false, + }, + }, + ], + }, + { + "mimetype": { + "or": [ + "text/javascript", + "application/javascript", + ], + }, + "resolve": { + "fullySpecified": false, + }, + "use": [ + { + "loader": "builtin:swc-loader", + "options": { + "env": { + "coreJs": "3.32", + "mode": "entry", + "targets": [ + "> 0.01%", + "not dead", + "not op_mini all", + ], + }, + "isModule": "unknown", + "jsc": { + "externalHelpers": true, + "parser": { + "decorators": true, + "syntax": "typescript", + "tsx": true, + }, + "preserveAllComments": true, + "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, + "react": { + "development": false, + "refresh": false, + "runtime": "automatic", + }, + }, + }, + "rspackExperiments": { + "import": [ + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + ], + "styledComponents": { + "displayName": true, + "pure": true, + "ssr": false, + "transpileTemplateLiterals": true, + }, + }, + "sourceMaps": false, + }, + }, + ], + }, { "resolve": { "fullySpecified": false, @@ -1469,153 +1623,6 @@ exports[`uni-builder rspack > should generator rspack config correctly when prod ], "test": /\\\\\\.s\\(\\?:a\\|c\\)ss\\$/, }, - { - "include": [ - { - "and": [ - "", - { - "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, - }, - ], - }, - /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, - ], - "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, - "type": "javascript/auto", - "use": [ - { - "loader": "builtin:swc-loader", - "options": { - "env": { - "coreJs": "3.32", - "mode": "entry", - "targets": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - }, - "isModule": "unknown", - "jsc": { - "externalHelpers": true, - "parser": { - "decorators": true, - "syntax": "typescript", - "tsx": true, - }, - "preserveAllComments": true, - "transform": { - "decoratorMetadata": true, - "legacyDecorator": true, - "react": { - "development": false, - "refresh": false, - "runtime": "automatic", - }, - }, - }, - "rspackExperiments": { - "import": [ - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - ], - "styledComponents": { - "displayName": true, - "pure": true, - "ssr": false, - "transpileTemplateLiterals": true, - }, - }, - "sourceMaps": false, - }, - }, - ], - }, - { - "mimetype": { - "or": [ - "text/javascript", - "application/javascript", - ], - }, - "use": [ - { - "loader": "builtin:swc-loader", - "options": { - "env": { - "coreJs": "3.32", - "mode": "entry", - "targets": [ - "> 0.01%", - "not dead", - "not op_mini all", - ], - }, - "isModule": "unknown", - "jsc": { - "externalHelpers": true, - "parser": { - "decorators": true, - "syntax": "typescript", - "tsx": true, - }, - "preserveAllComments": true, - "transform": { - "decoratorMetadata": true, - "legacyDecorator": true, - "react": { - "development": false, - "refresh": false, - "runtime": "automatic", - }, - }, - }, - "rspackExperiments": { - "import": [ - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - ], - "styledComponents": { - "displayName": true, - "pure": true, - "ssr": false, - "transpileTemplateLiterals": true, - }, - }, - "sourceMaps": false, - }, - }, - ], - }, { "test": /\\\\\\.toml\\$/, "type": "javascript/auto", diff --git a/packages/builder/uni-builder/tests/__snapshots__/postcssLegacy.test.ts.snap b/packages/builder/uni-builder/tests/__snapshots__/postcssLegacy.test.ts.snap index 9563c54d57e4..a89e806f17e7 100644 --- a/packages/builder/uni-builder/tests/__snapshots__/postcssLegacy.test.ts.snap +++ b/packages/builder/uni-builder/tests/__snapshots__/postcssLegacy.test.ts.snap @@ -8,6 +8,152 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 }, }, "rules": [ + { + "include": [ + { + "and": [ + "", + { + "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, + }, + ], + }, + /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, + ], + "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, + "type": "javascript/auto", + "use": [ + { + "loader": "builtin:swc-loader", + "options": { + "env": { + "coreJs": "3.32", + "mode": "entry", + "targets": [ + "chrome >= 87", + ], + }, + "isModule": "unknown", + "jsc": { + "externalHelpers": true, + "parser": { + "decorators": true, + "syntax": "typescript", + "tsx": true, + }, + "preserveAllComments": true, + "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, + "react": { + "development": false, + "refresh": true, + "runtime": "automatic", + }, + }, + }, + "rspackExperiments": { + "import": [ + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + ], + "styledComponents": { + "displayName": true, + "pure": false, + "ssr": false, + "transpileTemplateLiterals": true, + }, + }, + "sourceMaps": true, + }, + }, + ], + }, + { + "mimetype": { + "or": [ + "text/javascript", + "application/javascript", + ], + }, + "resolve": { + "fullySpecified": false, + }, + "use": [ + { + "loader": "builtin:swc-loader", + "options": { + "env": { + "coreJs": "3.32", + "mode": "entry", + "targets": [ + "chrome >= 87", + ], + }, + "isModule": "unknown", + "jsc": { + "externalHelpers": true, + "parser": { + "decorators": true, + "syntax": "typescript", + "tsx": true, + }, + "preserveAllComments": true, + "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, + "react": { + "development": false, + "refresh": true, + "runtime": "automatic", + }, + }, + }, + "rspackExperiments": { + "import": [ + { + "libraryDirectory": "es", + "libraryName": "antd", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "es", + "libraryName": "@arco-design/web-react", + "style": true, + }, + { + "camelToDashComponentName": false, + "libraryDirectory": "react-icon", + "libraryName": "@arco-design/web-react/icon", + }, + ], + "styledComponents": { + "displayName": true, + "pure": false, + "ssr": false, + "transpileTemplateLiterals": true, + }, + }, + "sourceMaps": true, + }, + }, + ], + }, { "resolve": { "fullySpecified": false, @@ -391,149 +537,6 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 ], "test": /\\\\\\.s\\(\\?:a\\|c\\)ss\\$/, }, - { - "include": [ - { - "and": [ - "", - { - "not": /\\[\\\\\\\\/\\]node_modules\\[\\\\\\\\/\\]/, - }, - ], - }, - /\\\\\\.\\(\\?:ts\\|tsx\\|jsx\\|mts\\|cts\\)\\$/, - ], - "test": /\\\\\\.\\(\\?:js\\|jsx\\|mjs\\|cjs\\|ts\\|tsx\\|mts\\|cts\\)\\$/, - "type": "javascript/auto", - "use": [ - { - "loader": "builtin:swc-loader", - "options": { - "env": { - "coreJs": "3.32", - "mode": "entry", - "targets": [ - "chrome >= 87", - ], - }, - "isModule": "unknown", - "jsc": { - "externalHelpers": true, - "parser": { - "decorators": true, - "syntax": "typescript", - "tsx": true, - }, - "preserveAllComments": true, - "transform": { - "decoratorMetadata": true, - "legacyDecorator": true, - "react": { - "development": true, - "refresh": true, - "runtime": "automatic", - }, - }, - }, - "rspackExperiments": { - "import": [ - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - ], - "styledComponents": { - "displayName": true, - "pure": false, - "ssr": false, - "transpileTemplateLiterals": true, - }, - }, - "sourceMaps": true, - }, - }, - ], - }, - { - "mimetype": { - "or": [ - "text/javascript", - "application/javascript", - ], - }, - "use": [ - { - "loader": "builtin:swc-loader", - "options": { - "env": { - "coreJs": "3.32", - "mode": "entry", - "targets": [ - "chrome >= 87", - ], - }, - "isModule": "unknown", - "jsc": { - "externalHelpers": true, - "parser": { - "decorators": true, - "syntax": "typescript", - "tsx": true, - }, - "preserveAllComments": true, - "transform": { - "decoratorMetadata": true, - "legacyDecorator": true, - "react": { - "development": true, - "refresh": true, - "runtime": "automatic", - }, - }, - }, - "rspackExperiments": { - "import": [ - { - "libraryDirectory": "es", - "libraryName": "antd", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "es", - "libraryName": "@arco-design/web-react", - "style": true, - }, - { - "camelToDashComponentName": false, - "libraryDirectory": "react-icon", - "libraryName": "@arco-design/web-react/icon", - }, - ], - "styledComponents": { - "displayName": true, - "pure": false, - "ssr": false, - "transpileTemplateLiterals": true, - }, - }, - "sourceMaps": true, - }, - }, - ], - }, { "test": /\\\\\\.toml\\$/, "type": "javascript/auto", @@ -631,7 +634,7 @@ exports[`plugin-postcssLegacy > should register postcss plugin by browserslist 1 "decoratorMetadata": true, "legacyDecorator": true, "react": { - "development": true, + "development": false, "refresh": true, "runtime": "automatic", }, diff --git a/packages/builder/uni-builder/tests/__snapshots__/styledComponents.test.ts.snap b/packages/builder/uni-builder/tests/__snapshots__/styledComponents.test.ts.snap index a706dab99ea5..20723912492c 100644 --- a/packages/builder/uni-builder/tests/__snapshots__/styledComponents.test.ts.snap +++ b/packages/builder/uni-builder/tests/__snapshots__/styledComponents.test.ts.snap @@ -501,6 +501,8 @@ exports[`plugins/styled-components > should works in webpack swc mode 1`] = ` }, "preserveAllComments": true, "transform": { + "decoratorMetadata": true, + "legacyDecorator": true, "react": { "refresh": true, "runtime": "classic", diff --git a/tests/e2e/builder/cases/decorator/latest/index.test.ts b/tests/e2e/builder/cases/decorator/latest/index.test.ts deleted file mode 100644 index a528e20de505..000000000000 --- a/tests/e2e/builder/cases/decorator/latest/index.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import path from 'path'; -import { expect } from '@modern-js/e2e/playwright'; -import { build, getHrefByEntryName } from '@scripts/shared'; -import { webpackOnlyTest } from '@scripts/helper'; - -webpackOnlyTest('decorator latest', async ({ page }) => { - const builder = await build({ - cwd: __dirname, - entry: { - index: path.resolve(__dirname, './src/index.js'), - }, - runServer: true, - builderConfig: { - output: { - enableLatestDecorators: true, - }, - }, - }); - - await page.goto(getHrefByEntryName('index', builder.port)); - expect(await page.evaluate('window.aaa')).toBe('hello world'); - - // swc... - if (builder.providerType !== 'rspack') { - expect(await page.evaluate('window.bbb')).toContain( - "Cannot assign to read only property 'message' of object", - ); - - expect(await page.evaluate('window.ccc')).toContain( - "Cannot assign to read only property 'message' of object", - ); - } - - builder.close(); -}); diff --git a/tests/e2e/builder/cases/decorator/latest/src/index.js b/tests/e2e/builder/cases/decorator/latest/src/index.js deleted file mode 100644 index 3c002075c6ad..000000000000 --- a/tests/e2e/builder/cases/decorator/latest/src/index.js +++ /dev/null @@ -1,51 +0,0 @@ -// only have one param -function readonly(elementDescriptor) { - elementDescriptor.descriptor.writable = false; - - return elementDescriptor; -} - -function decorator(value) { - return function (elementDescriptor) { - const original = elementDescriptor.descriptor.value; - - elementDescriptor.descriptor.value = function (...args) { - return original.apply(this, args) + value; - }; - - return elementDescriptor; - }; -} - -class TestClass { - @readonly - message = 'hello'; - - @decorator(' world') - targetMethod() { - return this.message; - } - - update() { - try { - this.message = 'aaaa'; - } catch (e) { - // eslint-disable-next-line no-undef - window.bbb = e.message; - } - } -} - -const instance = new TestClass(); - -// eslint-disable-next-line no-undef -window.aaa = instance.targetMethod(); - -instance.update(); - -try { - instance.message = 'bbbb'; -} catch (e) { - // eslint-disable-next-line no-undef - window.ccc = e.message; -} From a79895c6584f0a1aae100124c5f56e686fb1ccef Mon Sep 17 00:00:00 2001 From: "gaoyuan.1226" Date: Wed, 31 Jan 2024 16:35:19 +0800 Subject: [PATCH 3/3] fix: type --- packages/devtools/plugin/src/rpc/index.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/devtools/plugin/src/rpc/index.ts b/packages/devtools/plugin/src/rpc/index.ts index be240cce8e1e..fbe91e62fda5 100644 --- a/packages/devtools/plugin/src/rpc/index.ts +++ b/packages/devtools/plugin/src/rpc/index.ts @@ -13,7 +13,12 @@ import { createBirpc, BirpcOptions } from 'birpc'; import * as flatted from 'flatted'; import createDeferPromise from 'p-defer'; import { RawData } from 'ws'; -import type { RsbuildContext, RsbuildPlugin } from '@modern-js/uni-builder'; +import type { + RsbuildContext, + RsbuildPlugin, + WebpackConfig, + RspackConfig, +} from '@modern-js/uni-builder'; import { CliPluginAPI, InjectedHooks } from '../types'; import { SocketServer } from '../utils/socket'; import { requireModule } from '../utils/module'; @@ -193,7 +198,7 @@ export const setupClientConnection = async ( : api.modifyRspackConfig; const expectBundlerNum = _.castArray(api.context.targets).length; const bundlerConfigs: JsonValue[] = []; - modifyBundlerConfig(config => { + modifyBundlerConfig((config: WebpackConfig | RspackConfig) => { bundlerConfigs.push(config as JsonValue); if (bundlerConfigs.length >= expectBundlerNum) { deferred.bundler.config.resolved.resolve(