From e76b33cdd82dbf842258d19cafbf92c606094515 Mon Sep 17 00:00:00 2001 From: Nestor Date: Mon, 15 Jan 2024 12:06:44 +0100 Subject: [PATCH 1/3] fix: fix missuse of binary expressions --- cli/src/cli/index.ts | 4 ++-- www/src/pages/og.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/src/cli/index.ts b/cli/src/cli/index.ts index 22125f30a4..fe8c383f66 100644 --- a/cli/src/cli/index.ts +++ b/cli/src/cli/index.ts @@ -310,8 +310,8 @@ export const runCli = async (): Promise => { flags: { ...cliResults.flags, appRouter: project.appRouter ?? cliResults.flags.appRouter, - noGit: !project.git ?? cliResults.flags.noGit, - noInstall: !project.install ?? cliResults.flags.noInstall, + noGit: !project.git || cliResults.flags.noGit, + noInstall: !project.install || cliResults.flags.noInstall, importAlias: project.importAlias ?? cliResults.flags.importAlias, }, }; diff --git a/www/src/pages/og.ts b/www/src/pages/og.ts index 5f1e0c3013..66897e65e5 100644 --- a/www/src/pages/og.ts +++ b/www/src/pages/og.ts @@ -56,7 +56,7 @@ export const get: APIRoute = async (request) => { { name: "Bona Nova", data: bonaNova[400], weight: 400 }, { name: "Bona Nova", data: bonaNova[700], weight: 700 }, ], - debug: import.meta.env.DEBUG_OG === "true" ?? false, + debug: import.meta.env.DEBUG_OG === "true", }, ); From ffe811c8521d2b4fe249b2f85f3b44643730a370 Mon Sep 17 00:00:00 2001 From: Nestor Date: Mon, 15 Jan 2024 12:12:47 +0100 Subject: [PATCH 2/3] chore: add changeset --- .changeset/plenty-pears-drum.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/plenty-pears-drum.md diff --git a/.changeset/plenty-pears-drum.md b/.changeset/plenty-pears-drum.md new file mode 100644 index 0000000000..fda2fb3c2f --- /dev/null +++ b/.changeset/plenty-pears-drum.md @@ -0,0 +1,5 @@ +--- +"create-t3-app": patch +--- + +fix missuse of binary expressions From 380ea881adc6fcbb722b7cb93939aec9621e6803 Mon Sep 17 00:00:00 2001 From: Nestor Date: Mon, 15 Jan 2024 12:45:03 +0100 Subject: [PATCH 3/3] fix: type cast DrizzleAdapter due to typescript issues --- cli/template/extras/src/server/auth-app/with-drizzle.ts | 3 ++- cli/template/extras/src/server/auth-pages/with-drizzle.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/template/extras/src/server/auth-app/with-drizzle.ts b/cli/template/extras/src/server/auth-app/with-drizzle.ts index 2c82b50098..995acdc9fb 100644 --- a/cli/template/extras/src/server/auth-app/with-drizzle.ts +++ b/cli/template/extras/src/server/auth-app/with-drizzle.ts @@ -4,6 +4,7 @@ import { type DefaultSession, type NextAuthOptions, } from "next-auth"; +import { type Adapter } from "next-auth/adapters"; import DiscordProvider from "next-auth/providers/discord"; import { env } from "~/env"; @@ -46,7 +47,7 @@ export const authOptions: NextAuthOptions = { }, }), }, - adapter: DrizzleAdapter(db, mysqlTable), + adapter: DrizzleAdapter(db, mysqlTable) as Adapter, providers: [ DiscordProvider({ clientId: env.DISCORD_CLIENT_ID, diff --git a/cli/template/extras/src/server/auth-pages/with-drizzle.ts b/cli/template/extras/src/server/auth-pages/with-drizzle.ts index 02718edcf2..36214a09b2 100644 --- a/cli/template/extras/src/server/auth-pages/with-drizzle.ts +++ b/cli/template/extras/src/server/auth-pages/with-drizzle.ts @@ -5,6 +5,7 @@ import { type DefaultSession, type NextAuthOptions, } from "next-auth"; +import { type Adapter } from "next-auth/adapters"; import DiscordProvider from "next-auth/providers/discord"; import { env } from "~/env"; @@ -47,7 +48,7 @@ export const authOptions: NextAuthOptions = { }, }), }, - adapter: DrizzleAdapter(db, mysqlTable), + adapter: DrizzleAdapter(db, mysqlTable) as Adapter, providers: [ DiscordProvider({ clientId: env.DISCORD_CLIENT_ID,