Skip to content

chore(web): centralize shared frontend dependency versions - #5227

Merged
t0ng7u merged 1 commit into
mainfrom
chore/web-shared-dependency-catalog
Jun 1, 2026
Merged

chore(web): centralize shared frontend dependency versions#5227
t0ng7u merged 1 commit into
mainfrom
chore/web-shared-dependency-catalog

Conversation

@QuentinHsu

@QuentinHsu QuentinHsu commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator
  • add a web workspace catalog to manage dependency versions shared by default and classic frontends.
  • switch shared dependencies including @lobehub/icons to catalog references and align @lobehub/icons on 5.10.0.
  • replace separate frontend Bun lockfiles with a unified web/bun.lock to reduce duplicate maintenance.

⚠️ 提交说明 / PR Notice

Important

  • 请提供人工撰写的简洁摘要,避免直接粘贴未经整理的 AI 输出。

概述

  • 将两个前端中需要保持一致的依赖版本抽到 web/package.json 的 Bun workspace catalog 中统一维护。

📝 变更描述 / Description

(简述:做了什么?为什么这样改能生效?请基于你对代码逻辑的理解来写,避免粘贴未经整理的内容)

改动说明

  • 新增 web/package.json,定义 default 和 classic 两个 workspace 以及共用依赖 catalog。
  • 将 @lobehub/icons、axios、clsx、dayjs、qrcode.react、react-icons、react-markdown、remark-gfm、sse.js、prettier 改为 catalog 引用。
  • 将 @lobehub/icons 统一到 ^5.10.0。
  • 删除 web/default/bun.lock 和 web/classic/bun.lock,改为使用统一的 web/bun.lock。
  • 已验证 bun install --frozen-lockfile、default 构建和 classic 构建通过。

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix) - 请关联对应 Issue,避免将设计取舍、理解偏差或预期不一致直接归类为 bug
  • ✨ 新功能 (New feature) - 重大特性建议先通过 Issue 沟通
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

✅ 提交前检查项 / Checklist

  • 人工确认: 我已亲自整理并撰写此描述,没有直接粘贴未经处理的 AI 输出。
  • 非重复提交: 我已搜索现有的 IssuesPRs,确认不是重复提交。
  • Bug fix 说明: 若此 PR 标记为 Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。
  • 变更理解: 我已理解这些更改的工作原理及可能影响。
  • 范围聚焦: 本 PR 未包含任何与当前任务无关的代码改动。
  • 本地验证: 已在本地运行并通过测试或手动验证,维护者可以据此复核结果。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

📸 运行证明 / Proof of Work

(请在此粘贴截图、关键日志或测试报告,以证明变更生效)

Summary by CodeRabbit

  • Chores
    • Centralized dependency version management across web modules to ensure consistent package versions and streamline future updates.

- add a web workspace catalog to manage dependency versions shared by default and classic frontends.
- switch shared dependencies including @lobehub/icons to catalog references and align @lobehub/icons on 5.10.0.
- replace separate frontend Bun lockfiles with a unified web/bun.lock to reduce duplicate maintenance.
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e7a8be70-76fb-429d-bd92-3cee4638dbba

📥 Commits

Reviewing files that changed from the base of the PR and between 45d54c1 and b596de7.

⛔ Files ignored due to path filters (2)
  • web/bun.lock is excluded by !**/*.lock
  • web/classic/bun.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • web/classic/package.json
  • web/default/package.json
  • web/package.json

Walkthrough

This PR establishes centralized dependency version management for the web/ workspace by introducing an npm workspace catalog. A root web/package.json defines shared versions once, and two child workspaces (web/classic and web/default) reference those versions via catalog: placeholders instead of maintaining separate explicit semver strings.

Changes

Dependency Management Centralization

Layer / File(s) Summary
Workspace and catalog configuration
web/package.json
Root workspace configuration declares two child workspaces (default, classic) and defines a catalog section listing version ranges for @lobehub/icons, axios, clsx, dayjs, prettier, qrcode.react, react-icons, react-markdown, remark-gfm, and sse.js.
Classic workspace catalog migration
web/classic/package.json
dependencies entries for icon, HTTP, UI, date, markdown, and streaming packages are switched from explicit semver versions to catalog: references; prettier in devDependencies is also migrated to catalog:.
Default workspace catalog migration
web/default/package.json
@lobehub/icons and remaining dependencies entries (axios, clsx, dayjs, qrcode.react, react-icons, react-markdown, remark-gfm, sse.js) are switched to catalog: references; prettier in devDependencies is also migrated to catalog:.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hop, hop, the versions consolidate,
One catalog to coordinate,
The workspaces now harmonize,
No duplication, just sunrise!
Dependencies tidy, neat, and right,
A workspace dream, shining bright.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR does not address the core issue #5046 objective: fixing incorrect icon rendering for multi-word icon names. The changes only centralize dependency versions without fixing the underlying icon display bug. The PR should include code changes that fix the icon rendering logic for multi-word icon names (e.g., XiaomiMiMo) to display correctly, not just dependency version centralization.
Out of Scope Changes check ⚠️ Warning The PR introduces dependency version centralization and unified lock files, which is beyond the scope of fixing icon rendering issues described in issue #5046. Either focus this PR on dependency centralization only (and remove the issue #5046 reference), or include the actual icon rendering fix for the linked issue.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: centralizing shared frontend dependency versions in a web workspace catalog by introducing catalog references.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/web-shared-dependency-catalog

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.

@t0ng7u
t0ng7u merged commit 9a2e60d into main Jun 1, 2026
1 of 2 checks passed
@QuentinHsu
QuentinHsu deleted the chore/web-shared-dependency-catalog branch June 1, 2026 11:20
SamuelSxy pushed a commit to SamuelSxy/new-api-rh that referenced this pull request Jun 7, 2026
…s#5227

Merge pull request QuantumNous#5227 from QuantumNous/chore/web-shared-dependency-catalog
OuYang-HX pushed a commit to OuYang-HX/new-api that referenced this pull request Jun 13, 2026
…s#5227

Merge pull request QuantumNous#5227 from QuantumNous/chore/web-shared-dependency-catalog
330079598 pushed a commit to 330079598/new-api that referenced this pull request Aug 19, 2026
…s#5227

Merge pull request QuantumNous#5227 from QuantumNous/chore/web-shared-dependency-catalog
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