Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve section on testing a script in the README #32

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,16 @@ 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 `<path-to-comet-upgrade-repository>` 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

<path-to-comet-upgrade-repository>/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:

```sh
git reset --hard HEAD

../comet-upgrade/bin/index.js 4
<path-to-comet-upgrade-repository>/bin/index.js v4/change-something.ts
```
Loading