Skip to content

Commit

Permalink
feat: using @next/codemod@canary upgrade latest to upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsong77 committed Oct 25, 2024
1 parent ee1ec25 commit bb0f858
Show file tree
Hide file tree
Showing 7 changed files with 1,253 additions and 867 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Next.js 14 Boilerplate
# Next.js 15 Boilerplate

This is a [Next.js](https://nextjs.org/) 14 Boilerplate project base on [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
This is a [Next.js](https://nextjs.org/) 15 Boilerplate project base on [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

For Next.js, check this: [Next.js 14 Boilerplate](https://github.com/qinsong77/Next-js-Boilerplate/tree/nextjs14-v2)

## Features

Expand Down
7 changes: 3 additions & 4 deletions app/demos/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ const fetchPokemon = async (poke: string) => {
}
}

export default async function Foo({
searchParams,
}: {
searchParams?: { [key: string]: string | string[] | undefined }
export default async function Foo(props: {
searchParams?: Promise<{ [key: string]: string | string[] | undefined }>
}) {
const searchParams = await props.searchParams
logger.trace(searchParams, 'searchParams')
const selectedSearch = searchParams?.selected ?? ''
const selected = Array.isArray(selectedSearch)
Expand Down
8 changes: 4 additions & 4 deletions app/task-sequence-progress/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ async function thirdProcess(result: unknown) {
)
}

export default async function AsyncWorks({
params: { id },
}: {
params: { id: string }
export default async function AsyncWorks(props: {
params: Promise<{ id: string }>
}) {
const { id } = await props.params

const [first, second, third] = unsafe_createSequentialProcesses(
() => firstProcess(id),
secondProcess,
Expand Down
1 change: 0 additions & 1 deletion e2e/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ test('app journey', async ({ page }) => {
{ text: 'GitHub', url: 'https://github.com' },
] as const

// @ts-expect-error right
for (const [index, link] of expectedLinks.entries()) {
const navLink = navLinks.nth(index)
await expect(navLink).toContainText(link.text)
Expand Down
24 changes: 15 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"preinstall": "npx only-allow pnpm",
"prepare": "husky",
"dev": "next dev | pino-pretty",
"dev:turbo": "next dev --turbo | pino-pretty",
"dev:turbo": "next dev --turbopack | pino-pretty",
"build": "next build",
"preview": "next build && cp -r dist/static dist/standalone/dist/static && cp -r public dist/standalone/public && node dist/standalone/server.js",
"build-analyze": "cross-env ANALYZE=true pnpm run build",
Expand Down Expand Up @@ -49,12 +49,12 @@
"clsx": "^2.1.1",
"cmdk": "^1.0.0",
"lucide-react": "^0.441.0",
"next": "^14.2.13",
"next": "15.0.1",
"next-themes": "^0.3.0",
"pino": "^9.4.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"recharts": "^2.12.7",
"react": "19.0.0-rc-69d4b800-20241021",
"react-dom": "19.0.0-rc-69d4b800-20241021",
"recharts": "^2.13.0",
"server-only": "^0.0.1",
"tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7",
Expand All @@ -64,21 +64,21 @@
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@commitlint/types": "^19.5.0",
"@next/bundle-analyzer": "^14.2.13",
"@next/bundle-analyzer": "15.0.1",
"@playwright/test": "^1.47.1",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^14.5.2",
"@types/node": "^22",
"@types/react": "^18.3.8",
"@types/react-dom": "^18.3.0",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/coverage-v8": "^2.1.1",
"@vitest/eslint-plugin": "^1.1.4",
"autoprefixer": "^10.4.20",
"cross-env": "^7.0.3",
"eslint": "^8",
"eslint-config-next": "^14.2.13",
"eslint-config-next": "15.0.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest-dom": "^5.4.0",
"eslint-plugin-playwright": "^1.6.2",
Expand All @@ -100,5 +100,11 @@
},
"engines": {
"node": ">=18.17.0"
},
"pnpm": {
"overrides": {
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]"
}
}
}
Loading

0 comments on commit bb0f858

Please sign in to comment.