forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
next-upgrade: Add testfixtures (vercel#71377)
- Loading branch information
Showing
22 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...ges/next-codemod/bin/__testfixtures__/react-18-installed-mixed-router/README.md
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 @@ | ||
Upgrades React without prompt |
Empty file.
11 changes: 11 additions & 0 deletions
11
packages/next-codemod/bin/__testfixtures__/react-18-installed-mixed-router/package.json
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,11 @@ | ||
{ | ||
"name": "react-18-installed-mixed-router", | ||
"scripts": { | ||
"dev": "next dev" | ||
}, | ||
"dependencies": { | ||
"next": "14.3.0-canary.44", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0" | ||
} | ||
} |
Empty file.
1 change: 1 addition & 0 deletions
1
.../next-codemod/bin/__testfixtures__/react-18-installed-pure-app-router/README.md
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 @@ | ||
Upgrades React without prompt |
Empty file.
11 changes: 11 additions & 0 deletions
11
packages/next-codemod/bin/__testfixtures__/react-18-installed-pure-app-router/package.json
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,11 @@ | ||
{ | ||
"name": "react-18-installed-pure-app-router", | ||
"scripts": { | ||
"dev": "next dev" | ||
}, | ||
"dependencies": { | ||
"next": "14.3.0-canary.44", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0" | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...ext-codemod/bin/__testfixtures__/react-18-installed-pure-pages-router/README.md
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 @@ | ||
Upgrades React without prompt |
11 changes: 11 additions & 0 deletions
11
packages/next-codemod/bin/__testfixtures__/react-18-installed-pure-pages-router/package.json
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,11 @@ | ||
{ | ||
"name": "react-18-installed-pure-pages-router", | ||
"scripts": { | ||
"dev": "next dev" | ||
}, | ||
"dependencies": { | ||
"next": "14.3.0-canary.44", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0" | ||
} | ||
} |
Empty file.
1 change: 1 addition & 0 deletions
1
...ges/next-codemod/bin/__testfixtures__/react-19-installed-mixed-router/README.md
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 @@ | ||
Upgrades React without prompt |
Empty file.
11 changes: 11 additions & 0 deletions
11
packages/next-codemod/bin/__testfixtures__/react-19-installed-mixed-router/package.json
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,11 @@ | ||
{ | ||
"name": "react-19-installed-mixed-router", | ||
"scripts": { | ||
"dev": "next dev" | ||
}, | ||
"dependencies": { | ||
"next": "14.3.0-canary.45", | ||
"react": "19.0.0-beta-4508873393-20240430", | ||
"react-dom": "19.0.0-beta-4508873393-20240430" | ||
} | ||
} |
Empty file.
1 change: 1 addition & 0 deletions
1
.../next-codemod/bin/__testfixtures__/react-19-installed-pure-app-router/README.md
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 @@ | ||
Upgrades React without prompt |
Empty file.
11 changes: 11 additions & 0 deletions
11
packages/next-codemod/bin/__testfixtures__/react-19-installed-pure-app-router/package.json
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,11 @@ | ||
{ | ||
"name": "react-19-installed-pure-app-router", | ||
"scripts": { | ||
"dev": "next dev" | ||
}, | ||
"dependencies": { | ||
"next": "14.3.0-canary.45", | ||
"react": "19.0.0-beta-4508873393-20240430", | ||
"react-dom": "19.0.0-beta-4508873393-20240430" | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...ext-codemod/bin/__testfixtures__/react-19-installed-pure-pages-router/README.md
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 @@ | ||
Upgrades React without prompt |
11 changes: 11 additions & 0 deletions
11
packages/next-codemod/bin/__testfixtures__/react-19-installed-pure-pages-router/package.json
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,11 @@ | ||
{ | ||
"name": "react-19-installed-pure-pages-router", | ||
"scripts": { | ||
"dev": "next dev" | ||
}, | ||
"dependencies": { | ||
"next": "14.3.0-canary.45", | ||
"react": "19.0.0-beta-4508873393-20240430", | ||
"react-dom": "19.0.0-beta-4508873393-20240430" | ||
} | ||
} |
Empty file.
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
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,18 @@ | ||
#!/usr/bin/env bash | ||
# Simple test runner for upgrade fixtures. | ||
# For manual verification only (check the README.md) in the fixtures | ||
# for the expected behavior. | ||
# Usage: | ||
# - cwd must be ~/packages/next-codemod | ||
# - `pnpm test:upgrade-fixture <fixture-name> <...next-codemod-args>` | ||
|
||
NEXT_CODEMOD_BIN=$(pwd)/bin/next-codemod.js | ||
cd "$1" || exit 1 | ||
# We're only interested in the changes the upgrade command does. | ||
git add -A . | ||
rm -rf node_modules | ||
pnpm install --ignore-workspace --no-lockfile | ||
node "$NEXT_CODEMOD_BIN" upgrade "${@:2}" | ||
git --no-pager diff . | ||
git restore . | ||
git reset HEAD -- . |