mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-10-30 15:19:21 +00:00
1.5 KiB
1.5 KiB
Update yarn patches
You can find all patches that are currently applied inside the .yarn/patches directory. The name of the package that the patch applies to can be found in the file name of the patch.
Following are the steps to update a patch in case an update to the dependency needs to be done.
- Run
yarn add <package-name>@<version>to update the dependency
If the file you are patching hasn't changed after the update:
- Update the patch file name inside
.yarn/patchesto reflect the new version- e.g.
next-npm-15.2.3-06a6671f62.patch->next-npm-15.2.4-06a6671f62.patch
- e.g.
- Update the dependency inside
package.jsonagain to apply the patch- e.g.
"next": "15.2.4"->"next": "patch:[email protected]#../../.yarn/patches/next-npm-15.2.4-06a6671f62.patch"
- e.g.
- Run
yarn installto update lock file - Go to the package directory inside
node_modulesand check that the patch is applied
If the file you are patching has changed after the update:
- Run
yarn patch <package-name>e.g.yarn patch next@npm:15.2.4 - Follow the instructions from your CLI
- Check the generated patch file inside
.yarn/patchesand make sure it contains the expected changes - Update the dependency inside
package.json- e.g.
"next": "15.2.4"->"next": "patch:[email protected]#../../.yarn/patches/next-npm-15.2.4-06a6671f62.patch"
- e.g.
- Run
yarn installto update lock file - Go to the package directory inside
node_modulesand check that the patch is applied