Skip to content

chore(deps): 升级前后端依赖到最新版本 - #30

Merged
chenbin3625 merged 1 commit into
mainfrom
chore/deps-upgrade-all
Sep 17, 2026
Merged

chenbin3625 merged 1 commit into
mainfrom
chore/deps-upgrade-all

Conversation

@chenbin3625

Copy link
Copy Markdown
Owner

变更内容

一次性把前后端过期依赖升级到最新版本,纯依赖升级,无业务代码改动。

后端 backend/go.modgo.sum

依赖 升级
modernc.org/sqlite 1.52.0 → 1.59.0
modernc.org/libc 1.72.3 → 1.76.0
modernc.org/memory 1.11.0 → 1.12.1
go.mongodb.org/mongo-driver/v2 2.5.0 → 2.9.1
golang.org/x/net 0.58.0 → 0.59.0
golang.org/x/arch 0.22.0 → 0.31.0
google.golang.org/protobuf 1.36.10 → 1.36.12
gin 间接依赖 sonic 1.15.0→1.15.4、validator 10.30.1→10.30.4、go-json 0.10.5→0.10.6、go-toml/v2 2.2.4→2.4.3、mimetype 1.4.12→1.4.15 等

前端 frontend/package-lock.json

依赖 升级
react / react-dom 19.2.7 → 19.3.0
@types/react / @types/react-dom 19.2.17 / 19.2.3 → 19.3.0
vite 8.0.16 → 8.3.0
@vitejs/plugin-react 6.0.2 → 6.1.1
eslint 10.4.1 → 10.10.0
typescript-eslint 8.61.0 → 8.70.0
globals 17.6.0 → 17.12.0
axios 1.18.0 → 1.20.0
dayjs 1.11.21 → 1.11.23
zustand 5.0.14 → 5.0.15
lucide-react 1.46.0 → 1.47.0
react-router-dom 7.18.3 → 7.18.4
eslint-plugin-react-refresh 0.5.6 → 0.5.7
@types/node → 24.13.5(对齐 Node 24 运行时)

前端 package.json 无需改动,本次均在既有 ^ / ~ 范围内取到最新。

未升级项:TypeScript 7

typescript 保持 6.0.3,暂不升 7.0.2。原因:TS 7 的 npm 包不再提供 JS 编译器 API(主入口只剩 lib/version.cjs),而 typescript-eslint 最新版 8.70.0(当前无 v9)对 TS >= 7 会直接报错退出,导致 npm run lint 不可用。

官方过渡方案是 npm alias side-by-side(typescript@typescript/typescript6,另加 @typescript/native 指向 7),但那样 tsc -b 仍跑 TS 6,收益有限、配置更绕,故本次不引入。待 typescript-eslint 支持 >= 7.1(typescript-eslint#10940)后再单独升级。

验证

  • 后端:go build ./...go vet ./...go test -count=1 ./... 全部通过
  • 前端:npm run lint 0 error(14 个既有 warning,与改动前一致)、npm run test 87/87 通过、npm run build 成功

后端 backend/go.mod、go.sum:
- modernc.org/sqlite 1.52.0 → 1.59.0,连带 libc 1.72.3 → 1.76.0、memory 1.11.0 → 1.12.1
- go.mongodb.org/mongo-driver/v2 2.5.0 → 2.9.1
- golang.org/x/net 0.58.0 → 0.59.0,golang.org/x/arch 0.22.0 → 0.31.0
- google.golang.org/protobuf 1.36.10 → 1.36.12
- gin 间接依赖同步升级:sonic 1.15.0 → 1.15.4、validator 10.30.1 → 10.30.4、
  go-json 0.10.5 → 0.10.6、go-toml/v2 2.2.4 → 2.4.3、mimetype 1.4.12 → 1.4.15 等

前端 frontend/package-lock.json:
- react、react-dom 19.2.7 → 19.3.0,@types/react、@types/react-dom 同步升至 19.3.0
- vite 8.0.16 → 8.3.0,@vitejs/plugin-react 6.0.2 → 6.1.1
- eslint 10.4.1 → 10.10.0,typescript-eslint 8.61.0 → 8.70.0,globals 17.6.0 → 17.12.0
- axios 1.18.0 → 1.20.0,dayjs 1.11.21 → 1.11.23,zustand 5.0.14 → 5.0.15
- lucide-react 1.46.0 → 1.47.0,react-router-dom 7.18.3 → 7.18.4,
  eslint-plugin-react-refresh 0.5.6 → 0.5.7,@types/node 升至 24.13.5 对齐 Node 24 运行时

TypeScript 保持 6.0.3 不升 7.0.2:TS 7 的 npm 包不再提供 JS 编译器 API(主入口仅
version.cjs),而 typescript-eslint 最新版 8.70.0(无 v9)对 TS >= 7 直接报错退出,
支持情况见 typescript-eslint#10940,待其支持 >= 7.1 后再升级。

验证:frontend lint 0 error、87 项测试全通过、vite build 成功;
backend go vet 通过、go test 全量通过。

AI-Coding: true
AI-Tool: TophantAI
@chenbin3625
chenbin3625 merged commit 81c5c1e into main Sep 17, 2026
2 checks passed
@chenbin3625
chenbin3625 deleted the chore/deps-upgrade-all branch September 17, 2026 15:01
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.

1 participant