From c93eaeabd2d5fcb85fb8139a99719491127469f5 Mon Sep 17 00:00:00 2001 From: Colin Kennedy Date: Mon, 26 Sep 2022 15:54:31 -0300 Subject: [PATCH 1/4] Add package configuration instruction to readme --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 8ba03a760..0eb6269fa 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ We do acknowledge the irony and overhead of using npm to install Corepack, which ## Usage +### When Building Packages + Just use your package managers as you usually would. Run `yarn install` in Yarn projects, `pnpm install` in pnpm projects, and `npm` in npm projects. Corepack will catch these calls, and depending on the situation: - **If the local project is configured for the package manager you're using**, Corepack will silently download and cache the latest compatible version. @@ -44,6 +46,16 @@ Just use your package managers as you usually would. Run `yarn install` in Yarn - **If the local project isn't configured for any package manager**, Corepack will assume that you know what you're doing, and will use whatever package manager version has been pinned as "known good release". Check the relevant section for more details. +### When Authoring Packages + +Set your package's manager with the `packageManager` field in `package.json`: + +```json +{ + "packageManager": "yarn@3.1.1", +} +``` + ## Known Good Releases When running Corepack within projects that don't list a supported package From 4a8414dbc2bb8d282bc5b10524ddcd53619d35e8 Mon Sep 17 00:00:00 2001 From: Colin Kennedy Date: Wed, 28 Sep 2022 09:20:16 -0300 Subject: [PATCH 2/4] Add sha to configured packageManager Co-authored-by: Antoine du Hamel --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0eb6269fa..182b6f95b 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Set your package's manager with the `packageManager` field in `package.json`: ```json { - "packageManager": "yarn@3.1.1", + "packageManager": "yarn@3.2.3+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa" } ``` From bf22a14e4dee312420238714f15f58287bb2249c Mon Sep 17 00:00:00 2001 From: Colin Kennedy Date: Wed, 28 Sep 2022 09:34:24 -0300 Subject: [PATCH 3/4] Add explanitory comments on example config string --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 182b6f95b..0929be921 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,8 @@ Set your package's manager with the `packageManager` field in `package.json`: } ``` +Here, `yarn` executable is specified at version `3.2.3`, along with the `sha224` hash of this version for validation. `executable@x.y.z` is required. The sha is optional but strongly recommended as a security practice. Permitted values for the executable are `yarn`, `npm`, and `pnpm`. + ## Known Good Releases When running Corepack within projects that don't list a supported package From 072137580022b3d1307861d9d3c98786942e5e88 Mon Sep 17 00:00:00 2001 From: Colin Kennedy Date: Thu, 13 Oct 2022 10:29:24 -0300 Subject: [PATCH 4/4] executable -> package manager... from review suggestion Co-authored-by: Antoine du Hamel --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0929be921..01a7c635d 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Set your package's manager with the `packageManager` field in `package.json`: } ``` -Here, `yarn` executable is specified at version `3.2.3`, along with the `sha224` hash of this version for validation. `executable@x.y.z` is required. The sha is optional but strongly recommended as a security practice. Permitted values for the executable are `yarn`, `npm`, and `pnpm`. +Here, `yarn` is the name of the package manager, specified at version `3.2.3`, along with the SHA-224 hash of this version for validation. `packageManager@x.y.z` is required. The hash is optional but strongly recommended as a security practice. Permitted values for the package manager are `yarn`, `npm`, and `pnpm`. ## Known Good Releases