From 54dfbe9b6106d64b053d1b752d7c25f134fe7cdc Mon Sep 17 00:00:00 2001 From: Matt Pocock Date: Wed, 8 Nov 2023 15:11:49 +0000 Subject: [PATCH 1/3] More changes to tsconfig.json Updated to follow recommendations from https://www.totaltypescript.com/tsconfig-cheat-sheet --- cli/template/base/tsconfig.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/template/base/tsconfig.json b/cli/template/base/tsconfig.json index 1dfa3a89d1..6424e89527 100644 --- a/cli/template/base/tsconfig.json +++ b/cli/template/base/tsconfig.json @@ -1,18 +1,18 @@ { "compilerOptions": { - "target": "es2017", + "target": "es2022", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "checkJs": true, "skipLibCheck": true, "strict": true, - "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", - "moduleResolution": "node", + "moduleResolution": "Bundler", "resolveJsonModule": true, "isolatedModules": true, + "moduleDetection": "force", "jsx": "preserve", "incremental": true, "noUncheckedIndexedAccess": true, From 84407fafa8ab89f393156c3b04bfb1058f54bd5c Mon Sep 17 00:00:00 2001 From: juliusmarminge Date: Wed, 8 Nov 2023 17:42:41 +0100 Subject: [PATCH 2/3] version bumps --- cli/package.json | 4 +-- cli/src/installers/dependencyVersionMap.ts | 4 +-- pnpm-lock.yaml | 38 +++++++++++----------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/cli/package.json b/cli/package.json index cb7bbf55d6..7f9379ce93 100644 --- a/cli/package.json +++ b/cli/package.json @@ -62,7 +62,7 @@ "sort-package-json": "^2.4.1" }, "devDependencies": { - "@auth/drizzle-adapter": "^0.3.2", + "@auth/drizzle-adapter": "^0.3.5", "@next-auth/prisma-adapter": "^1.0.7", "@planetscale/database": "^1.11.0", "@prisma/client": "^5.1.1", @@ -79,7 +79,7 @@ "drizzle-kit": "^0.19.13", "drizzle-orm": "^0.28.5", "next": "^14.0.0", - "next-auth": "^4.23.1", + "next-auth": "^4.24.4", "prettier": "^3.0.0", "prettier-plugin-tailwindcss": "^0.5.1", "prisma": "^4.14.0", diff --git a/cli/src/installers/dependencyVersionMap.ts b/cli/src/installers/dependencyVersionMap.ts index 7bfff4f9ce..e12459cd2d 100644 --- a/cli/src/installers/dependencyVersionMap.ts +++ b/cli/src/installers/dependencyVersionMap.ts @@ -4,9 +4,9 @@ */ export const dependencyVersionMap = { // NextAuth.js - "next-auth": "^4.23.0", + "next-auth": "^4.24.4", "@next-auth/prisma-adapter": "^1.0.7", - "@auth/drizzle-adapter": "^0.3.2", + "@auth/drizzle-adapter": "^0.3.5", // Prisma prisma: "^5.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da251cecaf..25281052fa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,9 +1,5 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - importers: .: @@ -100,11 +96,11 @@ importers: version: 2.4.1 devDependencies: '@auth/drizzle-adapter': - specifier: ^0.3.2 - version: 0.3.2 + specifier: ^0.3.5 + version: 0.3.5 '@next-auth/prisma-adapter': specifier: ^1.0.7 - version: 1.0.7(@prisma/client@5.1.1)(next-auth@4.23.1) + version: 1.0.7(@prisma/client@5.1.1)(next-auth@4.24.4) '@planetscale/database': specifier: ^1.11.0 version: 1.11.0 @@ -151,8 +147,8 @@ importers: specifier: ^14.0.0 version: 14.0.0(@babel/core@7.22.9)(react-dom@18.2.0)(react@18.2.0) next-auth: - specifier: ^4.23.1 - version: 4.23.1(next@14.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^4.24.4 + version: 4.24.4(next@14.0.0)(react-dom@18.2.0)(react@18.2.0) prettier: specifier: ^3.0.0 version: 3.0.0 @@ -795,8 +791,8 @@ packages: dependencies: undici: 5.22.1 - /@auth/core@0.12.0: - resolution: {integrity: sha512-XYipdAc/nKu014VOgpcPyLlj1ghWlnwyloaB1UjQd9ElZRZQ9YpSizzXGLON23t/a0FyabOBBl0/awD2tW58Rg==} + /@auth/core@0.18.0: + resolution: {integrity: sha512-Xb41H3FIv4PlTZmwoFvntaNlVTwIqFxIg7i0/ieHOOxf/7H8EJpGTWoNrqKhwMyZEPU6fHp+VcUiqdX3vFrWSg==} peerDependencies: nodemailer: ^6.8.0 peerDependenciesMeta: @@ -811,10 +807,10 @@ packages: preact-render-to-string: 5.2.3(preact@10.11.3) dev: true - /@auth/drizzle-adapter@0.3.2: - resolution: {integrity: sha512-fHfzwaTomm/RKgFKBO5AJ8JTfR44rX1KX2ASaKRk+4jvVhDh9FCir5BV1Fv68b5ay7XBo9DtcNSQuZp4hbpLYw==} + /@auth/drizzle-adapter@0.3.5: + resolution: {integrity: sha512-pZCnZ8vrqUD+C4uc4MiRj+Ox7NLXze6yzWHdtAgK1QMj9PgvUtBsJu02mAYJCyCchWVzdvPG25e9+B6L2mLRBg==} dependencies: - '@auth/core': 0.12.0 + '@auth/core': 0.18.0 transitivePeerDependencies: - nodemailer dev: true @@ -2154,14 +2150,14 @@ packages: - supports-color dev: false - /@next-auth/prisma-adapter@1.0.7(@prisma/client@5.1.1)(next-auth@4.23.1): + /@next-auth/prisma-adapter@1.0.7(@prisma/client@5.1.1)(next-auth@4.24.4): resolution: {integrity: sha512-Cdko4KfcmKjsyHFrWwZ//lfLUbcLqlyFqjd/nYE2m3aZ7tjMNUjpks47iw7NTCnXf+5UWz5Ypyt1dSs1EP5QJw==} peerDependencies: '@prisma/client': '>=2.26.0 || >=3' next-auth: ^4 dependencies: '@prisma/client': 5.1.1(prisma@4.14.0) - next-auth: 4.23.1(next@14.0.0)(react-dom@18.2.0)(react@18.2.0) + next-auth: 4.24.4(next@14.0.0)(react-dom@18.2.0)(react@18.2.0) dev: true /@next/env@14.0.0: @@ -7725,10 +7721,10 @@ packages: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: false - /next-auth@4.23.1(next@14.0.0)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-mL083z8KgRtlrIV6CDca2H1kduWJuK/3pTS0Fe2og15KOm4v2kkLGdSDfc2g+019aEBrJUT0pPW2Xx42ImN1WA==} + /next-auth@4.24.4(next@14.0.0)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-5DGffi+OpkbU62vPQIJ1z+hFnmow+ec5Qrn9m6eoglIO51m0DlrmLxBduZEwKAYDEg9k2joi1yelgmq1vqK3aQ==} peerDependencies: - next: ^12.2.5 || ^13 + next: ^12.2.5 || ^13 || ^14 nodemailer: ^6.6.5 react: ^17.0.2 || ^18 react-dom: ^17.0.2 || ^18 @@ -10716,3 +10712,7 @@ packages: /zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false From 9160955c977cdf83fcd4fff117df29ddbb0aaa71 Mon Sep 17 00:00:00 2001 From: juliusmarminge Date: Wed, 8 Nov 2023 17:54:04 +0100 Subject: [PATCH 3/3] sort it a bit --- .changeset/silver-jobs-wave.md | 5 +++++ cli/template/base/tsconfig.json | 29 ++++++++++++++++++----------- 2 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 .changeset/silver-jobs-wave.md diff --git a/.changeset/silver-jobs-wave.md b/.changeset/silver-jobs-wave.md new file mode 100644 index 0000000000..a1be60c7b4 --- /dev/null +++ b/.changeset/silver-jobs-wave.md @@ -0,0 +1,5 @@ +--- +"create-t3-app": patch +--- + +tidy up and modernize tsconfig diff --git a/cli/template/base/tsconfig.json b/cli/template/base/tsconfig.json index 6424e89527..7ad79303e8 100644 --- a/cli/template/base/tsconfig.json +++ b/cli/template/base/tsconfig.json @@ -1,26 +1,33 @@ { "compilerOptions": { + /* Base Options: */ + "esModuleInterop": true, + "skipLibCheck": true, "target": "es2022", - "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, - "checkJs": true, - "skipLibCheck": true, + "resolveJsonModule": true, + "moduleDetection": "force", + "isolatedModules": true, + + /* Strictness */ "strict": true, + "noUncheckedIndexedAccess": true, + "checkJs": true, + + /* Bundled projects */ + "lib": ["dom", "dom.iterable", "ES2022"], "noEmit": true, - "esModuleInterop": true, - "module": "esnext", + "module": "ESNext", "moduleResolution": "Bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "moduleDetection": "force", "jsx": "preserve", + "plugins": [{ "name": "next" }], "incremental": true, - "noUncheckedIndexedAccess": true, + + /* Path Aliases */ "baseUrl": ".", "paths": { "~/*": ["./src/*"] - }, - "plugins": [{ "name": "next" }] + } }, "include": [ ".eslintrc.cjs",