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

feat(next-codemod): add upgrade command #69935

Merged
merged 19 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
31 changes: 31 additions & 0 deletions packages/next-upgrade/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# @next/upgrade

Upgrade Next.js apps to newer or beta versions with one command.

# Build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this is a second h1 (#) aside from the top one.

Also might be worth mentioning the consumer-oriented npx command near the top and then build instructions for contributors as a secondary thing below it in the README.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following a basic one-line of use, it may also be worthwhile having a ## Why? section explaining why the package exists. i.e. explaining that updating Next isn't just merely pnpm update next, that there are React dependencies, etc.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated now!


To build the package locally, go to `packages/next-upgrade` and run:

```bash
pnpm build && pnpm link --global
```

In your Next.js app, add the following to your `package.json`:

```json
"dependencies": {
"@next/upgrade": "path/to/local/next.js/packages/next-upgrade"
}
```

Finally, run:

```bash
pnpm i
```

Now you can use the package!

```bash
npx @next/upgrade
```
Loading
Loading