Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ssijak authored Dec 25, 2023
2 parents 41a5df1 + 2413e72 commit 7e7da5e
Show file tree
Hide file tree
Showing 22 changed files with 632 additions and 74 deletions.
22 changes: 22 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## 7.25.0

### Minor Changes

- [#1702](https://github.com/t3-oss/create-t3-app/pull/1702) [`62fa8dc`](https://github.com/t3-oss/create-t3-app/commit/62fa8dcad2e0d3d6bad04bb6167d7580a754049c) Thanks [@c-ehrlich](https://github.com/c-ehrlich)! - update drizzle-kit and change connectionString to uri

### Patch Changes

- [#1690](https://github.com/t3-oss/create-t3-app/pull/1690) [`6efb99a`](https://github.com/t3-oss/create-t3-app/commit/6efb99a94f29d28243fa7c625b099995e84e4db2) Thanks [@c-ehrlich](https://github.com/c-ehrlich)! - fix typo in env.mjs

## 7.24.2

### Patch Changes

- [#1687](https://github.com/t3-oss/create-t3-app/pull/1687) [`6461090`](https://github.com/t3-oss/create-t3-app/commit/6461090a029dd2094065493e513a289a1b414673) Thanks [@sinasab](https://github.com/sinasab)! - chore: reuse existing AppRouter type #1687

## 7.24.1

### Patch Changes

- [#1673](https://github.com/t3-oss/create-t3-app/pull/1673) [`b80188e`](https://github.com/t3-oss/create-t3-app/commit/b80188eaecc64e564909ed7ee566790f5e56e59f) Thanks [@ahkhanjani](https://github.com/ahkhanjani)! - fix: Use the correct types for `prettier-plugin-tailwindcss`

## 7.24.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-t3-app",
"version": "7.24.0",
"version": "7.25.0",
"description": "Create web application with the t3 stack",
"license": "MIT",
"repository": {
Expand Down Expand Up @@ -76,7 +76,7 @@
"@types/gradient-string": "^1.1.2",
"@types/inquirer": "^9.0.3",
"@types/node": "^18.17.0",
"drizzle-kit": "^0.19.13",
"drizzle-kit": "^0.20.7",
"drizzle-orm": "^0.28.5",
"next": "^14.0.3",
"next-auth": "^4.24.5",
Expand Down
2 changes: 1 addition & 1 deletion cli/prettier.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import baseConfig from "../prettier.config.mjs";

/**
* @type {import('prettier').Config & import('prettier-plugin-tailwindcss').options &
* @type {import('prettier').Config & import('prettier-plugin-tailwindcss').PluginOptions &
* import("@ianvs/prettier-plugin-sort-imports").PluginConfig}
*/
const config = {
Expand Down
2 changes: 1 addition & 1 deletion cli/src/installers/dependencyVersionMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const dependencyVersionMap = {

// Drizzle
"drizzle-orm": "^0.28.5",
"drizzle-kit": "^0.19.3",
"drizzle-kit": "^0.20.7",
"dotenv-cli": "^7.3.0",
mysql2: "^3.6.1",
"@planetscale/database": "^1.11.0",
Expand Down
2 changes: 1 addition & 1 deletion cli/template/extras/config/_prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @type {import('prettier').Config & import('prettier-plugin-tailwindcss').options} */
/** @type {import('prettier').Config & import('prettier-plugin-tailwindcss').PluginOptions} */
const config = {
plugins: ["prettier-plugin-tailwindcss"],
};
Expand Down
2 changes: 1 addition & 1 deletion cli/template/extras/config/drizzle.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
schema: "./src/server/db/schema.ts",
driver: "mysql2",
dbCredentials: {
connectionString: env.DATABASE_URL,
uri: env.DATABASE_URL,
},
tablesFilter: ["project1_*"],
} satisfies Config;
5 changes: 2 additions & 3 deletions cli/template/extras/src/env/with-auth-db.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export const env = createEnv({
// VERCEL_URL doesn't include `https` so it cant be validated as a URL
process.env.VERCEL ? z.string() : z.string().url()
),
// Add ` on ID and SECRET if you want to make sure they're not empty
DISCORD_CLIENT_ID: z.string(),
DISCORD_CLIENT_SECRET: z.string(),
},
Expand Down Expand Up @@ -60,8 +59,8 @@ export const env = createEnv({
*/
skipValidation: !!process.env.SKIP_ENV_VALIDATION,
/**
* Makes it so that empty strings are treated as undefined.
* `SOME_VAR: z.string()` and `SOME_VAR=''` will throw an error.
* Makes it so that empty strings are treated as undefined. `SOME_VAR: z.string()` and
* `SOME_VAR=''` will throw an error.
*/
emptyStringAsUndefined: true,
});
9 changes: 4 additions & 5 deletions cli/template/extras/src/env/with-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const env = createEnv({
// VERCEL_URL doesn't include `https` so it cant be validated as a URL
process.env.VERCEL ? z.string() : z.string().url()
),
// Add ` on ID and SECRET if you want to make sure they're not empty
DISCORD_CLIENT_ID: z.string(),
DISCORD_CLIENT_SECRET: z.string(),
},
Expand All @@ -48,13 +47,13 @@ export const env = createEnv({
// NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR,
},
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation.
* This is especially useful for Docker builds.
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially
* useful for Docker builds.
*/
skipValidation: !!process.env.SKIP_ENV_VALIDATION,
/**
* Makes it so that empty strings are treated as undefined.
* `SOME_VAR: z.string()` and `SOME_VAR=''` will throw an error.
* Makes it so that empty strings are treated as undefined. `SOME_VAR: z.string()` and
* `SOME_VAR=''` will throw an error.
*/
emptyStringAsUndefined: true,
});
4 changes: 2 additions & 2 deletions cli/template/extras/src/trpc/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { type TRPCErrorResponse } from "@trpc/server/rpc";
import { cookies } from "next/headers";
import { cache } from "react";

import { appRouter } from "~/server/api/root";
import { appRouter, type AppRouter } from "~/server/api/root";
import { createTRPCContext } from "~/server/api/trpc";
import { transformer } from "./shared";

Expand All @@ -28,7 +28,7 @@ const createContext = cache(() => {
});
});

export const api = createTRPCProxyClient<typeof appRouter>({
export const api = createTRPCProxyClient<AppRouter>({
transformer,
links: [
loggerLink({
Expand Down
Loading

0 comments on commit 7e7da5e

Please sign in to comment.