Skip to content

chore: upgrade father plugin#23

Merged
zombieJ merged 1 commit into
react-component:masterfrom
QDyanbing:avoid-deep-imports
May 18, 2026
Merged

chore: upgrade father plugin#23
zombieJ merged 1 commit into
react-component:masterfrom
QDyanbing:avoid-deep-imports

Conversation

@QDyanbing
Copy link
Copy Markdown

@QDyanbing QDyanbing commented May 18, 2026

调整内容

  • 升级 @rc-component/father-plugin^2.2.0,接入 father-plugin 统一的构建期检查。
  • 将发布流程从 np 切换为 @rc-component/np / rc-np,保持 rc 包发布方式一致。

验证

  • npm run compile
  • npm run lint
  • npm test -- --runInBand

Summary by CodeRabbit

发布说明

  • Chores
    • 升级了构建工具链的依赖版本
    • 调整了发布前脚本配置以优化构建流程
    • 更新了开发工具版本以提升开发体验

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

概览

更新 package.json 中的 npm 发布脚本和构建工具依赖版本,将发布工具从 np 迁移到 rc-np,并升级相应的 @rc-component 工具包版本。

变更

构建工具链与发布配置更新

Layer / 文件(s) 概述
发布脚本配置更新
package.json
prepublishOnly 脚本调整为使用 rc-np 工具,保留编译前置步骤 npm run compile
构建工具依赖升级
package.json
@rc-component/father-plugin 升级至 ^2.2.0@rc-component/np 调整至 ^1.0.3,以适配新的发布脚本配置。

预计审核工作量

🎯 2 (简单) | ⏱️ ~8 分钟

庆祝诗

🐰 构建工具链焕新颜,

从旧 nprc-np 展新篇,

依赖升级心欢畅,

发布流程更顺畅,

兔子竖起拇指笑灿烂!✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题'chore: upgrade father plugin'准确概括了主要变更——升级@rc-component/father-plugin到^2.2.0,虽未提及发布流程调整,但清晰指出了核心变更。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@QDyanbing QDyanbing marked this pull request as ready for review May 18, 2026 11:04
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the project's publishing workflow by replacing the np package with @rc-component/np and upgrading @rc-component/father-plugin. A critical issue was identified in the prepublishOnly script where the removal of the --yolo --no-publish flags could cause a recursive publishing loop when using the new rc-np command.

Comment thread package.json
"lint": "eslint src --ext .tsx,.ts,.jsx,.js",
"now-build": "npm run docs:build",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"prepublishOnly": "npm run compile && rc-np",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The rc-np command is a publishing tool. Removing the --yolo --no-publish flags in the prepublishOnly script will cause rc-np to attempt a full publish flow whenever npm publish is called, which leads to a recursive loop. These flags should be retained to ensure rc-np only performs checks and preparation without triggering a nested publish.

Suggested change
"prepublishOnly": "npm run compile && rc-np",
"prepublishOnly": "npm run compile && rc-np --yolo --no-publish",

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
package.json (1)

52-53: ⚡ Quick win

确认 father-plugin 2.2.0 版本与 father ^4.4.0 兼容。

@rc-component/father-plugin@2.2.0 的 peerDependencies 要求 father: '^4.0.0',而当前项目依赖的 father 版本为 ^4.4.0,完全满足兼容性要求。.fatherrc.js 中的插件配置已采用标准的 plugins 数组形式,无需调整。虽然这是一个主版本升级,建议在测试中验证 build 行为保持一致,但无明确的破坏性变更文档,可以安心升级。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 52 - 53, Confirm the compatibility of
`@rc-component/father-plugin` and father by verifying package.json dependency
entries: ensure "`@rc-component/father-plugin`": "^2.2.0" remains and that the
project's "father": "^4.4.0" satisfies the plugin's peerDependency (father:
'^4.0.0'); also verify .fatherrc.js uses the standard plugins array (no change
needed) and run the project's build/test pipeline to validate there are no
regressions after upgrading to `@rc-component/father-plugin`@2.2.0.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@package.json`:
- Around line 52-53: Confirm the compatibility of `@rc-component/father-plugin`
and father by verifying package.json dependency entries: ensure
"`@rc-component/father-plugin`": "^2.2.0" remains and that the project's "father":
"^4.4.0" satisfies the plugin's peerDependency (father: '^4.0.0'); also verify
.fatherrc.js uses the standard plugins array (no change needed) and run the
project's build/test pipeline to validate there are no regressions after
upgrading to `@rc-component/father-plugin`@2.2.0.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fc8329cf-852b-47df-8cfb-4ca5199868f1

📥 Commits

Reviewing files that changed from the base of the PR and between b2b3217 and c122fad.

📒 Files selected for processing (1)
  • package.json

@zombieJ zombieJ merged commit ed70038 into react-component:master May 18, 2026
4 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.41%. Comparing base (b2b3217) to head (c122fad).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #23   +/-   ##
=======================================
  Coverage   82.41%   82.41%           
=======================================
  Files          25       25           
  Lines         654      654           
  Branches      234      234           
=======================================
  Hits          539      539           
  Misses        114      114           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants