Yarn supports a yarn-path option, which allows you to point to a version of yarn within the repo. This makes it easy to ensure everyone working in the repo to be on the same version.
If this setting is specified, when patch-package copies over the .yarnrc to the temp folder, yarn will fail because it doesnt also copy over the yarn version. I think instead of copying the yarnrc, we can instead read, modify, and write the file to point to the correct old path. I will link the PR with this approach below. Let me know what you think!
Yarn supports a
yarn-pathoption, which allows you to point to a version of yarn within the repo. This makes it easy to ensure everyone working in the repo to be on the same version.If this setting is specified, when
patch-packagecopies over the.yarnrcto the temp folder,yarnwill fail because it doesnt also copy over the yarn version. I think instead of copying the yarnrc, we can instead read, modify, and write the file to point to the correct old path. I will link the PR with this approach below. Let me know what you think!