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

chore: support next.js 15 #4387

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
8 changes: 8 additions & 0 deletions .changeset/wild-news-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@blitzjs/auth": minor
"@blitzjs/next": minor
"@blitzjs/rpc": minor
"blitz": minor
---

chore: support next.js 15
10 changes: 5 additions & 5 deletions apps/next13/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
"@tanstack/react-query": "4.0.10",
"blitz": "2.1.3",
"flatted": "3.2.7",
"next": "14.2.15",
"next": "15.0.1",
"prisma": "^4.5.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "rc",
"react-dom": "rc",
"react-hook-form": "7.39.1",
"superjson": "1.11.0",
"zod": "3.23.8"
},
"devDependencies": {
"@types/node": "18.11.7",
"@types/react": "18.0.23",
"@types/react-dom": "18.0.7",
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"eslint": "8.26.0",
"eslint-config-next": "13.0.0",
"typescript": "4.8.4"
Expand Down
2 changes: 1 addition & 1 deletion apps/next13/src/core/components/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {zodResolver} from "@hookform/resolvers/zod"
import {z} from "zod"

export interface FormProps<S extends z.ZodType<any, any>>
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
extends Omit<PropsWithoutRef<React.JSX.IntrinsicElements["form"]>, "onSubmit"> {
/** All your form fields */
children?: ReactNode
/** Text to display in the submit button */
Expand Down
5 changes: 3 additions & 2 deletions apps/next13/src/core/components/LabeledTextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import {forwardRef, PropsWithoutRef, ComponentPropsWithoutRef} from "react"
import {useFormContext} from "react-hook-form"
import {ErrorMessage} from "@hookform/error-message"

export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
export interface LabeledTextFieldProps
extends PropsWithoutRef<React.JSX.IntrinsicElements["input"]> {
/** Field name. */
name: string
/** Field label. */
label: string
/** Field type. Doesn't include radio buttons and checkboxes */
type?: "text" | "password" | "email" | "number"
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
labelProps?: ComponentPropsWithoutRef<"label">
}

Expand Down
11 changes: 5 additions & 6 deletions apps/toolkit-app-passportjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,22 @@
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.1",
"blitz": "2.1.3",
"next": "14.2.15",
"next": "15.0.1",
"openid-client": "5.2.1",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "rc",
"react-dom": "rc",
"react-hook-form": "7.39.1",
"ts-node": "10.9.1",
"zod": "3.23.8"
},
"devDependencies": {
"@next/bundle-analyzer": "12.0.8",
"@testing-library/react": "13.4.0",
"@testing-library/react-hooks": "8.0.1",
"@testing-library/react": "16.0.1",
"@types/jest": "29.2.2",
"@types/node": "18.11.9",
"@types/preview-email": "2.0.1",
"@types/react": "18.0.25",
"@types/react": "npm:types-react@rc",
"@typescript-eslint/eslint-plugin": "5.42.1",
"eslint": "8.27.0",
"eslint-config-next": "12.3.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/toolkit-app-passportjs/src/core/components/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod"
import { z } from "zod"

export interface FormProps<S extends z.ZodType<any, any>>
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
extends Omit<PropsWithoutRef<React.JSX.IntrinsicElements["form"]>, "onSubmit"> {
/** All your form fields */
children?: ReactNode
/** Text to display in the submit button */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { forwardRef, PropsWithoutRef, ComponentPropsWithoutRef } from "react"
import { useFormContext } from "react-hook-form"
import { ErrorMessage } from "@hookform/error-message"

export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
export interface LabeledTextFieldProps
extends PropsWithoutRef<React.JSX.IntrinsicElements["input"]> {
/** Field name. */
name: string
/** Field label. */
label: string
/** Field type. Doesn't include radio buttons and checkboxes */
type?: "text" | "password" | "email" | "number"
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
labelProps?: ComponentPropsWithoutRef<"label">
}

Expand Down
2 changes: 1 addition & 1 deletion apps/toolkit-app/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
11 changes: 5 additions & 6 deletions apps/toolkit-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,22 @@
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.1",
"blitz": "2.1.3",
"next": "14.2.15",
"next": "15.0.1",
"next-auth": "4.24.7",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "rc",
"react-dom": "rc",
"react-hook-form": "7.39.1",
"ts-node": "10.9.1",
"zod": "3.23.8"
},
"devDependencies": {
"@next/bundle-analyzer": "12.0.8",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "13.4.0",
"@testing-library/react-hooks": "8.0.1",
"@testing-library/react": "16.0.1",
"@types/node": "18.11.9",
"@types/preview-email": "2.0.1",
"@types/react": "18.0.25",
"@types/react": "npm:types-react@rc",
"@typescript-eslint/eslint-plugin": "5.42.1",
"@vitejs/plugin-react": "2.2.0",
"eslint": "8.27.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/toolkit-app/src/core/components/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod"
import { z } from "zod"

export interface FormProps<S extends z.ZodType<any, any>>
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
extends Omit<PropsWithoutRef<React.JSX.IntrinsicElements["form"]>, "onSubmit"> {
/** All your form fields */
children?: ReactNode
/** Text to display in the submit button */
Expand Down
5 changes: 3 additions & 2 deletions apps/toolkit-app/src/core/components/LabelSelectField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { ComponentPropsWithoutRef, forwardRef, PropsWithoutRef } from "react"
import { useFormContext } from "react-hook-form"
import { ErrorMessage } from "@hookform/error-message"

export interface LabeledSelectFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["select"]> {
export interface LabeledSelectFieldProps
extends PropsWithoutRef<React.JSX.IntrinsicElements["select"]> {
/** Field name. */
name: string
/** Field label. */
label: string
/** Field type. Doesn't include radio buttons and checkboxes */
options: any[]
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
labelProps?: ComponentPropsWithoutRef<"label">
}

Expand Down
5 changes: 3 additions & 2 deletions apps/toolkit-app/src/core/components/LabeledTextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { forwardRef, PropsWithoutRef, ComponentPropsWithoutRef } from "react"
import { useFormContext } from "react-hook-form"
import { ErrorMessage } from "@hookform/error-message"

export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
export interface LabeledTextFieldProps
extends PropsWithoutRef<React.JSX.IntrinsicElements["input"]> {
/** Field name. */
name: string
/** Field label. */
label: string
/** Field type. Doesn't include radio buttons and checkboxes */
type?: "text" | "password" | "email" | "number"
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
labelProps?: ComponentPropsWithoutRef<"label">
}

Expand Down
8 changes: 4 additions & 4 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
"blitz": "2.1.3",
"jest": "29.3.0",
"jest-environment-jsdom": "29.3.0",
"next": "14.2.15",
"next": "15.0.1",
"passport-mock-strategy": "2.0.0",
"passport-twitter": "1.0.4",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "rc",
"react-dom": "rc",
"ts-node": "10.9.1"
},
"devDependencies": {
"@next/bundle-analyzer": "12.0.8",
"@types/react": "18.0.25",
"@types/react": "npm:types-react@rc",
"eslint": "8.27.0",
"typescript": "^4.8.4"
}
Expand Down
11 changes: 5 additions & 6 deletions integration-tests/auth-with-rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,21 @@
"@prisma/client": "4.6.1",
"blitz": "2.1.3",
"delay": "5.0.0",
"next": "14.2.15",
"next": "15.0.1",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "rc",
"react-dom": "rc",
"react-hook-form": "7.39.1",
"ts-node": "10.9.1",
"zod": "3.23.8"
},
"devDependencies": {
"@next/bundle-analyzer": "12.0.8",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "13.4.0",
"@testing-library/react-hooks": "8.0.1",
"@testing-library/react": "16.0.1",
"@types/node": "18.11.9",
"@types/preview-email": "2.0.1",
"@types/react": "18.0.25",
"@types/react": "npm:types-react@rc",
"@typescript-eslint/eslint-plugin": "5.42.1",
"@vitejs/plugin-react": "2.2.0",
"eslint": "8.27.0",
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"@prisma/client": "4.6.1",
"blitz": "2.1.3",
"lowdb": "3.0.0",
"next": "14.2.15",
"next": "15.0.1",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "rc",
"react-dom": "rc",
"secure-password": "4.0.0",
"wait-port": "1.0.4"
},
Expand All @@ -36,7 +36,7 @@
"@types/fs-extra": "9.0.13",
"@types/node": "18.7.13",
"@types/node-fetch": "2.6.1",
"@types/react": "18.0.25",
"@types/react": "npm:types-react@rc",
"b64-lite": "1.4.0",
"eslint": "8.27.0",
"fs-extra": "10.0.1",
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/get-initial-props/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
"@prisma/client": "4.6.1",
"blitz": "2.1.3",
"lowdb": "2.1.0",
"next": "14.2.15",
"next": "15.0.1",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0"
"react": "rc",
"react-dom": "rc"
},
"devDependencies": {
"@blitzjs/config": "2.1.3",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",
"@types/node-fetch": "2.6.1",
"@types/react": "18.0.25",
"@types/react": "npm:types-react@rc",
"b64-lite": "1.4.0",
"eslint": "8.27.0",
"fs-extra": "10.0.1",
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
"@blitzjs/next": "2.1.3",
"@blitzjs/rpc": "2.1.3",
"blitz": "2.1.3",
"next": "14.2.15",
"react": "18.2.0",
"react-dom": "18.2.0"
"next": "15.0.1",
"react": "rc",
"react-dom": "rc"
},
"devDependencies": {
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",
"@types/node-fetch": "2.6.1",
"@types/react": "18.0.25",
"@types/react": "npm:types-react@rc",
"eslint": "8.27.0",
"fs-extra": "10.0.1",
"get-port": "6.1.2",
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/next-13-app-dir/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
8 changes: 4 additions & 4 deletions integration-tests/next-13-app-dir/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"@prisma/client": "4.6.1",
"blitz": "2.1.3",
"lowdb": "2.1.0",
"next": "14.2.15",
"next": "15.0.1",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "rc",
"react-dom": "rc",
"secure-password": "4.0.0",
"wait-port": "1.0.4"
},
Expand All @@ -37,7 +37,7 @@
"@types/fs-extra": "9.0.13",
"@types/node": "18.7.13",
"@types/node-fetch": "2.6.1",
"@types/react": "18.0.25",
"@types/react": "npm:types-react@rc",
"b64-lite": "1.4.0",
"eslint": "8.27.0",
"fs-extra": "10.0.1",
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/no-suspense/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
"@prisma/client": "4.6.1",
"blitz": "2.1.3",
"lowdb": "3.0.0",
"next": "14.2.15",
"next": "15.0.1",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0"
"react": "rc",
"react-dom": "rc"
},
"devDependencies": {
"@blitzjs/config": "2.1.3",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",
"@types/node-fetch": "2.6.1",
"@types/react": "18.0.25",
"@types/react": "npm:types-react@rc",
"b64-lite": "1.4.0",
"eslint": "8.27.0",
"fs-extra": "10.0.1",
Expand Down
10 changes: 5 additions & 5 deletions integration-tests/qm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"@prisma/client": "4.6.1",
"@tanstack/react-query": "4.0.10",
"blitz": "2.1.3",
"next": "14.2.15",
"next": "15.0.1",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0"
"react": "rc",
"react-dom": "rc"
},
"devDependencies": {
"@testing-library/react": "13.4.0",
"@types/react": "18.0.25",
"@testing-library/react": "16.0.1",
"@types/react": "npm:types-react@rc",
"@vitejs/plugin-react": "1.3.0",
"delay": "5.0.0",
"eslint": "8.27.0",
Expand Down
Loading
Loading