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: upgrade dependencies #324

Merged
merged 2 commits into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions packages/create-bison-app/template/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -49,42 +49,42 @@
"watch:ts": "yarn dev:typecheck --watch"
},
"dependencies": {
"@next-auth/prisma-adapter": "^1.0.6",
"@prisma/client": "^4.12.0",
"@radix-ui/react-label": "^2.0.1",
"@radix-ui/react-navigation-menu": "^1.1.2",
"@radix-ui/react-toast": "^1.1.3",
"@tanstack/react-query": "^4.28.0",
"@tanstack/react-query-devtools": "^4.29.0",
"@trpc/client": "^10.19.1",
"@trpc/next": "^10.19.1",
"@trpc/react-query": "^10.19.1",
"@trpc/server": "^10.19.1",
"@next-auth/prisma-adapter": "^1.0.7",
"@prisma/client": "^5.1.1",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-navigation-menu": "^1.1.3",
"@radix-ui/react-toast": "^1.1.4",
"@tanstack/react-query": "^4.32.6",
"@tanstack/react-query-devtools": "^4.32.6",
"@trpc/client": "^10.37.1",
"@trpc/next": "^10.37.1",
"@trpc/react-query": "^10.37.1",
"@trpc/server": "^10.37.1",
"bcryptjs": "^2.4.3",
"class-variance-authority": "^0.5.1",
"clsx": "^1.2.1",
"cross-fetch": "3.1.5",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cross-fetch": "4.0.0",
"i18next": "^22.4.14",
"i18next-http-backend": "^2.2.0",
"lucide-react": "^0.130.1",
"next": "13.3.0",
"next-auth": "^4.21.1",
"next": "13.4.18",
"next-auth": "^4.23.1",
"next-i18next": "^13.2.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.43.9",
"react-hook-form": "^7.45.4",
"react-i18next": "^12.0.0",
"react-error-boundary": "^4.0.3",
"superjson": "^1.12.2",
"tailwind-merge": "^1.12.0",
"tailwindcss-animate": "^1.0.5",
"universal-cookie": "^4.0.4",
"zod": "^3.21.4"
"superjson": "^1.13.1",
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.6",
"universal-cookie": "^5.0.0",
"zod": "^3.22.1"
},
"devDependencies": {
"@playwright/test": "^1.36.0",
"@swc/jest": "^0.2.24",
"@testing-library/dom": "^9.2.0",
"@playwright/test": "^1.37.1",
"@swc/jest": "^0.2.29",
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
Expand All @@ -95,11 +95,11 @@
"@types/pg": "^8.6.6",
"@types/react": "^18.0.33",
"@vercel/node": "^2.10.2",
"autoprefixer": "^10.4.14",
"autoprefixer": "^10.4.15",
"chance": "^1.1.11",
"commander": "^10.0.0",
"cross-env": "^7.0.3",
"dotenv-cli": "^7.2.1",
"dotenv-cli": "^7.3.0",
"eslint": "^8.37.0",
"eslint-config-next": "^13.3.0",
"eslint-plugin-echobind": "^0.3.0",
Expand All @@ -114,15 +114,15 @@
"lint-staged": "^13.2.1",
"nanoid": "^3.3.6",
"pg": "^8.10.0",
"postcss": "^8.4.21",
"postcss": "^8.4.28",
"prettier": "^2.8.7",
"prisma": "^4.12.0",
"prisma": "^5.1.1",
"start-server-and-test": "^2.0.0",
"tailwindcss": "^3.3.1",
"tailwindcss": "^3.3.3",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.0.3"
"typescript": "^5.1.6"
},
"bison": {
"version": "<%= bisonVersion %>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const userRouter = t.router({
.input(z.object({ id: z.string().optional(), email: z.string().optional() }).optional())
.query(({ ctx, input }) => ctx.db.user.findMany({ where: input, select: defaultUserSelect })),
find: t.procedure
.input(z.object({ id: z.string().optional(), email: z.string().optional() }))
.input(z.union([z.object({ id: z.string() }), z.object({ email: z.string() })]))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change requires either the id or email to be given.

Fixes this error after upgrading Prisma:
Screen Shot 2023-08-18 at 4 17 10 PM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of z.union

.query(async ({ ctx, input }) => {
const user = await ctx.db.user.findUniqueOrThrow({
where: input,
Expand Down