From afe041244f6e01f4ea433dff414eba0ba034adef Mon Sep 17 00:00:00 2001 From: Reece Dunham Date: Mon, 23 May 2022 19:55:26 -0400 Subject: [PATCH] Document patch plugin options --- .yarn/versions/db7650d7.yml | 6 ++++++ packages/gatsby/static/configuration/yarnrc.json | 13 +++++++++++++ packages/plugin-patch/sources/tools/apply.ts | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .yarn/versions/db7650d7.yml diff --git a/.yarn/versions/db7650d7.yml b/.yarn/versions/db7650d7.yml new file mode 100644 index 000000000000..d82515483053 --- /dev/null +++ b/.yarn/versions/db7650d7.yml @@ -0,0 +1,6 @@ +releases: + "@yarnpkg/plugin-patch": patch + +declined: + - "@yarnpkg/plugin-compat" + - "@yarnpkg/cli" diff --git a/packages/gatsby/static/configuration/yarnrc.json b/packages/gatsby/static/configuration/yarnrc.json index ca98cc7b839c..4df9a18744fa 100644 --- a/packages/gatsby/static/configuration/yarnrc.json +++ b/packages/gatsby/static/configuration/yarnrc.json @@ -139,6 +139,12 @@ "type": "boolean", "examples": [false] }, + "enableInlineHunks": { + "_package": "@yarnpkg/plugin-patch", + "description": "If true, Yarn will print any patch sections (hunks) that could not be applied successfully to the terminal. Defaults to false.", + "type": "boolean", + "examples": [true] + }, "enableMessageNames": { "_package": "@yarnpkg/core", "description": "If true, Yarn will prefix most messages with codes suitable for search engines.", @@ -605,6 +611,13 @@ "additionalProperties": false, "_exampleKeys": ["webpack@*"] }, + "patchFolder": { + "_package": "@yarnpkg/plugin-patch", + "description": "Folder where patch files will be written to.", + "type": "string", + "format": "uri-reference", + "default": "./.yarn/patches" + }, "pnpDataPath": { "_package": "@yarnpkg/plugin-pnp", "description": "The location where Yarn will read and write the `.pnp.meta.json` file.", diff --git a/packages/plugin-patch/sources/tools/apply.ts b/packages/plugin-patch/sources/tools/apply.ts index 90f9ea23f52e..8d3ed087caf2 100644 --- a/packages/plugin-patch/sources/tools/apply.ts +++ b/packages/plugin-patch/sources/tools/apply.ts @@ -129,7 +129,7 @@ function linesAreEqual(a: string, b: string) { * * if you edit a file that had a new line and leave it in: * - * neither insetion nor deletion have the annoation + * neither insertion nor deletion have the annotation * */