From 79bc57b90cc1f8965060eeece2f98a003c739068 Mon Sep 17 00:00:00 2001 From: 10Derozan Date: Tue, 19 Sep 2023 18:49:05 +0800 Subject: [PATCH] chore: adjust some content --- .../docs/en/api/config/build-config.mdx | 4 +- .../en/guide/advance/in-depth-about-build.md | 2 +- .../docs/zh/api/config/build-config.mdx | 2 +- .../zh/guide/advance/in-depth-about-build.md | 2 +- .../module/plugin-module-babel/package.json | 2 +- .../plugin-module-polyfill/package.json | 6 +-- pnpm-lock.yaml | 50 +++++++------------ 7 files changed, 26 insertions(+), 42 deletions(-) diff --git a/packages/document/module-doc/docs/en/api/config/build-config.mdx b/packages/document/module-doc/docs/en/api/config/build-config.mdx index e05c1c51fc27..63ad54aae597 100644 --- a/packages/document/module-doc/docs/en/api/config/build-config.mdx +++ b/packages/document/module-doc/docs/en/api/config/build-config.mdx @@ -1245,9 +1245,9 @@ This optimization is implemented using [babel-plugin-lodash](https://www.npmjs.c With this configuration, the code will be converted using SWC. - **Type**: `boolean` -- **Default**: `true` +- **Default**: `false` -When you enable this, Module Tools will automatically redirects the code references of `lodash` to sub-paths. +When you enable this, Modern.js Module will automatically redirects the code references of `lodash` to sub-paths. For example: diff --git a/packages/document/module-doc/docs/en/guide/advance/in-depth-about-build.md b/packages/document/module-doc/docs/en/guide/advance/in-depth-about-build.md index 28cec05aa478..1cd9cf9fd0b4 100644 --- a/packages/document/module-doc/docs/en/guide/advance/in-depth-about-build.md +++ b/packages/document/module-doc/docs/en/guide/advance/in-depth-about-build.md @@ -65,7 +65,7 @@ export default defineConfig({ ## use swc -In some scenarios, Esbuild is not enough to meet our needs, then we will use SWC to do the code transformation, mainly in the following scenarios. +In some scenarios, esbuild is not enough to meet our needs, then we will use swc to do the code transformation, mainly in the following scenarios. - [transformImport](/api/config/build-config#transformimport) - [transformLodash](/api/config/build-config#transformlodash) diff --git a/packages/document/module-doc/docs/zh/api/config/build-config.mdx b/packages/document/module-doc/docs/zh/api/config/build-config.mdx index e8b49a2f78f8..c304c0711b32 100644 --- a/packages/document/module-doc/docs/zh/api/config/build-config.mdx +++ b/packages/document/module-doc/docs/zh/api/config/build-config.mdx @@ -1245,7 +1245,7 @@ export default defineConfig({ - 类型:`boolean` - 默认值:`false` -当开启此选项时,Module Tools 会自动将 lodash 的代码引用指向子路径。 +当开启此选项时,Modern.js Module 会自动将 lodash 的代码引用指向子路径。 比如: diff --git a/packages/document/module-doc/docs/zh/guide/advance/in-depth-about-build.md b/packages/document/module-doc/docs/zh/guide/advance/in-depth-about-build.md index d8598d48558c..4020501dd9a0 100644 --- a/packages/document/module-doc/docs/zh/guide/advance/in-depth-about-build.md +++ b/packages/document/module-doc/docs/zh/guide/advance/in-depth-about-build.md @@ -65,7 +65,7 @@ export default defineConfig({ ## 使用 swc -在部分场景下,Esbuild 不足以满足我们的需求,此时我们会使用 SWC 来做代码转换,主要有以下几个场景: +在部分场景下,esbuild 不足以满足我们的需求,此时我们会使用 swc 来做代码转换,主要有以下几个场景: - [transformImport](/api/config/build-config#transformimport) - [transformLodash](/api/config/build-config#transformlodash) diff --git a/packages/module/plugin-module-babel/package.json b/packages/module/plugin-module-babel/package.json index 61ed49a5c8fd..e4f3314ff55a 100644 --- a/packages/module/plugin-module-babel/package.json +++ b/packages/module/plugin-module-babel/package.json @@ -26,7 +26,7 @@ "test": "jest --passWithNoTests" }, "dependencies": { - "@babel/core": "^7.21.8", + "@babel/core": "^7.22.5", "@swc/helpers": "0.5.1" }, "devDependencies": { diff --git a/packages/module/plugin-module-polyfill/package.json b/packages/module/plugin-module-polyfill/package.json index c8c8087ca072..f2b58c78c3a6 100644 --- a/packages/module/plugin-module-polyfill/package.json +++ b/packages/module/plugin-module-polyfill/package.json @@ -26,9 +26,9 @@ "test": "jest --passWithNoTests" }, "dependencies": { - "@babel/core": "^7.21.8", - "@babel/plugin-syntax-jsx": "7.21.4", - "@babel/plugin-syntax-typescript": "7.21.4", + "@babel/core": "^7.22.5", + "@babel/plugin-syntax-jsx": "7.22.5", + "@babel/plugin-syntax-typescript": "7.22.5", "@modern-js/plugin-module-babel": "workspace:*", "babel-plugin-polyfill-corejs3": "0.5.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41ac5bd1b9a3..d2ae36d374c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3131,7 +3131,7 @@ importers: packages/module/plugin-module-babel: dependencies: '@babel/core': - specifier: ^7.21.8 + specifier: ^7.22.5 version: 7.22.15 '@swc/helpers': specifier: 0.5.1 @@ -3315,14 +3315,14 @@ importers: packages/module/plugin-module-polyfill: dependencies: '@babel/core': - specifier: ^7.21.8 + specifier: ^7.22.5 version: 7.22.15 '@babel/plugin-syntax-jsx': - specifier: 7.21.4 - version: 7.21.4(@babel/core@7.22.15) + specifier: 7.22.5 + version: 7.22.5(@babel/core@7.22.15) '@babel/plugin-syntax-typescript': - specifier: 7.21.4 - version: 7.21.4(@babel/core@7.22.15) + specifier: 7.22.5 + version: 7.22.5(@babel/core@7.22.15) '@modern-js/plugin-module-babel': specifier: workspace:* version: link:../plugin-module-babel @@ -7328,6 +7328,8 @@ importers: specifier: ^4 version: 4.17.21 + tests/integration/module/fixtures/build/tsconfig: {} + tests/integration/module/fixtures/build/umdGlobals: {} tests/integration/module/fixtures/build/umdModuleName: {} @@ -9238,15 +9240,6 @@ packages: '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-jsx@7.21.4(@babel/core@7.22.15): - resolution: {integrity: sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.15 - '@babel/helper-plugin-utils': 7.22.5 - /@babel/plugin-syntax-jsx@7.22.5(@babel/core@7.22.15): resolution: {integrity: sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==} engines: {node: '>=6.9.0'} @@ -9351,15 +9344,6 @@ packages: '@babel/core': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 - /@babel/plugin-syntax-typescript@7.21.4(@babel/core@7.22.15): - resolution: {integrity: sha512-xz0D39NvhQn4t4RNsHmDnnsaQizIlUkdtYvLs8La1BlfjQ6JEwxkJGeqJMW2tAXx+q6H+WFuUTXNdYVpEya0YA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.15 - '@babel/helper-plugin-utils': 7.22.5 - /@babel/plugin-syntax-typescript@7.22.5(@babel/core@7.22.15): resolution: {integrity: sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==} engines: {node: '>=6.9.0'} @@ -17414,7 +17398,7 @@ packages: dependencies: '@babel/core': 7.22.15 '@babel/helper-module-imports': 7.22.15 - '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.15) + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.15) '@vue/babel-helper-vue-jsx-merge-props': 1.4.0 html-tags: 2.0.0 lodash.kebabcase: 4.1.1 @@ -17447,7 +17431,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.22.15 - '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.15) + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.15) dev: false /@vue/babel-sugar-composition-api-render-instance@1.4.0(@babel/core@7.22.15): @@ -17456,7 +17440,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.22.15 - '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.15) + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.15) dev: false /@vue/babel-sugar-functional-vue@1.4.0(@babel/core@7.22.15): @@ -17465,7 +17449,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.22.15 - '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.15) + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.15) dev: false /@vue/babel-sugar-inject-h@1.4.0(@babel/core@7.22.15): @@ -17474,7 +17458,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.22.15 - '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.15) + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.15) dev: false /@vue/babel-sugar-v-model@1.4.0(@babel/core@7.22.15): @@ -17483,7 +17467,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.22.15 - '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.15) + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.15) '@vue/babel-helper-vue-jsx-merge-props': 1.4.0 '@vue/babel-plugin-transform-vue-jsx': 1.4.0(@babel/core@7.22.15) camelcase: 5.3.1 @@ -17497,7 +17481,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.22.15 - '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.15) + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.15) '@vue/babel-plugin-transform-vue-jsx': 1.4.0(@babel/core@7.22.15) camelcase: 5.3.1 dev: false @@ -25618,8 +25602,8 @@ packages: dependencies: '@babel/core': 7.22.15 '@babel/generator': 7.22.15 - '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.15) - '@babel/plugin-syntax-typescript': 7.21.4(@babel/core@7.22.15) + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.15) + '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.15) '@babel/traverse': 7.22.15(supports-color@5.5.0) '@babel/types': 7.22.15 '@jest/expect-utils': 29.5.0