Skip to content

Commit

Permalink
chore: repo maintenance, bump deps, cleanup configs (t3-oss#1144)
Browse files Browse the repository at this point in the history
* chore: remove unused eslint flat config vscode setting

* chore: clean internal package tsconfigs

* chore: consistent lib compiler option

* chore: bump deps, node and pnpm

* cleanup(ui): don't include *.ts in tsconfig

* cleanup(db): consistent script sorting

* chore: update expo build tools

* dev(validators): set emitDeclarationOnly to true

* emitDeclarationOnly for all internal packages

* remove tailwind config and deps from ui

tailwind gets compiled in the next project and autocomplete works just fine

* tailwind: don't match node_modules in ui package

* ui: export .ts files (e.g. use-toast.ts)

* ui: remove tailwind-config package

* don't specify already ignored eslint patterns

as they're already ignored in .gitignore

* clean up remains of t3-env from db

the package is not used anymore

* fix tailwind ui package pattern

* restrictEnvAccess ignore env.ts files globally

* revert all eslint configs

* fix some package eslint configs

* update deps

* do some other bumps

* put tailwind in catalog

* dedupe deps

---------

Co-authored-by: juliusmarminge <[email protected]>
  • Loading branch information
ahkhanjani and juliusmarminge authored Aug 14, 2024
1 parent dbc2144 commit 1e7110c
Show file tree
Hide file tree
Showing 29 changed files with 2,254 additions and 2,719 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.15
20.16
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
"eslint.experimental.useFlatConfig": true,
"eslint.workingDirectories": [
{ "pattern": "apps/*/" },
{ "pattern": "packages/*/" },
Expand Down
4 changes: 2 additions & 2 deletions apps/auth-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@auth/core": "0.32.0"
"@auth/core": "0.34.2"
},
"devDependencies": {
"@acme/eslint-config": "workspace:*",
"@acme/prettier-config": "workspace:*",
"@acme/tailwind-config": "workspace:*",
"@acme/tsconfig": "workspace:*",
"@types/node": "^20.14.9",
"@types/node": "^20.14.15",
"eslint": "catalog:",
"h3": "^1.12.0",
"nitropack": "^2.9.7",
Expand Down
4 changes: 2 additions & 2 deletions apps/expo/eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
},
"build": {
"base": {
"node": "20.15.0",
"pnpm": "9.6.0",
"node": "20.16.0",
"pnpm": "9.7.0",
"ios": {
"resourceClass": "m-medium"
}
Expand Down
20 changes: 10 additions & 10 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@
},
"dependencies": {
"@bacons/text-decoder": "^0.0.0",
"@expo/metro-config": "^0.18.8",
"@expo/metro-config": "^0.18.11",
"@shopify/flash-list": "1.6.4",
"@tanstack/react-query": "catalog:",
"@trpc/client": "catalog:",
"@trpc/react-query": "catalog:",
"@trpc/server": "catalog:",
"expo": "~51.0.18",
"expo": "~51.0.27",
"expo-constants": "~16.0.2",
"expo-dev-client": "~4.0.19",
"expo-dev-client": "~4.0.23",
"expo-linking": "~6.3.1",
"expo-router": "~3.5.17",
"expo-router": "~3.5.21",
"expo-secure-store": "^13.0.2",
"expo-splash-screen": "~0.27.5",
"expo-status-bar": "~1.12.1",
"expo-web-browser": "^13.0.3",
"nativewind": "~4.0.36",
"react": "catalog:react18",
"react-dom": "catalog:react18",
"react-native": "~0.74.3",
"react-native": "~0.74.5",
"react-native-css-interop": "~0.0.34",
"react-native-gesture-handler": "~2.16.2",
"react-native-reanimated": "~3.10.1",
"react-native-safe-area-context": "~4.10.1",
"react-native-safe-area-context": "~4.10.8",
"react-native-screens": "~3.31.1",
"superjson": "2.2.1"
},
Expand All @@ -48,14 +48,14 @@
"@acme/prettier-config": "workspace:*",
"@acme/tailwind-config": "workspace:*",
"@acme/tsconfig": "workspace:*",
"@babel/core": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/runtime": "^7.24.7",
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@types/babel__core": "^7.20.5",
"@types/react": "catalog:react18",
"eslint": "catalog:",
"prettier": "catalog:",
"tailwindcss": "^3.4.4",
"tailwindcss": "catalog:",
"typescript": "catalog:"
},
"prettier": "@acme/prettier-config"
Expand Down
10 changes: 5 additions & 5 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
"@acme/db": "workspace:*",
"@acme/ui": "workspace:*",
"@acme/validators": "workspace:*",
"@t3-oss/env-nextjs": "^0.10.1",
"@t3-oss/env-nextjs": "^0.11.0",
"@tanstack/react-query": "catalog:",
"@trpc/client": "catalog:",
"@trpc/react-query": "catalog:",
"@trpc/server": "catalog:",
"geist": "^1.3.0",
"next": "^14.2.4",
"geist": "^1.3.1",
"next": "^14.2.5",
"react": "catalog:react18",
"react-dom": "catalog:react18",
"superjson": "2.2.1",
Expand All @@ -36,14 +36,14 @@
"@acme/prettier-config": "workspace:*",
"@acme/tailwind-config": "workspace:*",
"@acme/tsconfig": "workspace:*",
"@types/node": "^20.14.9",
"@types/node": "^20.14.15",
"@types/react": "catalog:react18",
"@types/react-dom": "catalog:react18",
"dotenv-cli": "^7.4.2",
"eslint": "catalog:",
"jiti": "^1.21.6",
"prettier": "catalog:",
"tailwindcss": "^3.4.4",
"tailwindcss": "catalog:",
"typescript": "catalog:"
},
"prettier": "@acme/prettier-config"
Expand Down
1 change: 0 additions & 1 deletion apps/nextjs/src/env.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-restricted-properties */
import { createEnv } from "@t3-oss/env-nextjs";
import { vercel } from "@t3-oss/env-nextjs/presets";
import { z } from "zod";
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import baseConfig from "@acme/tailwind-config/web";
export default {
// We need to append the path to the UI package to the content array so that
// those classes are included correctly.
content: [...baseConfig.content, "../../packages/ui/**/*.{ts,tsx}"],
content: [...baseConfig.content, "../../packages/ui/src/*.{ts,tsx}"],
presets: [baseConfig],
theme: {
extend: {
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "@acme/tsconfig/base.json",
"compilerOptions": {
"lib": ["es2022", "dom", "dom.iterable"],
"lib": ["ES2022", "dom", "dom.iterable"],
"jsx": "preserve",
"baseUrl": ".",
"paths": {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "create-t3-turbo",
"private": true,
"engines": {
"node": ">=20.15.0"
"node": ">=20.16.0"
},
"packageManager": "pnpm@9.6.0",
"packageManager": "pnpm@9.7.0",
"scripts": {
"build": "turbo run build",
"clean": "git clean -xdf node_modules",
Expand All @@ -24,9 +24,9 @@
},
"devDependencies": {
"@acme/prettier-config": "workspace:*",
"@turbo/gen": "^2.0.8",
"@turbo/gen": "^2.0.13",
"prettier": "catalog:",
"turbo": "^2.0.8",
"turbo": "^2.0.13",
"typescript": "catalog:"
},
"prettier": "@acme/prettier-config"
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
"default": "./src/index.ts"
}
},
"license": "MIT",
Expand Down
1 change: 0 additions & 1 deletion packages/auth/env.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-restricted-properties */
import { createEnv } from "@t3-oss/env-nextjs";
import { z } from "zod";

Expand Down
10 changes: 5 additions & 5 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
},
"dependencies": {
"@acme/db": "workspace:*",
"@auth/core": "0.32.0",
"@auth/drizzle-adapter": "^1.4.1",
"@t3-oss/env-nextjs": "^0.10.1",
"next": "^14.2.4",
"next-auth": "5.0.0-beta.19",
"@auth/core": "0.34.2",
"@auth/drizzle-adapter": "^1.4.2",
"@t3-oss/env-nextjs": "^0.11.0",
"next": "^14.2.5",
"next-auth": "5.0.0-beta.20",
"react": "catalog:react18",
"react-dom": "catalog:react18",
"zod": "catalog:"
Expand Down
1 change: 0 additions & 1 deletion packages/auth/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"extends": "@acme/tsconfig/base.json",
"compilerOptions": {},
"include": ["src", "*.ts"],
"exclude": ["node_modules"]
}
3 changes: 1 addition & 2 deletions packages/db/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import baseConfig, { restrictEnvAccess } from "@acme/eslint-config/base";
import baseConfig from "@acme/eslint-config/base";

/** @type {import('typescript-eslint').Config} */
export default [
{
ignores: ["dist/**"],
},
...baseConfig,
...restrictEnvAccess,
];
13 changes: 6 additions & 7 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
"default": "./src/index.ts"
},
"./client": {
"types": "./dist/client.d.ts",
"default": "./dist/client.js"
"default": "./src/client.ts"
},
"./schema": {
"types": "./dist/schema.d.ts",
"default": "./dist/schema.js"
"default": "./src/schema.ts"
}
},
"license": "MIT",
"scripts": {
"build": "tsc",
"dev": "tsc",
"clean": "git clean -xdf .cache .turbo dist node_modules",
"dev": "tsc",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"push": "pnpm with-env drizzle-kit push",
Expand All @@ -30,9 +30,8 @@
"with-env": "dotenv -e ../../.env --"
},
"dependencies": {
"@t3-oss/env-core": "^0.10.1",
"@vercel/postgres": "^0.9.0",
"drizzle-orm": "^0.31.2",
"drizzle-orm": "^0.33.0",
"drizzle-zod": "^0.5.1",
"zod": "catalog:"
},
Expand All @@ -41,7 +40,7 @@
"@acme/prettier-config": "workspace:*",
"@acme/tsconfig": "workspace:*",
"dotenv-cli": "^7.4.2",
"drizzle-kit": "^0.22.8",
"drizzle-kit": "^0.24.0",
"eslint": "catalog:",
"prettier": "catalog:",
"typescript": "catalog:"
Expand Down
1 change: 0 additions & 1 deletion packages/db/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"extends": "@acme/tsconfig/internal-package.json",
"compilerOptions": {},
"include": ["src"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion packages/ui/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import reactConfig from "@acme/eslint-config/react";
/** @type {import('typescript-eslint').Config} */
export default [
{
ignores: [],
ignores: ["dist/**"],
},
...baseConfig,
...reactConfig,
Expand Down
14 changes: 7 additions & 7 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
},
"./*": {
"types": "./dist/src/*.d.ts",
"default": "./src/*.tsx"
"default": [
"./src/*.ts",
"./src/*.tsx"
]
}
},
"license": "MIT",
Expand All @@ -24,28 +27,25 @@
"ui-add": "pnpm dlx shadcn-ui add && prettier src --write --list-different"
},
"dependencies": {
"@hookform/resolvers": "^3.7.0",
"@hookform/resolvers": "^3.9.0",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-slot": "^1.1.0",
"class-variance-authority": "^0.7.0",
"next-themes": "^0.3.0",
"react-hook-form": "^7.52.1",
"react-hook-form": "^7.52.2",
"sonner": "^1.5.0",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7"
"tailwind-merge": "^2.5.2"
},
"devDependencies": {
"@acme/eslint-config": "workspace:*",
"@acme/prettier-config": "workspace:*",
"@acme/tailwind-config": "workspace:*",
"@acme/tsconfig": "workspace:*",
"@types/react": "catalog:react18",
"eslint": "catalog:",
"prettier": "catalog:",
"react": "catalog:react18",
"tailwindcss": "^3.4.4",
"typescript": "catalog:",
"zod": "catalog:"
},
Expand Down
12 changes: 0 additions & 12 deletions packages/ui/tailwind.config.ts

This file was deleted.

7 changes: 3 additions & 4 deletions packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"extends": "@acme/tsconfig/internal-package.json",
"compilerOptions": {
"lib": ["dom", "dom.iterable", "ES2022"],
"lib": ["ES2022", "dom", "dom.iterable"],
"jsx": "preserve",
"rootDir": ".",
"emitDeclarationOnly": true
"rootDir": "."
},
"include": ["*.ts", "src"],
"include": ["src"],
"exclude": ["node_modules"]
}
3 changes: 1 addition & 2 deletions packages/validators/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"extends": "@acme/tsconfig/internal-package.json",
"compilerOptions": {},
"include": ["*.ts", "src"],
"include": ["src"],
"exclude": ["node_modules"]
}
Loading

0 comments on commit 1e7110c

Please sign in to comment.