chore: upgrade father plugin#23
Conversation
概览更新 变更构建工具链与发布配置更新
预计审核工作量🎯 2 (简单) | ⏱️ ~8 分钟 庆祝诗
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.
| "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", |
There was a problem hiding this comment.
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.
| "prepublishOnly": "npm run compile && rc-np", | |
| "prepublishOnly": "npm run compile && rc-np --yolo --no-publish", |
There was a problem hiding this comment.
🧹 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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
调整内容
@rc-component/father-plugin到^2.2.0,接入 father-plugin 统一的构建期检查。np切换为@rc-component/np/rc-np,保持 rc 包发布方式一致。验证
npm run compilenpm run lintnpm test -- --runInBandSummary by CodeRabbit
发布说明