Skip to content

chore: 升级 Next.js 至 16.4.2 #120

Closed

Description

@luojiyin1987

背景

当前仓库锁定 Next.js 16.3.0。需要升级到 16.4.2。

变更内容

  • next、@next/mdx、@next/eslint-plugin-next、eslint-config-next 升级到 16.4.2
  • pnpm-workspace.yaml 中 patchedDependencies 键同步改为 next@16.4.2
  • patches/next@16.3.0.patch 重命名为 patches/next@16.4.2.patch(补丁内容不变,仍用于开启 decorator 与 decoratorVersion: '2022-03')
  • 重新生成 pnpm-lock.yaml。原 lockfile 与 package.json 不一致(锁的是 16.2.12),本次一并修正 typescript、typescript-eslint 等已声明依赖的版本

验证

  • tsc --noEmit 通过
  • pnpm build 通过,8 个 SSG 页面预渲染成功
  • next 补丁在 16.4.2 上应用成功

备注

eslint . 仍有 62 个既有报错,来自新版 typescript-eslint 规则,与本次升级无关,不在 CI 检查范围内。

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions