From bdef65b05a328114515867e81def78476187fc26 Mon Sep 17 00:00:00 2001 From: Kim Brandwijk Date: Tue, 26 Mar 2024 22:24:30 -0500 Subject: [PATCH 1/2] Add fyi for using patch-package on EAS --- eas-patch-package.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 eas-patch-package.md diff --git a/eas-patch-package.md b/eas-patch-package.md new file mode 100644 index 0000000..2774905 --- /dev/null +++ b/eas-patch-package.md @@ -0,0 +1,9 @@ +# Using `patch-package` on EAS + +If you want to make changes to code inside a dependncy, [`patch-package`](https://github.com/ds300/patch-package) provides a convenient solution to do that. + +Out of the box, `patch-package` is fully compatible with EAS. If you follow the [installation instructions](https://github.com/ds300/patch-package?tab=readme-ov-file#set-up) for `patch-package`, including adding the `postinstall` script to your **package.json**, then any patches you have created in your project using `patch-package` will automatically be applied on EAS as part of the 'Install dependencies' step, just like on your local machine. + +> **Note**: make sure that the **patches** folder that is created by `patch-package` is added to source control, so it will be included when your source code is uploaded to EAS. + +The output from `patch-package` is available in the logs for the 'Install dependencies' step on your build details page. \ No newline at end of file From 6bed3785de4cb2e20bbf1f75b2fcdbe6020a466f Mon Sep 17 00:00:00 2001 From: Kim Brandwijk Date: Wed, 27 Mar 2024 15:14:03 -0500 Subject: [PATCH 2/2] Update eas-patch-package.md Co-authored-by: Brent Vatne --- eas-patch-package.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eas-patch-package.md b/eas-patch-package.md index 2774905..928c78d 100644 --- a/eas-patch-package.md +++ b/eas-patch-package.md @@ -1,6 +1,6 @@ # Using `patch-package` on EAS -If you want to make changes to code inside a dependncy, [`patch-package`](https://github.com/ds300/patch-package) provides a convenient solution to do that. +If you want to make changes to code inside a dependency, [`patch-package`](https://github.com/ds300/patch-package) provides a convenient solution to do that. It allows you to make changes directly to your **node_modules** directory, then generate a patch file that you can commit to source control and will be automatically re-applied to the package in **node_modules** when you run `npm install` (or `yarn`, etc.). Out of the box, `patch-package` is fully compatible with EAS. If you follow the [installation instructions](https://github.com/ds300/patch-package?tab=readme-ov-file#set-up) for `patch-package`, including adding the `postinstall` script to your **package.json**, then any patches you have created in your project using `patch-package` will automatically be applied on EAS as part of the 'Install dependencies' step, just like on your local machine.