-
Notifications
You must be signed in to change notification settings - Fork 10
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
Steve/v3-prepear-react-19 #4593
Conversation
chore(deps): Update cypress packages to ^13.15.0 (next)
…react-7.x chore(deps): Update dependency eslint-plugin-react to v7.37.1 (next)
chore(deps): Update babel monorepo to ^7.25.7 (next)
…-env-10.x chore(deps): Update dependency postcss-preset-env to ^10.0.6 (next)
…dleware-3.x chore(deps): Update dependency http-proxy-middleware to ^3.0.3 (next)
chore(deps): Update dependency express to ^4.21.1 (next)
chore(deps): Update dependency typescript to ^5.6.3 (next)
chore(deps): Update dependency webpack to ^5.95.0 (next)
chore(deps): Update babel monorepo to ^7.25.8 (next)
…-env-10.x chore(deps): Update dependency postcss-preset-env to ^10.0.7 (next)
chore(deps): Update dependency tslib to ^2.8.0 (next)
…y-monorepo chore(deps): Update dependency @testing-library/jest-dom to ^6.6.1 (next)
…y-monorepo chore(deps): Update dependency @testing-library/jest-dom to ^6.6.2 (next)
…extractor-7.x chore(deps): Update dependency @microsoft/api-extractor to ^7.47.11 (next)
chore(deps): Update dependency typescript to ^5.7.2 (next)
chore(deps): Update dependency prettier to ^3.4.1 (next)
chore(deps): Update dependency webpack to ^5.97.1 (next)
chore(deps): Update babel monorepo (next)
chore(deps): Update dependency prettier to ^3.4.2 (next)
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
packages/babel-preset-next/index.jsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the config "@next-core/eslint-config-next" to extend from. Please check that the name of the config is correct. The config "@next-core/eslint-config-next" was referenced from the config file in "/.eslintrc". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. 概述代码变更总览本次代码变更主要涉及依赖管理、测试框架和国际化(i18n)相关的多个文件和包。变更包括移除特定开发依赖、更新测试库导入和调整国际化处理方式。这些修改可能会影响项目的构建、测试和国际化支持。 变更详情
这些变更反映了项目在依赖管理、测试方法和国际化支持方面的持续优化和重构。 Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (4)
packages/test-next/src/transforms/file.js (1)
26-29
: 建议添加类型定义以增强类型安全性为了提供更好的开发体验和类型安全性,建议:
- 为 props 添加 TypeScript 接口定义
- 为 ref 指定具体的类型
示例实现:
interface SvgProps extends React.SVGProps<SVGSVGElement> { // 在此添加自定义属性 } const ${componentName} = React.forwardRef<SVGSVGElement, SvgProps>((props, ref) => { // ... 现有实现 });packages/react-runtime/src/useProvider/useProvider.spec.tsx (1)
35-38
: 建议改进异步测试处理方式当前实现使用了非标准的
global.flushPromises
,建议采用更标准的方式处理异步测试。建议使用以下方式改进:
- await (global as any).flushPromises(); + await Promise.resolve();这样可以:
- 避免使用 any 类型
- 使用更标准的 Promise 处理方式
- 提高代码可维护性
Also applies to: 46-46
packages/yo/src/templates/brick/i18n.ts (1)
1-1
: 导入和使用 i18n 模块的实现看起来不错这种实现方式将翻译功能从 React 组件中解耦出来,使其更加灵活和可重用。
不过建议添加一些注释来说明
getFixedT
的用途和null
参数的含义。import { i18n } from "@next-core/i18n"; +// 创建一个绑定到特定命名空间的翻译函数 +// 第一个参数为 null 表示使用当前语言 export const t = i18n.getFixedT(null, NS);Also applies to: 18-18
packages/yo/src/templates/brick/index.tsx.hbs (1)
6-7
: i18n 初始化和使用的改动合理从 React 特定的 i18n 实现迁移到更通用的实现,这样的改动使代码更加灵活,减少了对 React 特定库的依赖。
建议在初始化之前添加错误处理。
{{#if useI18n}} +try { initializeI18n(NS, locales); +} catch (error) { + console.error("Failed to initialize i18n:", error); +} {{/if}}Also applies to: 12-12
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (9)
package.json
(0 hunks)packages/i18n/package.json
(1 hunks)packages/react-runtime/package.json
(0 hunks)packages/react-runtime/src/useProvider/useProvider.spec.tsx
(5 hunks)packages/react-runtime/src/useProvider/useProviderArgs.spec.ts
(1 hunks)packages/test-next/package.json
(1 hunks)packages/test-next/src/transforms/file.js
(1 hunks)packages/yo/src/templates/brick/i18n.ts
(2 hunks)packages/yo/src/templates/brick/index.tsx.hbs
(1 hunks)
💤 Files with no reviewable changes (2)
- packages/react-runtime/package.json
- package.json
✅ Files skipped from review due to trivial changes (1)
- packages/react-runtime/src/useProvider/useProviderArgs.spec.ts
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build (20.x)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (8)
packages/test-next/src/transforms/file.js (2)
8-11
: 参数命名改进符合最佳实践!使用下划线前缀(
_src
)明确表示该参数未被使用,这种命名约定提高了代码的可读性。
17-30
: 架构改进显著提升了代码质量!
- 使用 ES 模块语法替代 CommonJS,符合现代 JavaScript 最佳实践
- 通过
React.forwardRef
支持 ref 转发,提高了组件的可复用性- 支持了
/*#__PURE__*/
注释,有助于树摇优化packages/test-next/package.json (2)
Line range hint
1-47
: 配置结构合理,批准变更package.json 的整体结构完善,包含了必要的配置项。依赖版本的更新是一个小版本升级,风险相对较小。
38-38
: 验证依赖版本和兼容性建议验证 @testing-library/react ^16.1.0 的以下几点:
- 是否为最新的稳定版本
- 是否与其他测试库(dom ^10.4.0 和 jest-dom ^6.5.0)完全兼容
- 是否存在已知的安全问题
运行以下脚本以验证版本和兼容性:
✅ Verification successful
依赖版本验证完成,确认安全可用
经过验证:
- 当前使用的 @testing-library/react ^16.1.0 是最新稳定版本
- 未发现任何安全漏洞
- 与其他测试库版本兼容性正常
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 检查 @testing-library/react 的最新版本和安全公告 # 检查 npm 上的最新版本 curl -s https://registry.npmjs.org/@testing-library/react/latest | jq '.version' # 检查安全公告 gh api graphql -f query=' { securityVulnerabilities(first: 5, ecosystem: NPM, package: "@testing-library/react") { nodes { advisory { summary severity publishedAt } vulnerableVersionRange firstPatchedVersion { identifier } } } }' # 检查与其他测试库的兼容性 rg -A 5 '@testing-library/(react|dom|jest-dom)' -g 'package.json'Length of output: 1047
packages/react-runtime/src/useProvider/useProvider.spec.tsx (3)
1-1
: 导入语句的更新符合最佳实践从 @testing-library/react 导入 act 是一个很好的改进,这符合 React 18 及以后版本的测试最佳实践。
Line range hint
147-175
: Suspense 测试实现得当React Suspense 的测试实现非常规范,很好地覆盖了加载状态和渲染状态的验证。
Line range hint
1-175
: 建议验证类型安全性建议确保所有的类型定义都是明确的,特别是在使用
any
的地方。运行以下命令来验证类型安全性:
✅ Verification successful
测试文件中的
any
类型使用是合理的
- 所有
any
类型的使用都限定在测试场景中,包括测试工具函数(flushPromises
)、测试组件和错误测试配置- 这些用法符合测试代码的常见模式,不会影响生产环境的类型安全性
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 检查文件中的 any 使用情况 rg "any[^a-zA-Z]" packages/react-runtime/src/useProvider/useProvider.spec.tsx # 检查是否有未使用的类型导入 ast-grep --pattern 'import { $_ } from "@testing-library/react"'Length of output: 878
packages/i18n/package.json (1)
46-59
: 依赖关系的调整非常合理将
react-i18next
移动到devDependencies
和可选的peerDependencies
中是一个很好的改进:
- 减少了基础包的依赖
- 使得非 React 项目可以使用这个包
- 保持了与 React 项目的兼容性
建议验证所有依赖版本的兼容性。
✅ Verification successful
依赖版本兼容性验证通过
所有依赖版本都符合要求:
- i18next ^22.5.1 满足 react-i18next 要求的最低版本 (>= 19.0.0)
- react-i18next 对 React 的版本要求 (>= 16.8.0) 已合理声明为可选的 peer dependency
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 检查依赖版本的兼容性 npm info react-i18next@^12.3.1 peerDependencies npm info i18next@^22.5.1 peerDependenciesLength of output: 142
Script:
#!/bin/bash # Check i18next version in package.json cat packages/i18n/package.json | jq -r '.dependencies.i18next // empty'Length of output: 81
next-core
|
Project |
next-core
|
Branch Review |
steve/v3-prepear-react-19
|
Run status |
|
Run duration | 00m 27s |
Commit |
|
Committer | Shenwei Wang |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
16
|
View all changes introduced in this branch ↗︎ |
chore(deps): Update babel monorepo to ^7.26.5 (next)
…-env-10.x chore(deps): Update dependency postcss-preset-env to ^10.1.3 (next)
chore(deps): Update dependency core-js to ^3.40.0 (next)
next-core
|
Project |
next-core
|
Branch Review |
next
|
Run status |
|
Run duration | 00m 21s |
Commit |
|
Committer | Shenwei Wang |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
15
|
View all changes introduced in this branch ↗︎ |
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/build-next-bricks/bin/build-next-bricks.js (2)
86-86
: 增强了构建过程的可见性在 watch 模式下添加了 stats 输出,这有助于开发人员更好地了解构建状态和性能指标。
建议考虑使用更详细的 stats 配置来优化输出信息:
-console.log(stats.toString()); +console.log(stats.toString({ + colors: true, + modules: false, + children: false, + chunks: false, + chunkModules: false +}));
97-97
: 优化了构建输出信息在常规构建模式下添加了 stats 输出,这对于持续集成环境下的构建监控很有帮助。
同样建议使用更精细的 stats 配置来提供更清晰的输出:
-console.log(stats.toString()); +console.log(stats.toString({ + colors: true, + modules: false, + children: false, + chunks: false, + chunkModules: false +}));
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (21)
bricks/e2e/package.json
(1 hunks)docker-compose.yml
(1 hunks)package.json
(2 hunks)packages/babel-preset-next/index.js
(2 hunks)packages/babel-preset-next/package.json
(1 hunks)packages/brick-container/package.json
(2 hunks)packages/brick-playground/package.json
(2 hunks)packages/build-next-bricks/bin/build-next-bricks.js
(2 hunks)packages/build-next-bricks/package.json
(2 hunks)packages/build-next-bricks/src/build.js
(4 hunks)packages/build-next-libs/package.json
(1 hunks)packages/cook/package.json
(1 hunks)packages/create-api-sdk/package.json
(1 hunks)packages/doc-helpers/package.json
(1 hunks)packages/eslint-config-next/package.json
(1 hunks)packages/i18n/package.json
(1 hunks)packages/preview/package.json
(1 hunks)packages/runtime/package.json
(1 hunks)packages/test-next/package.json
(1 hunks)packages/webpack/package.json
(1 hunks)shared/common-bricks/common-bricks.json
(0 hunks)
💤 Files with no reviewable changes (1)
- shared/common-bricks/common-bricks.json
✅ Files skipped from review due to trivial changes (3)
- packages/preview/package.json
- packages/build-next-libs/package.json
- docker-compose.yml
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/test-next/package.json
- packages/i18n/package.json
- package.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build (20.x)
🔇 Additional comments (20)
packages/webpack/package.json (1)
22-22
: 请验证 webpack 版本更新的兼容性webpack 版本从 ^5.94.0 更新到 ^5.97.1,需要确认此版本更新是否包含重大变更。
运行以下脚本检查 webpack 5.94.0 到 5.97.1 之间的变更日志:
Also applies to: 25-25
✅ Verification successful
webpack 版本更新验证完成,发现以下需要注意的变更
此次版本更新(5.94.0 -> 5.97.1)主要包含bug修复和功能增强,但有几处值得注意的变更:
- 在 v5.97.0 中移除了
output.cssHeadDataCompression
配置选项- v5.96.0 中修改了
css/auto
的处理逻辑,现在会根据文件名决定是作为纯CSS还是CSS模块处理- v5.95.0 引入了新的
optimization.avoidEntryIife
选项(生产环境默认为 true)建议:
- 如果项目使用了CSS/CSS模块功能,请进行充分测试
- 检查是否使用了已移除的
cssHeadDataCompression
选项🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 描述:检查 webpack 5.94.0 到 5.97.1 之间的变更日志 # 获取 webpack 仓库的发布说明 gh api \ -H "Accept: application/vnd.github+json" \ repos/webpack/webpack/releases \ --jq 'map(select(.tag_name | startswith("v5.") and . >= "v5.94.0" and . <= "v5.97.1")) | .[] | {tag: .tag_name, body: .body}'Length of output: 5569
packages/eslint-config-next/package.json (1)
16-16
: 验证 eslint-plugin-react 版本更新的兼容性建议验证 eslint-plugin-react 7.37.2 版本的变更是否与 React 19 的准备工作相符,并确认是否存在破坏性更新。
运行以下脚本以检查版本兼容性和更新日志:
✅ Verification successful
eslint-plugin-react 7.37.2 版本更新与 React 19 兼容
此版本更新是安全的,并且支持 React 19 的准备工作。更新内容包括:
- 支持 React 19 中的新属性
- 修复了类型声明和组件验证相关的问题
- 与其他依赖版本保持兼容
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 检查 eslint-plugin-react 7.37.2 的更新日志和兼容性 # 获取 package.json 中的其他依赖版本信息 echo "当前依赖版本:" cat packages/eslint-config-next/package.json | jq '.peerDependencies' # 检查 eslint-plugin-react 的更新日志 gh api repos/jsx-eslint/eslint-plugin-react/releases | jq -r '.[] | select(.tag_name | contains("v7.37")) | {tag_name: .tag_name, body: .body}'Length of output: 106975
bricks/e2e/package.json (1)
23-23
: 请验证构建输入的变更影响从构建输入中移除
{workspaceRoot}/shared/common-bricks/common-bricks.json
可能会影响构建过程。建议确认以下几点:
- 共享资源是否已迁移到新的位置
- 构建过程是否仍能正常进行
- 是否需要更新相关的文档
运行以下脚本来验证是否有其他文件仍在引用已移除的 common-bricks.json:
✅ Verification successful
构建输入变更已得到验证
经过分析,从
bricks/e2e/package.json
的构建输入中移除{workspaceRoot}/shared/common-bricks/common-bricks.json
是安全的,原因如下:
- 相关配置已迁移至
@next-shared/common-bricks
包中- 其他依赖该文件的代码已更新为使用包依赖方式访问
这个变更符合现代依赖管理最佳实践,提供了更好的版本控制和封装性。
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 搜索可能引用 common-bricks.json 的文件 rg -l "common-bricks\.json" # 检查是否有其他构建配置文件使用类似的模式 fd -e json -x grep -l "workspaceRoot.*common-bricks" {} \;Length of output: 161
Script:
#!/bin/bash # 检查 common-bricks.json 的引用上下文 echo "=== plopfile.js 内容 ===" rg -A 5 -B 5 "common-bricks\.json" packages/yo/src/plopfile.js echo -e "\n=== build.js 内容 ===" rg -A 5 -B 5 "common-bricks\.json" packages/build-next-bricks/src/build.js # 检查是否有相关的配置迁移 echo -e "\n=== 查找可能的新配置文件 ===" fd -e json -x grep -l "common-bricks" {} \;Length of output: 2680
packages/runtime/package.json (1)
64-64
: 检查 api-extractor 版本更新的兼容性从 ^7.47.9 升级到 ^7.47.11 是一个小版本更新。由于这是开发依赖项,不会影响运行时行为,主要用于生成 API 文档。
运行以下脚本以验证版本更新的影响:
✅ Verification successful
api-extractor 版本更新验证完成
经验证,此次从 ^7.47.9 到 ^7.47.11 的小版本更新仅影响 runtime 包的开发环境,不会对运行时行为造成影响。api-extractor 的使用范围已确认仅限于 API 文档生成。
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 描述:检查 api-extractor 的更新日志,确认是否存在重大变更 # 获取 api-extractor 的发布说明 gh api repos/microsoft/api-extractor/releases \ --jq '.[] | select(.tag_name | startswith("v7.47.")) | {tag: .tag_name, body: .body}'Length of output: 279
Script:
#!/bin/bash # 查找 api-extractor 配置文件和使用情况 # 搜索 api-extractor.json 配置文件 echo "=== API Extractor 配置文件 ===" fd "api-extractor.json" # 搜索包含 api-extractor 的 package.json 脚本 echo -e "\n=== 在 package.json 中的使用 ===" fd "package.json" --exec grep -l "api-extractor" {} # 搜索可能的自定义配置 echo -e "\n=== 相关代码引用 ===" rg --type-add 'config:*.{json,js,ts}' -t config "api-extractor" -lLength of output: 493
packages/brick-playground/package.json (2)
28-29
: 请验证 compression 和 express 包的更新是否包含重要变更建议在部署前验证这些依赖项的更新是否会影响现有功能。
运行以下脚本检查更新日志中的重要变更:
✅ Verification successful
express 4.21.1 包含重要安全更新,建议及时升级
express 4.21.1 修复了安全漏洞 CVE-2024-47764。compression 1.7.5 仅包含维护性更新,无重大变更。
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 检查 compression 和 express 包的更新日志 # 获取 compression 包的发布说明 echo "检查 compression 包的更新..." gh api repos/expressjs/compression/releases | jq '.[] | select(.tag_name=="1.7.5") | .body' # 获取 express 包的发布说明 echo "检查 express 包的更新..." gh api repos/expressjs/express/releases | jq '.[] | select(.tag_name=="4.21.1") | .body'Length of output: 2084
38-38
: 请验证 html-webpack-plugin 的更新建议确认此更新与当前的 webpack 配置兼容。
运行以下脚本检查更新内容:
✅ Verification successful
html-webpack-plugin 5.6.3 更新验证完成
经检查,此版本与项目中使用的 webpack 5.x 完全兼容,配置使用简单标准,更新安全。
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 检查 html-webpack-plugin 包的更新日志 echo "检查 html-webpack-plugin 包的更新..." gh api repos/jantimon/html-webpack-plugin/releases | jq '.[] | select(.tag_name=="5.6.3") | .body' # 检查项目中的 webpack 配置 echo "检查 webpack 配置..." fd -e js -e ts webpack.configLength of output: 246
Script:
#!/bin/bash # 搜索 webpack 相关配置文件 echo "搜索 webpack 配置文件..." fd -t f -e js -e ts -e cjs -e mjs . | rg -i 'webpack|build' # 检查 webpack 版本 echo "检查 webpack 版本..." cat packages/brick-playground/package.json | jq '.dependencies.webpack, .devDependencies.webpack' # 搜索 html-webpack-plugin 的使用 echo "搜索 html-webpack-plugin 使用..." rg -l "html-webpack-plugin" --type js --type tsLength of output: 1811
Script:
#!/bin/bash # 检查构建配置文件中的 html-webpack-plugin 使用 echo "检查构建配置文件..." cat packages/brick-playground/build.config.js # 检查其他包中的 webpack 版本 echo "检查 webpack 版本..." find . -name package.json -exec sh -c 'echo "=== $1 ==="; cat "$1" | jq -r ".dependencies.webpack, .devDependencies.webpack"' sh {} \; # 检查 html-webpack-plugin 的具体配置 echo "检查插件配置..." rg -A 5 "html-webpack-plugin" --type jsLength of output: 44756
packages/babel-preset-next/index.js (2)
29-29
: 检查 CoreJS 版本更新的兼容性CoreJS 版本从 3.38 更新到 3.40,建议验证此更新是否与项目的其他依赖兼容。
✅ Verification successful
CoreJS 版本更新验证完成
经过验证,从 CoreJS 3.38 升级到 3.40 是一个次要版本更新,遵循语义化版本控制规范,向后兼容且安全。未发现项目中使用任何 CoreJS 3.40 特有的新特性,此更新可以安全进行。
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 检查项目中是否存在使用了仅在 CoreJS 3.40 版本中支持的新特性 rg -l 'Array\.fromAsync|Promise\.withResolvers|Array\.groupBy|Array\.groupByToMap'Length of output: 84
Script:
#!/bin/bash # Search for CoreJS related imports and configurations echo "=== Searching for CoreJS imports and usages ===" rg -l "require\(['\"](core-js|@babel/runtime-corejs3)" echo -e "\n=== Checking package.json files for CoreJS dependencies ===" fd package.json --exec cat {} | jq -c 'select(.dependencies["core-js"] or .devDependencies["core-js"] or .dependencies["@babel/runtime-corejs3"] or .devDependencies["@babel/runtime-corejs3"])'Length of output: 555
52-52
: 确认 Babel Runtime 版本升级的影响@babel/runtime 版本从 7.25.6 更新到 7.26.0,这是一个次要版本更新。
✅ Verification successful
@babel/runtime 版本更新验证完成
经过验证,从 7.25.6 升级到 7.26.0 的更新是安全的:
- 这是一个次要版本更新
- 更新是整个 Babel 生态系统协调更新的一部分
- 项目中主要使用标准的运行时 helpers
- 版本已在 resolutions 中正确锁定,确保了依赖一致性
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 检查是否有使用了 @babel/runtime 7.26.0 中新增或修改的功能 rg -l '@babel/runtime.*7\.26\.0'Length of output: 97
Script:
#!/bin/bash # Check actual usage of @babel/runtime echo "=== Searching for @babel/runtime imports ===" rg "@babel/runtime" --type js -A 2 echo -e "\n=== Checking package.json files for @babel/runtime dependencies ===" fd package.json --exec grep -l "@babel/runtime" {} \; --exec echo "=== {}" \; --exec cat {}Length of output: 4324
packages/build-next-bricks/src/build.js (4)
10-11
: 优化了公共构件配置的导入方式使用 JSON 模块导入替代了文件系统读取,这样的改进更加清晰和高效。
Line range hint
79-121
: 改进了公共构件冲突检测逻辑新的实现更好地处理了废弃构件的情况,并提供了更清晰的错误信息。
255-255
: 更新了错误消息中的路径引用错误消息现在正确引用了 @next-shared/common-bricks/common-bricks.json 的路径。
200-214
: 优化了共享包配置逻辑改进了版本要求的处理方式,特别是对于单例包的处理。建议验证这些更改对构建输出的影响。
✅ Verification successful
共享包配置逻辑的优化验证完成
经过验证,代码改动符合以下要点:
- 与现有类型定义和运行时插件实现保持一致
- 对 react-dom 的特殊处理遵循模块联邦最佳实践
- 单例包的处理逻辑完善且安全
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 检查是否有其他地方引用了这些共享包配置 rg -l 'sharedSingletonPackages|moduleFederationShared'Length of output: 242
Script:
#!/bin/bash # Check implementation details echo "=== RuntimePlugin.js shared package handling ===" rg -A 5 "sharedSingletonPackages|moduleFederationShared" "packages/webpack/src/RuntimePlugin.js" echo -e "\n=== build.config.js configuration ===" cat "packages/brick-playground/build.config.js" echo -e "\n=== Type definitions ===" cat "packages/webpack/index.d.ts"Length of output: 6357
packages/babel-preset-next/package.json (1)
14-19
: Babel 相关依赖进行了版本更新多个 Babel 相关依赖包进行了次要版本更新,建议:
- 确保所有更新的版本之间相互兼容
- 验证这些更新不会影响现有的构建输出
✅ Verification successful
Babel 依赖版本更新验证完成
经过验证,所有 Babel 相关依赖的版本更新是安全的:
- 所有版本都使用了兼容性版本范围(^)
- @babel/runtime 在项目中保持版本一致(^7.26.0)
- 版本差异(7.25.9 与 7.26.x)在次要版本范围内,保持向后兼容
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 检查项目中是否存在使用了这些 Babel 插件的特定版本 rg -l '@babel/(?:plugin|preset|runtime).*7\.2[56]'Length of output: 115
Script:
#!/bin/bash # Check the actual Babel dependency versions in package.json files echo "=== Root package.json ===" rg '"@babel/(?:plugin|preset|runtime).*"' package.json echo -e "\n=== babel-preset-next/package.json ===" rg '"@babel/(?:plugin|preset|runtime).*"' packages/babel-preset-next/package.jsonLength of output: 578
packages/doc-helpers/package.json (1)
33-33
: 更新了 Prettier 版本Prettier 版本从 3.3.3 更新到 3.4.2,建议验证此更新是否会影响现有的代码格式化规则。
✅ Verification successful
Prettier 版本更新验证完成
经验证,所有包都统一使用了 Prettier ^3.4.2 版本,版本一致性得到了良好维护。此更新不会导致项目内的格式化不一致问题。
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # 检查项目中的 Prettier 配置文件 fd -t f -e json -e yaml -e js '\.prettier'Length of output: 44
Script:
#!/bin/bash # Check for prettier configs in package.json files echo "=== Prettier configs in package.json files ===" rg '"prettier":\s*{' -A 5 -g 'package.json' echo -e "\n=== Prettier-related scripts ===" rg '"scripts".*format' -A 5 -g 'package.json' echo -e "\n=== Prettier dependencies in other packages ===" rg '"prettier":\s*".*"' -g 'package.json'Length of output: 747
packages/create-api-sdk/package.json (1)
52-54
: 依赖版本更新提醒prettier 升级到 3.4.2 可能会带来代码格式化的变化,建议在合并前进行以下验证:
- 运行格式化命令检查是否有重大格式变化
- 确认团队所有成员更新到相同版本以保持一致性
packages/build-next-bricks/package.json (2)
61-62
: 新增对 @next-shared/common-bricks 的对等依赖这表明该包现在依赖于共享组件库。请确保:
- 所有使用此包的项目都已安装 @next-shared/common-bricks
- 文档中已更新相关依赖要求
- CI/CD 流程已适配此变更
37-38
: 构建工具链版本更新多个构建相关依赖进行了版本升级,包括 Babel、webpack、postcss 等。建议:
- 在开发环境完整测试构建流程
- 检查构建产物是否有异常
- 验证构建性能是否受影响
Also applies to: 49-56
packages/cook/package.json (1)
52-52
: Babel 解析器版本更新@babel/parser 升级到 7.26.5 版本,这是整个项目 Babel 工具链升级的一部分。建议:
- 确保所有相关的 Babel 包版本保持一致
- 验证现有的语法解析是否正常工作
packages/brick-container/package.json (2)
42-43
: 服务器依赖更新express 和 compression 包版本更新,虽然是小版本更新,但建议:
- 验证服务器启动和运行状态
- 检查压缩功能是否正常
- 进行负载测试确保性能稳定
68-69
: 核心运行时依赖更新core-js 升级到 3.40.0 版本,可能影响 polyfill 行为。建议:
- 在不同浏览器中测试兼容性
- 检查打包后的文件大小变化
- 验证关键功能在旧版浏览器中的表现
依赖检查
组件之间的依赖声明,是微服务组件架构下的重要信息,请确保其正确性。
请勾选以下两组选项其中之一:
或者:
提交信息检查
Git 提交信息将决定包的版本发布及自动生成的 CHANGELOG,请检查工作内容与提交信息是否相符,并在以下每组选项中都依次确认。
破坏性变更:
feat
作为提交类型。BREAKING CHANGE: 你的变更说明
。新特性:
feat
作为提交类型。问题修复:
fix
作为提交类型。杂项工作:
即所有对下游使用者无任何影响、且没有必要显示在 CHANGELOG 中的改动,例如修改注释、测试用例、开发文档等:
chore
,docs
,test
等作为提交类型。Summary by CodeRabbit
依赖项变更
@next-core/brick-container
、@next-core/brick-playground
和@next-core/test-next
开发依赖react-i18next
依赖的管理方式@testing-library/react
和@testing-library/react-hooks
测试依赖@babel/core
、@babel/types
、cypress
、eslint-plugin-react
和prettier
测试工具
@testing-library/react
的版本至^16.1.0
国际化
构建过程
common-bricks.json