From 3ebcaa4cef316bd69f44bb867bca73c72838a294 Mon Sep 17 00:00:00 2001 From: Johannes Obermair Date: Thu, 21 Nov 2024 11:24:42 +0100 Subject: [PATCH] Improve section on testing a script in the README - Use single script run - Improve instructions regarding comet-upgrade repository directory --- README.md | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ef8140e..e86cbde 100644 --- a/README.md +++ b/README.md @@ -39,17 +39,10 @@ npx @comet/upgrade v7/hide-graphql-field-suggestions.ts cd project-you-want-to-upgrade/ ``` - Create a new branch to test the script: + Run the upgrade script. Replace `` with the location of the cloned comet-upgrade repository (e.g., `../comet-upgrade/`): ```sh - git checkout -b upgrade-comet-to-4 - ``` - - Execute the local @comet/upgrade binary: - - ```sh - ../comet-upgrade/bin/index.js 4 # comet-upgrade directory - + /bin/index.js v4/change-something.ts ``` Verify the changes in your project. If something is not as expected, adapt the upgrade script accordingly and then run it again on a clean state: @@ -57,5 +50,5 @@ npx @comet/upgrade v7/hide-graphql-field-suggestions.ts ```sh git reset --hard HEAD - ../comet-upgrade/bin/index.js 4 + /bin/index.js v4/change-something.ts ```