From 7e1be647071810e03bb501e4c6dcb32f6247a339 Mon Sep 17 00:00:00 2001 From: giancarlo Date: Mon, 22 Apr 2024 15:28:12 +0800 Subject: [PATCH] Add merging conflicts section to README A new section has been added to the README on how to handle merge conflicts, specifically for `pnpm-lock.yaml` and `database.types.ts`. Detailed instructions are provided on how to regenerate these files and resolve the conflicts. --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index ae98c29d7..3fd75aa09 100644 --- a/README.md +++ b/README.md @@ -1398,6 +1398,34 @@ async function serverSideFunction() { In the future - this will be automatically captured by the `enhanceAction` and `enhanceRouteHandler` functions - so you won't need to do this manually unless you're swallowing the errors in the inner function (in which case, you should rethrow the error or capture manually). +## Merging Conflicts + +It is very likely that you will encounter merging conflicts when working with the repository. + +Generally speaking, when encountering conflicts on the following files, you need to accept *any of them* but make sure to re-generate them: +1. pnpm-lock.yaml +2. database.types.ts + +### pnpm-lock.yaml +To fix the conflicts, you can run the following command: + +```bash +pnpm i +``` + +1. The lock file will be regenerated according to the changes in the repository and your local changes. + +### Database Types +For the database types, reset the supabase local state and run the following command: + +```bash +pnpm run supabase:web:typegen +``` + +This will regenerate the types according to the changes in the repository and your local changes. + +For the rest of the files, you need to resolve the conflicts manually. + ## Going to Production When you are ready to go to production, please follow the checklist below. This is an overview, a more detailed guide will be provided in the future.