Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge authored Aug 19, 2024
2 parents af198f4 + ce9670a commit e6b9d97
Show file tree
Hide file tree
Showing 22 changed files with 316 additions and 493 deletions.
5 changes: 5 additions & 0 deletions .changeset/four-dolphins-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3-app": minor
---

upgrade to typescript eslint v8
5 changes: 5 additions & 0 deletions .changeset/quick-laws-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3-app": minor
---

upgrade to drizzle-orm@0.33 and corresponding drizzle-kit version
7 changes: 1 addition & 6 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ const config = {
ecmaVersion: "latest",
sourceType: "module",
tsconfigRootDir: __dirname,
project: [
"./tsconfig.json",
"./cli/tsconfig.eslint.json", // separate eslint config for the CLI since we want to lint and typecheck differently due to template files
"./upgrade/tsconfig.json",
"./www/tsconfig.json",
],
projectService: true,
},
overrides: [
// Template files don't have reliable type information
Expand Down
10 changes: 5 additions & 5 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
"devDependencies": {
"@auth/drizzle-adapter": "^1.1.0",
"@auth/prisma-adapter": "^1.6.0",
"@libsql/client": "^0.6.0",
"@planetscale/database": "^1.18.0",
"@libsql/client": "^0.9.0",
"@planetscale/database": "^1.19.0",
"@prisma/adapter-planetscale": "^5.14.0",
"@prisma/client": "^5.14.0",
"@t3-oss/env-nextjs": "^0.10.1",
Expand All @@ -77,9 +77,9 @@
"@types/fs-extra": "^11.0.4",
"@types/gradient-string": "^1.1.6",
"@types/node": "^20.14.10",
"drizzle-kit": "^0.21.4",
"drizzle-orm": "^0.30.10",
"mysql2": "^3.9.7",
"drizzle-kit": "^0.24.0",
"drizzle-orm": "^0.33.0",
"mysql2": "^3.11.0",
"next": "^14.2.4",
"next-auth": "^4.24.7",
"postgres": "^3.4.4",
Expand Down
6 changes: 3 additions & 3 deletions cli/src/helpers/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const isGitInstalled = (dir: string): boolean => {
try {
execSync("git --version", { cwd: dir });
return true;
} catch (_e) {
} catch {
return false;
}
};
Expand All @@ -31,7 +31,7 @@ export const isInsideGitRepo = async (dir: string): Promise<boolean> => {
stdout: "ignore",
});
return true;
} catch (_e) {
} catch {
// Else, it will throw a git-error and we return false
return false;
}
Expand Down Expand Up @@ -125,7 +125,7 @@ export const initializeGit = async (projectDir: string) => {
"git"
)}\n`
);
} catch (error) {
} catch {
// Safeguard, should be unreachable
spinner.fail(
`${chalk.bold.red(
Expand Down
4 changes: 3 additions & 1 deletion cli/src/helpers/logNextSteps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export const logNextSteps = async ({
const pkgManager = getUserPkgManager();

logger.info("Next steps:");
projectName !== "." && logger.info(` cd ${projectName}`);
if (projectName !== ".") {
logger.info(` cd ${projectName}`);
}
if (noInstall) {
// To reflect yarn's default behavior of installing packages when no additional args provided
if (pkgManager === "yarn") {
Expand Down
4 changes: 3 additions & 1 deletion cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ const main = async () => {
const npmVersion = await getNpmVersion();
const pkgManager = getUserPkgManager();
renderTitle();
npmVersion && renderVersionWarning(npmVersion);
if (npmVersion) {
renderVersionWarning(npmVersion);
}

const {
appName,
Expand Down
10 changes: 5 additions & 5 deletions cli/src/installers/dependencyVersionMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ export const dependencyVersionMap = {
"@prisma/adapter-planetscale": "^5.14.0",

// Drizzle
"drizzle-orm": "^0.30.10",
"drizzle-kit": "^0.21.4",
"drizzle-kit": "^0.24.0",
"drizzle-orm": "^0.33.0",
"eslint-plugin-drizzle": "^0.2.3",
mysql2: "^3.9.7",
"@planetscale/database": "^1.18.0",
mysql2: "^3.11.0",
"@planetscale/database": "^1.19.0",
postgres: "^3.4.4",
"@libsql/client": "^0.6.0",
"@libsql/client": "^0.9.0",

// TailwindCSS
tailwindcss: "^3.4.3",
Expand Down
2 changes: 2 additions & 0 deletions cli/src/utils/renderVersionWarning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ function checkForLatestVersion(): Promise<string> {
resolve((JSON.parse(body) as DistTagsBody).latest);
});
} else {
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
reject();
}
}
)
.on("error", () => {
// logger.error("Unable to check for latest version.");
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
reject();
});
});
Expand Down
4 changes: 2 additions & 2 deletions cli/template/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"@types/node": "^20.14.10",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"@typescript-eslint/eslint-plugin": "^8.1.0",
"@typescript-eslint/parser": "^8.1.0",
"eslint": "^8.57.0",
"eslint-config-next": "^14.2.4",
"typescript": "^5.5.3"
Expand Down
4 changes: 0 additions & 4 deletions cli/tsconfig.eslint.json

This file was deleted.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"@total-typescript/ts-reset": "^0.3.7",
"@types/eslint": "^8.56.10",
"@types/node": "^20.14.10",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@typescript-eslint/eslint-plugin": "^8.1.0",
"@typescript-eslint/parser": "^8.1.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
Expand All @@ -63,5 +63,9 @@
"prettier": "^3.3.2",
"turbo": "1.13.3-canary.3",
"typescript": "^5.5.3"
},
"resolutions": {
"@typescript-eslint/eslint-plugin": "8.1.0",
"@typescript-eslint/parser": "8.1.0"
}
}
Loading

0 comments on commit e6b9d97

Please sign in to comment.