Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Switch to devEngines.packageManager in "When Authoring Packages"

未关闭
#835 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
52/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
冷清
技术栈
node.js
领域
documentation

调研方向

从 README 的 "When Authoring Packages" 部分开始,将顶层的 packageManager 指南与后面的 devEngines.packageManager 子部分进行比较。查看链接的 npm、Yarn、pnpm 和包元数据文档,然后根据选定的建议调整 README 的结构和示例,并验证所有链接和 JSON 片段。

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

描述

Hi, thanks for Corepack! It's been a useful tool to maintain environments across student machines.

In the When Authoring Packages section of the readme, the instructions start with suggesting using a top-level packageManager field of package.json:

Set your package's manager with the packageManager field in package.json:

{
  "packageManager": "yarn@3.2.3+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa"
}

Further down in the readme, there is a subsection devEngines.packageManager, which shifts to describing the devEngines.packageManager field:

devEngines.packageManager

When a devEngines.packageManager field is defined, and is an object containing
a "name" field (can also optionally contain version and onFail fields),
Corepack will use it to validate you're using a compatible package manager.

devEngines.packageManager has some level of support in:

  1. npm v10+ https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines
  2. Yarn via Corepack
  3. pnpm https://pnpm.io/package_json#devenginespackagemanager

My suggestion is regarding that first starting section of the readme on the top-level packageManager field:

  1. replace the packageManager docs with devEngines.packageManager docs (without the extra subsection)
  2. and then either:
    1. drop the packageManager docs
    2. deprioritize the packageManager docs by moving them to the end and describing it as "Legacy" or similar
主要语言
TypeScript
星标
3.8k
派生
279
平均合并
1 小时 47 分钟
30 天内合并 PR
2

贡献指南

打开贡献指南

从这里开始

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

nodejs/corepack 的其他 Issue

查看 nodejs/corepack 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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