-
Notifications
You must be signed in to change notification settings - Fork 267
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
chore: update alias #2908
chore: update alias #2908
Conversation
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the 概述演练这个拉取请求主要涉及包名称、版本和配置的重大变更。主要变化包括将包名从 变更
可能相关的 PR
建议标签
建议审阅者
诗歌
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 (1)
vite.config.ts (1)
4-4
: import 顺序被调整,但对编译影响较小。
仅是从import { resolve, join }
变更为import { join, resolve }
,整体功能保持不变,可忽略。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (14)
package.json
(2 hunks)packages/nutui-taro-demo/config/index.js
(1 hunks)packages/nutui-taro-demo/package.json
(1 hunks)src/config.json
(1 hunks)src/packages/configprovider/types.ts
(1 hunks)src/packages/loading/demos/h5/demo1.tsx
(1 hunks)src/packages/loading/demos/taro/demo1.tsx
(1 hunks)src/packages/lottie/demos/h5/demo1.tsx
(1 hunks)src/packages/lottie/demos/h5/demo2.tsx
(1 hunks)src/packages/lottie/demos/taro/demo1.tsx
(1 hunks)src/packages/lottie/demos/taro/demo2.tsx
(1 hunks)src/packages/lottie/demos/taro/demo3.tsx
(1 hunks)vite.config.site.ts
(1 hunks)vite.config.ts
(2 hunks)
✅ Files skipped from review due to trivial changes (6)
- src/packages/lottie/demos/taro/demo3.tsx
- src/packages/loading/demos/h5/demo1.tsx
- src/packages/lottie/demos/h5/demo1.tsx
- src/packages/lottie/demos/taro/demo2.tsx
- src/packages/lottie/demos/taro/demo1.tsx
- src/packages/lottie/demos/h5/demo2.tsx
🔇 Additional comments (8)
src/packages/loading/demos/taro/demo1.tsx (1)
3-3
: 改用绝对导入路径可能是为适配别名或打包需求。
此处将原先的相对路径切换为 @nutui/nutui-react-taro/dist/es/lottie/animation/light/loading.json
的绝对路径,有助于统一管理动画资源文件,避免路径冲突。
vite.config.site.ts (1)
23-64
: 新增多组别名映射来指向本地 Lottie 动画 JSON 文件。
这有助于在编译和打包时直接使用项目内的资源,方便对动画进行统一管理与修改。建议在文档中记录这些别名的用途和维护方式,方便后续团队协作和更新。
vite.config.ts (1)
28-69
: 新增多组别名映射来指向本地 Lottie 动画 JSON 文件。
与 vite.config.site.ts
所做的更改一致,这些别名确保了对动画资源的本地化引用,可在不同环境或主题下保持一致的路径解析,提升可维护性。
packages/nutui-taro-demo/config/index.js (1)
83-133
: 对多个 Lottie 动画 JSON 文件及相关路径进行了别名映射。
删除了针对 TARO_ENV
的条件别名声明,统一改用固定路径映射文件位置,便于在 Taro 中管理与维护不同主题的动画资源。若需结合远程加载或大规模动画扩展,建议考虑自动化配置脚本进行管理。
packages/nutui-taro-demo/package.json (1)
89-90
: 确认依赖兼容性与必要性
新增了 lottie-miniprogram
与 lottie-react
依赖,请确保在目标端(如小程序、H5 等)使用时无兼容性问题,并确认新依赖是项目必需,避免引入冗余包导致体积增大或构建时间延长。
package.json (2)
2-3
: 包名与版本号更新检查
将包名重命名为 @dongdesign/components
且版本号修改为 3.0.0-beta.1
。请确认各处文档、脚本、以及发布流程是否都已同步更新,避免后续发布或引入过程出现混淆。
43-43
: 移除 publishConfig 后的发布流程确认
删除了原先的 publishConfig
配置后,请确认新的发布流程是否符合项目需求,例如发布到私有仓库或公共 npm 注册表的流程是否可用。
src/config.json (1)
1197-1197
: 文档可见性更新
已将 Lottie
组件的 dd
字段更新为 true
,确认该组件的示例和文档内容已准备就绪,方便用户查看并使用相关功能。
| 'nutuiColorPrimaryIcon' | ||
| 'nutuiColorPrimaryIconDisabled' | ||
| 'nutuiColorPrimarySpecialdisabled' |
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.
🛠️ Refactor suggestion
命名一致性建议
nutuiColorPrimarySpecialdisabled
与其他变量例如 nutuiColorPrimaryIconDisabled
等的大小写形式不一致,建议调整为 nutuiColorPrimarySpecialDisabled
以保持命名统一,便于维护和阅读。
下面提供一个可选的修改示例:
- | 'nutuiColorPrimarySpecialdisabled'
+ | 'nutuiColorPrimarySpecialDisabled'
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 'nutuiColorPrimaryIcon' | |
| 'nutuiColorPrimaryIconDisabled' | |
| 'nutuiColorPrimarySpecialdisabled' | |
| 'nutuiColorPrimaryIcon' | |
| 'nutuiColorPrimaryIconDisabled' | |
| 'nutuiColorPrimarySpecialDisabled' |
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 (3)
vite.config.site.ts (1)
23-64
: 新增别名配置可行,但请注意维护统一性。
这些别名映射适用于本地 Lottie JSON 文件,请确保在其它环境(如 CI/CD 或生产环境)中同样生效,避免出现资源无法找到的问题。vite.config.ts (1)
28-69
: 批量添加 Lottie JSON 文件别名有助于统一资源管理,但需注意后续维护成本。
如果后续存在更多动画资源,请考虑集中管理或自动化生成别名,以减少手工修改带来的风险。src/packages/configprovider/types.ts (1)
9-11
: 命名可读性优化建议新增变量
nutuiColorPrimaryIconDisabled
和nutuiColorPrimarySpecialdisabled
在命名上含义相近,但却使用了不同的大小写和前缀,可能导致使用者困惑。建议统一命名风格,例如统一使用IconDisabled
来保持一致性。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (14)
package.json
(2 hunks)packages/nutui-taro-demo/config/index.js
(1 hunks)packages/nutui-taro-demo/package.json
(1 hunks)src/config.json
(1 hunks)src/packages/configprovider/types.ts
(1 hunks)src/packages/loading/demos/h5/demo1.tsx
(1 hunks)src/packages/loading/demos/taro/demo1.tsx
(1 hunks)src/packages/lottie/demos/h5/demo1.tsx
(1 hunks)src/packages/lottie/demos/h5/demo2.tsx
(1 hunks)src/packages/lottie/demos/taro/demo1.tsx
(1 hunks)src/packages/lottie/demos/taro/demo2.tsx
(1 hunks)src/packages/lottie/demos/taro/demo3.tsx
(1 hunks)vite.config.site.ts
(1 hunks)vite.config.ts
(2 hunks)
✅ Files skipped from review due to trivial changes (6)
- src/packages/lottie/demos/taro/demo3.tsx
- src/packages/loading/demos/h5/demo1.tsx
- src/packages/lottie/demos/h5/demo2.tsx
- src/packages/lottie/demos/taro/demo1.tsx
- src/packages/lottie/demos/h5/demo1.tsx
- src/packages/lottie/demos/taro/demo2.tsx
🔇 Additional comments (7)
src/packages/loading/demos/taro/demo1.tsx (1)
3-3
: 导入路径变更合理,但需要确保资源文件在目标路径中正确存在。
如果此 JSON 资源文件后续有重构或移动,请及时更新引用,以防止加载失败。
vite.config.ts (1)
4-4
: import 顺序变动属微调,不影响主要功能。
若项目中有相关 ESLint 或代码规范,请确保与其保持一致。
packages/nutui-taro-demo/config/index.js (1)
83-133
: 替换原有别名为 Lottie 文件的绝对引用确实提升了配置统一性。
但需要确保其它依赖(如小程序平台、JD 特殊环境)也能正确解析这些别名。可以在不同平台测试一下是否能正常加载动画文件,以免兼容性出现问题。
packages/nutui-taro-demo/package.json (1)
89-90
: 建议确认 Lottie 依赖的兼容性
新增的 lottie-miniprogram
与 lottie-react
均可提供动画支持,但需确保同时使用时不会产生冲突。若仅小程序和 React 端各用其一,应在构建脚本或使用文档中明确区分场景,以免混淆。
package.json (2)
2-3
: 包名与版本更新检查
将包名改为 @dongdesign/components
且版本降为 3.0.0-beta.1
。请确保:
- 是否与现有发版计划匹配,以避免错误回退或混淆版本号;
- 下游项目或文档引用时,已明晰说明包名变更,防止引用失败。
43-43
: 警惕发布配置被移除后可能带来的影响
publishConfig
被去除后,有可能在发版或权限控制方面出现问题(例如无法自动发布到 npm,或不再使用公共 registry)。若确系需求,请确认其他发版流程已做好配置。
src/config.json (1)
1197-1197
: 确认文档状态变动正确性
将 Lottie 组件的文档可见性由 dd: false
改为 dd: true
后,请确认相应文档内容已完善并可正常访问,以免用户查阅时出现内容空缺。
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feat_v3.x #2908 +/- ##
==========================================
Coverage 85.97% 85.97%
==========================================
Files 277 277
Lines 18692 18692
Branches 2769 2769
==========================================
Hits 16070 16070
Misses 2617 2617
Partials 5 5 ☔ View full report in Codecov by Sentry. |
🤔 这个变动的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
☑️ 请求合并前的自查清单
Summary by CodeRabbit
新功能
Card
和Lottie
组件文档依赖更新
lottie-miniprogram
和lottie-react
依赖包配置
@nutui/nutui-react-taro
更改为@dongdesign/components
3.0.0-beta.1
样式变更