Skip to content

Commit

Permalink
chore: bump to react 19 (trpc#6296)
Browse files Browse the repository at this point in the history
  • Loading branch information
KATT authored Dec 7, 2024
1 parent 55743e0 commit 74625d5
Show file tree
Hide file tree
Showing 46 changed files with 1,022 additions and 1,135 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release-tmp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release "@tmp"-tagged packages

on:
push:
branches:
# Replace this with the branch you want to release from
# 👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇👇
- '12-06-react'
# 👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆
paths:
- '.github/setup/*'
- '.github/workflows/release-tmp.yml'
- 'packages/**'
- '!packages/**/package.json'
- '!packages/test/**'

jobs:
publish:
timeout-minutes: 10
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}

runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/setup

- name: Check version
run: |
if [[ $(node -p "require('./packages/server/package.json').version.startsWith('10.')") != true ]]; then
echo "Error: The version in packages/server/package.json must start with '10.'"
exit 1
fi
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > $HOME/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: pnpm lerna publish --force-publish --canary major --preid "alpha-tmp-$(pnpm --silent current-branch)" --dist-tag tmp --yes
10 changes: 5 additions & 5 deletions examples/.experimental/next-app-dir/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"@trpc/react-query": "npm:@trpc/react-query@next",
"@trpc/server": "npm:@trpc/server@next",
"@types/node": "^22.9.0",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"next": "^15.0.4",
"next-auth": "5.0.0-beta.25",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.53.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-hook-form": "^7.53.2",
"react-hot-toast": "^2.4.1",
"server-only": "^0.0.1",
"superjson": "^1.12.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export function AddPostForm() {
.promise(promise, {
loading: 'Adding post...',
success: 'Post added!',
error: (error) => 'Failed to add post: ' + error.message,
error: (error: unknown) =>
'Failed to add post: ' + (error as Error).message,
})
.catch((error) => {
console.warn('Failed to add post', error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function FormWithUseActionExample() {
<>
<p>Check the console for the logger output.</p>
<form
action={testAction}
action={testAction as any}
onSubmit={(e) => {
e.preventDefault();
const formData = new FormData(e.currentTarget);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function RawFormExample() {
If you don not pass an input, it will fail validation and not reach the
procedure.
</p>
<form action={testAction}>
<form action={testAction as any}>
<input type="text" name="text" />
<button type="submit">Run server action raw debugging</button>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function ReactHookFormExample() {
<p>Check the console for the logger output.</p>
<FormProvider {...form}>
<form
action={rhfAction}
action={rhfAction as any}
ref={formRef}
onSubmit={form.handleSubmit(async () => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function createForm<TDef extends ActionHandlerDef>(opts: {
<FormProvider {...hook}>
<form
{...passThrough}
action={opts.action}
action={opts.action as any}
ref={ref}
onSubmit={hook.handleSubmit(() =>
action.mutateAsync(new FormData(ref.current!) as any),
Expand Down
8 changes: 4 additions & 4 deletions examples/.test/diagnostics-big-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
"@trpc/react-query": "npm:@trpc/react-query@next",
"@trpc/server": "npm:@trpc/server@next",
"next": "^15.0.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^3.0.0"
},
"devDependencies": {
"@types/node": "^22.9.0",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^9.13.0",
"tsx": "^4.0.0",
"typescript": "^5.6.2"
Expand Down
10 changes: 5 additions & 5 deletions examples/.test/ssg-infinite-serialization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
"@tanstack/react-query": "^5.59.15",
"@trpc/client": "^10.35.0",
"@trpc/next": "^10.35.0",
"@trpc/react-query": "^10.35.0",
"@trpc/react-query": "npm:@trpc/react-query@next",
"@trpc/server": "^10.35.0",
"next": "^15.0.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^3.0.0"
},
"devDependencies": {
"@playwright/test": "^1.26.1",
"@types/node": "^22.9.0",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^9.13.0",
"start-server-and-test": "^1.12.0",
"typescript": "^5.6.2"
Expand Down
8 changes: 4 additions & 4 deletions examples/.test/ssg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"@trpc/react-query": "npm:@trpc/react-query@next",
"@trpc/server": "npm:@trpc/server@next",
"next": "^15.0.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"superjson": "^1.12.4",
"zod": "^3.0.0"
},
"devDependencies": {
"@playwright/test": "^1.26.1",
"@types/node": "^22.9.0",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^9.13.0",
"start-server-and-test": "^1.12.0",
"typescript": "^5.6.2"
Expand Down
2 changes: 1 addition & 1 deletion examples/express-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"devDependencies": {
"@types/express": "^4.17.17",
"@types/node": "^22.9.0",
"@types/react": "^18.3.1",
"@types/react": "^19.0.0",
"esbuild": "^0.17.10",
"eslint": "^9.13.0",
"npm-run-all": "^4.1.5",
Expand Down
2 changes: 1 addition & 1 deletion examples/express-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"devDependencies": {
"@types/express": "^4.17.17",
"@types/node": "^22.9.0",
"@types/react": "^18.3.1",
"@types/react": "^19.0.0",
"esbuild": "^0.17.10",
"eslint": "^9.13.0",
"npm-run-all": "^4.1.5",
Expand Down
10 changes: 5 additions & 5 deletions examples/minimal-content-types/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"@trpc/client": "npm:@trpc/client@next",
"@trpc/react-query": "npm:@trpc/react-query@next",
"@trpc/server": "npm:@trpc/server@next",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.13.0",
"typescript": "^5.7.0",
"vite": "^5.3.4"
Expand Down
10 changes: 5 additions & 5 deletions examples/minimal-react/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"@trpc/client": "npm:@trpc/client@next",
"@trpc/react-query": "npm:@trpc/react-query@next",
"@trpc/server": "npm:@trpc/server@next",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.13.0",
"typescript": "^5.7.0",
"vite": "^5.3.4"
Expand Down
8 changes: 4 additions & 4 deletions examples/next-big-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"@trpc/react-query": "npm:@trpc/react-query@next",
"@trpc/server": "npm:@trpc/server@next",
"next": "^15.0.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^3.0.0"
},
"devDependencies": {
"@types/node": "^22.9.0",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^9.13.0",
"tsx": "^4.0.0",
"typescript": "^5.6.2"
Expand Down
8 changes: 4 additions & 4 deletions examples/next-edge-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"@trpc/react-query": "npm:@trpc/react-query@next",
"@trpc/server": "npm:@trpc/server@next",
"next": "^15.0.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^3.0.0"
},
"devDependencies": {
"@types/node": "^22.9.0",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^9.13.0",
"typescript": "^5.6.2"
}
Expand Down
10 changes: 5 additions & 5 deletions examples/next-formdata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
"@trpc/react-query": "npm:@trpc/react-query@next",
"@trpc/server": "npm:@trpc/server@next",
"next": "^15.0.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.53.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-hook-form": "^7.53.2",
"zod": "^3.0.0",
"zod-form-data": "^2.0.1"
},
"devDependencies": {
"@types/node": "^22.9.0",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^9.13.0",
"typescript": "^5.6.2"
}
Expand Down
8 changes: 4 additions & 4 deletions examples/next-minimal-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"@trpc/react-query": "npm:@trpc/react-query@next",
"@trpc/server": "npm:@trpc/server@next",
"next": "^15.0.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^3.0.0"
},
"devDependencies": {
"@types/node": "^22.9.0",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^9.13.0",
"typescript": "^5.6.2"
}
Expand Down
8 changes: 4 additions & 4 deletions examples/next-prisma-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@
"@trpc/server": "npm:@trpc/server@next",
"clsx": "^2.0.0",
"next": "^15.0.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"superjson": "^1.12.4",
"zod": "^3.0.0"
},
"devDependencies": {
"@playwright/test": "^1.26.1",
"@types/node": "^22.9.0",
"@types/react": "^18.3.1",
"@types/react": "^19.0.0",
"autoprefixer": "^10.4.7",
"dotenv": "^16.0.1",
"eslint": "^9.13.0",
"eslint-config-next": "^15.0.2",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-hooks": "^5.1.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.39",
"prettier": "^3.3.3",
Expand Down
15 changes: 0 additions & 15 deletions examples/next-prisma-todomvc/next-i18next.config.js

This file was deleted.

4 changes: 0 additions & 4 deletions examples/next-prisma-todomvc/next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
const { i18n } = require('./next-i18next.config');

/** @type {import("next").NextConfig} */
const config = {
i18n,

async redirects() {
return [
{
Expand Down
9 changes: 3 additions & 6 deletions examples/next-prisma-todomvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@
"@trpc/react-query": "npm:@trpc/react-query@next",
"@trpc/server": "npm:@trpc/server@next",
"clsx": "^2.0.0",
"i18next": "^22.4.13",
"next": "^15.0.4",
"next-i18next": "^13.2.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-i18next": "^12.2.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"superjson": "^1.12.4",
"todomvc-app-css": "^2.3.0",
"todomvc-common": "^1.0.5",
Expand All @@ -43,7 +40,7 @@
"@playwright/test": "^1.26.1",
"@tanstack/react-query-devtools": "^5.59.15",
"@types/node": "^22.9.0",
"@types/react": "^18.3.1",
"@types/react": "^19.0.0",
"eslint": "^9.13.0",
"npm-run-all": "^4.1.5",
"prisma": "^5.12.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- RenameIndex
ALTER INDEX "Task.createdAt_unique" RENAME TO "Task_createdAt_key";
Loading

0 comments on commit 74625d5

Please sign in to comment.