Move root package.json pnpm settings into pnpm-workspace.yaml

未关闭 适合新手
#1,948 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
活跃
领域
devtools

调研方向

pnpm 设置位于根目录 package.json 的 pnpm 块中(第 68-94 行),pnpm-workspace.yaml 中已经有 allowBuilds、packageExtensions 和 peerDependencyRules。先将 onlyBuiltDependencies 和 ignoredBuiltDependencies 列表与 allowBuilds 进行比较,然后把 pnpm.overrides 移入 overrides 键。完成的标准是:package.json 中不再有 pnpm 块,workspace 文件包含所有设置,并且 pnpm install --frozen-lockfile 不会修改 pnpm-lock.yaml,也不会出现 pnpm 11 的警告。

由索引模型根据 Issue 内容生成。

描述

Area: Infrastructure Chore Difficulty: Low Priority: Low

Root package.json (package.json:68-94) still carries a "pnpm" configuration block (overrides, onlyBuiltDependencies, ignoredBuiltDependencies). When a host runs a pnpm 11 global binary (even when delegating to "packageManager": "[email protected]" via manage-package-manager-versions), every pnpm command prints:

[WARN] The "pnpm" field in package.json is no longer read by pnpm. The following keys were ignored: "pnpm.overrides", "pnpm.onlyBuiltDependencies". See https://pnpm.io/settings for the new home of each setting.

pnpm-workspace.yaml (pnpm-workspace.yaml:2-13, 84-109) already holds the workspace's other pnpm 10/11 settings (allowBuilds, packageExtensions, patchedDependencies, peerDependencyRules, minimumReleaseAge), which creates two problems:

  1. Duplicate, diverging build-script lists: pnpm-workspace.yaml declares allowBuilds (with msgpackr-extract: false and without @tailwindcss/oxide or oxc-resolver), while package.json declares pnpm.onlyBuiltDependencies (including @tailwindcss/oxide, msgpackr-extract, and oxc-resolver) and pnpm.ignoredBuiltDependencies (@scarf/scarf).
  2. Overrides live only in package.json: pnpm.overrides (@tailwindcss/typography>postcss-selector-parser, @types/react, @types/react-dom, find-my-way@9, sharp, yaml@2) has not been moved to overrides in pnpm-workspace.yaml, so upgrading packageManager to pnpm 11 (or running pnpm 11 directly) silently drops those overrides.

Suggested fix

Move pnpm.overrides into overrides in pnpm-workspace.yaml, reconcile pnpm.onlyBuiltDependencies / pnpm.ignoredBuiltDependencies into allowBuilds in pnpm-workspace.yaml, remove the "pnpm" key from root package.json, and verify pnpm install --frozen-lockfile leaves pnpm-lock.yaml intact.

主要语言
TypeScript
星标
119
派生
19
平均合并
1 天 18 小时
30 天内合并 PR
60

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DouglasNeuroInformatics/OpenDataCapture 的其他 Issue

查看 DouglasNeuroInformatics/OpenDataCapture 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。