-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Changes from 7 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
7645dee
@next/upgrade package
e8e9bfb
Fixes small issues, adds support for custom Next.js versions, adds st…
f829cd1
Added support for multiple package managers and error handling when m…
18c4466
Adds support for bun
786a3ca
Use require.resolve to find Next.js current version
40fecf7
Detect monorepos and throw warning
d7f5b3f
Correctly find package manager in monorepos
d87a1ef
Update README.md
e52067c
Support codemods in @next/upgrade (#70270)
1e55857
Merge branch 'canary' of github.com:vercel/next.js into 09-10-_next_u…
devjiwonchoi 02d4142
chore: move next-upgrade to next-codemod
devjiwonchoi e8559e2
chore: delete next-upgrade
devjiwonchoi d147839
Merge branch 'canary' into 09-10-_next_upgrade_package
devjiwonchoi 29efc4d
pnpm remove next upgrade
devjiwonchoi 535f119
run ncc compiled
devjiwonchoi fd8af81
chore: add v15 codemod
devjiwonchoi 4101a7a
avoid .js import
devjiwonchoi 3dc2336
update pkg manager, remove "which"
devjiwonchoi b956d91
ncc compiled
devjiwonchoi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
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 | ||
``` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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 merelypnpm update next
, that there are React dependencies, etc.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated now!