Expand `corepack use` documentation description
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
調査の方向性
リンクされた issue 607 のテスト例とその shell コマンドを動作の参考として使用し、README の corepack use セクションを更新してください。コマンドがディレクトリ階層をたどって package.json を見つける方法と、ファイルまたは packageManager フィールドが存在しない場合に何を作成するかを記載してください。両方の動作が明確に説明されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Issue
Under README > corepack use the complete description currently says:
corepack use <name[@]>
When run, this command will retrieve the latest release matching the provided descriptor, assign it to the project's package.json file, and automatically perform an install.
package.json location
There is no description of how the command navigates the directory hierarchy to locate a possible existing package.json to modify.
Using the test example of @arcanis in https://github.com/nodejs/corepack/issues/607#issuecomment-2609834263 shows that it operates on the root of a hierarchy:
corepack enable yarn
cd $(mktemp -d)
yarn init -2 -w
mkdir -p packages/foo
echo '{}' > packages/foo/package.json
jq .packageManager package.json
(cd packages/foo && corepack use yarn@4.5.0)
jq .packageManager package.json
In this example case, the result is that:
-
packages/foo/package.jsoncontains{} -
package.jsoncontains{ "name": "tmp.IcgYOXK7aS", "packageManager": "yarn@4.5.0+sha512.837566d24eec14ec0f5f1411adb544e892b3454255e61fdef8fd05f3429480102806bac7446bc9daff3896b01ae4b62d00096c7e989f1596f2af10b927532f39", "workspaces": [ "packages/*" ] }
package.json creation
If no package.json file is found, then one is created. This effect of the command is not described.
Suggestion
For the README > corepack use section:
- Add text to explain how the location for the
package.jsonfile is determined. - Add text which describes how a
package.jsonfile and / or apackageManagerfield is created if they don't exist.
Related
- 主要言語
- TypeScript
- スター
- 3.8k
- フォーク
- 279
- 平均マージ
- 1時間 47分
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nodejs/corepack のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
nodejs/corepack の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mksglu/context-mode#1200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/claude-code#96687 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
AOSSIE-Org/DebateAI#582 · コメント 2 件 ·