From e98cccb94d0e192b97efbb033f72bcf8a71439a3 Mon Sep 17 00:00:00 2001 From: Christian Benincasa Date: Tue, 30 Sep 2025 21:02:20 -0400 Subject: [PATCH] chore: cleanup turbo tasks, consolidate some shared package versions --- package.json | 4 ++-- pnpm-lock.yaml | 14 ++++++++++---- pnpm-workspace.yaml | 10 +++++++++- server/package.json | 2 +- server/turbo.json | 13 ++++--------- shared/package.json | 30 +++++++++++++++--------------- shared/turbo.json | 7 ++----- turbo.json | 3 +-- types/package.json | 7 +++---- types/turbo.json | 13 +++++++++++++ web/package.json | 13 ++++++------- web/turbo.json | 2 +- 12 files changed, 67 insertions(+), 51 deletions(-) create mode 100644 types/turbo.json diff --git a/package.json b/package.json index 5fbc3a5e..42bf2496 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@typescript-eslint/parser": "^8.21.0", "@vitest/coverage-v8": "^3.2.4", "esbuild": "^0.21.5", - "eslint": "9.17.0", + "eslint": "catalog:", "eslint-import-resolver-typescript": "^3.7.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-react": "^7.37.3", @@ -39,7 +39,7 @@ "prettier": "^3.5.1", "semantic-release": "^24.2.7", "turbo": "^2.5.3", - "typescript": "5.7.3", + "typescript": "catalog:", "vitest": "^3.2.4" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9b080ada..44737b75 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,12 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +catalogs: + default: + zod: + specifier: ^4.0.17 + version: 4.0.17 + overrides: eslint: 9.17.0 '@types/node': 22.10.7 @@ -401,7 +407,7 @@ importers: specifier: ^2.6.2 version: 2.6.2 zod: - specifier: ^4.0.17 + specifier: 'catalog:' version: 4.0.17 devDependencies: '@rollup/plugin-swc': @@ -435,7 +441,7 @@ importers: types: dependencies: zod: - specifier: ^4.0.17 + specifier: 'catalog:' version: 4.0.17 devDependencies: '@microsoft/api-extractor': @@ -586,7 +592,7 @@ importers: specifier: ^9.0.1 version: 9.0.1 zod: - specifier: ^4.0.17 + specifier: 'catalog:' version: 4.0.17 zustand: specifier: ^4.4.6 @@ -4086,7 +4092,7 @@ packages: '@types/sql.js': '*' '@vercel/postgres': '>=0.8.0' '@xata.io/client': '*' - better-sqlite3: 9.4.5 + better-sqlite3: '>=7' bun-types: '*' expo-sqlite: '>=14.0.0' knex: '*' diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index edcb4957..84b9a3b7 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -2,4 +2,12 @@ packages: - server - web - types - - shared \ No newline at end of file + - shared + +catalog: + dayjs: ^1.11.10 + eslint: 9.17.0 + lodash-es: ^4.17.21 + random-js: 2.1.0 + typescript: 5.7.3 + zod: ^4.0.17 diff --git a/server/package.json b/server/package.json index 9452ccdd..c93cf306 100644 --- a/server/package.json +++ b/server/package.json @@ -23,7 +23,7 @@ "test:watch": "vitest --watch", "test": "vitest --run", "tunarr": "dotenv -e .env.development -- tsx src/index.ts", - "typecheck": "tsc -p tsconfig.build.json --noEmit" + "typecheck": "cross-env NODE_OPTIONS=--max-old-space-size=8192 tsc -p tsconfig.build.json --noEmit" }, "dependencies": { "@dotenvx/dotenvx": "^1.45.1", diff --git a/server/turbo.json b/server/turbo.json index e7ae94af..2cba0c87 100644 --- a/server/turbo.json +++ b/server/turbo.json @@ -2,26 +2,20 @@ "$schema": "https://turbo.build/schema.json", "extends": ["//"], "tasks": { - "build": { - "outputs": ["build/**"] - }, + "build": {}, "typecheck": { "dependsOn": ["^build"] }, - "generate-db-cache": { - "dependsOn": ["^bundle"], - "outputs": ["temp/metadata.json"] - }, "bundle": { "inputs": ["./scripts/bundle.ts", "./src/**"], - "dependsOn": ["^build", "^bundle"], + "dependsOn": ["^build"], "outputs": ["dist/**"] }, "build-dev": { "dependsOn": ["^build"] }, "make-bin": { - "dependsOn": ["bundle"], + "dependsOn": ["@tunarr/web#bundle", "bundle"], "outputs": ["bin/**"] }, "lint-staged": {}, @@ -29,6 +23,7 @@ "dependsOn": ["lint-staged"] }, "dev": { + "dependsOn": ["@tunarr/shared#build"], "persistent": true, "cache": false, "interruptible": true diff --git a/shared/package.json b/shared/package.json index 6108d577..22b57d2c 100644 --- a/shared/package.json +++ b/shared/package.json @@ -8,38 +8,38 @@ "author": "chrisbenincasa", "type": "module", "scripts": { - "bundle": "tsup", - "build": "tsup --dts", + "bundle": "tsc", + "build": "tsc --declaration", "build-dev": "tsup --dts --watch", "clean": "rimraf ./dist/", - "dev": "tsup --dts --watch", + "dev": "tsc --declaration --watch", "test": "vitest --run" }, "exports": { ".": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" + "types": "./dist/src/index.d.ts", + "default": "./dist/src/index.js" }, "./constants": { - "types": "./dist/constants/index.d.ts", - "default": "./dist/constants/index.js" + "types": "./dist/src/util/constants.d.ts", + "default": "./dist/src/util/constants.js" }, "./util": { - "types": "./dist/util/index.d.ts", - "default": "./dist/util/index.js" + "types": "./dist/src/util/index.d.ts", + "default": "./dist/src/util/index.js" }, "./types": { - "types": "./dist/types/index.d.ts" + "types": "./dist/src/types/index.d.ts" } }, "main": "index.ts", "dependencies": { "@tunarr/types": "workspace:*", - "dayjs": "^1.11.10", - "lodash-es": "^4.17.21", - "random-js": "2.1.0", + "dayjs": "catalog:", + "lodash-es": "catalog:", + "random-js": "catalog:", "tslib": "^2.6.2", - "zod": "^4.0.17" + "zod": "catalog:" }, "devDependencies": { "@rollup/plugin-swc": "^0.4.0", @@ -49,7 +49,7 @@ "rimraf": "^5.0.5", "ts-essentials": "^9.4.1", "tsup": "^8.0.2", - "typescript": "^5.3.3", + "typescript": "catalog:", "vitest": "^3.2.4" }, "peerDependencies": { diff --git a/shared/turbo.json b/shared/turbo.json index 2cc9b712..5925ad14 100644 --- a/shared/turbo.json +++ b/shared/turbo.json @@ -2,17 +2,14 @@ "$schema": "https://turbo.build/schema.json", "extends": ["//"], "tasks": { - "bundle": { - "dependsOn": ["@tunarr/types#build"], - "outputs": ["dist/**"] - }, "build": { "dependsOn": ["@tunarr/types#build"], "outputs": ["dist/**"] }, "build-dev": { "dependsOn": ["@tunarr/types#build"], - "cache": false + "cache": false, + "persistent": true } } } diff --git a/turbo.json b/turbo.json index 18bf294e..70b2de15 100644 --- a/turbo.json +++ b/turbo.json @@ -11,12 +11,11 @@ "dependsOn": ["^build"], "outputs": ["build/**", "dist/**"] }, - "bundle": {}, "build-dev": {}, "lint": {}, "lint-fix": {}, "dev": { - "dependsOn": ["@tunarr/types#build", "@tunarr/shared#bundle"], + "dependsOn": ["@tunarr/types#build", "@tunarr/shared#build"], "cache": false, "persistent": true, "interruptible": true diff --git a/types/package.json b/types/package.json index fe86cdcf..34f2a948 100644 --- a/types/package.json +++ b/types/package.json @@ -4,7 +4,6 @@ "description": "Type definitions and schemas shared between server and web", "private": true, "scripts": { - "bundle": "tsc --declaration", "build": "tsc --declaration ", "clean": "rimraf ./build/", "dev": "tsc --declaration --watch", @@ -22,14 +21,14 @@ "@microsoft/api-extractor": "^7.43.0", "@typescript-eslint/eslint-plugin": "6.0.0", "@typescript-eslint/parser": "6.0.0", - "eslint": "9.17.0", + "eslint": "catalog:", "rimraf": "^5.0.5", "tsup": "^8.0.2", "typed-openapi": "^0.10.1", - "typescript": "5.4.3" + "typescript": "catalog:" }, "dependencies": { - "zod": "^4.0.17" + "zod": "catalog:" }, "exports": { ".": { diff --git a/types/turbo.json b/types/turbo.json new file mode 100644 index 00000000..db83792a --- /dev/null +++ b/types/turbo.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "tasks": { + "build": { + "outputs": ["dist/**"] + }, + "build-dev": { + "persistent": true, + "cache": false + } + } +} diff --git a/web/package.json b/web/package.json index 7f07d212..c4280acd 100644 --- a/web/package.json +++ b/web/package.json @@ -8,10 +8,9 @@ "build-dev": "tsc -p tsconfig.build.json --noEmit --watch", "regen-routes": "tsr generate", "generate-client": "openapi-ts", - "prebuild": "make-vfs --verbose --dir ./dist --content-format import-bunfile --outfile dist/web-imports.js", "bundle": "vite build", "dev": "vite", - "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "lint": "eslint . --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", "test": "vitest --run", "typecheck": "tsc -p tsconfig.build.json --noEmit" @@ -35,10 +34,10 @@ "bowser": "^2.11.0", "color": "^5.0.0", "colorjs.io": "^0.5.2", - "dayjs": "^1.11.10", + "dayjs": "catalog:", "hls.js": "^1.4.12", "immer": "^10.0.3", - "lodash-es": "^4.17.21", + "lodash-es": "catalog:", "material-react-table": "^3.2.1", "notistack": "^3.0.1", "pluralize": "^8.0.0", @@ -57,7 +56,7 @@ "ts-pattern": "^5.4.0", "usehooks-ts": "^2.14.0", "uuid": "^9.0.1", - "zod": "^4.0.17", + "zod": "catalog:", "zustand": "^4.4.6" }, "devDependencies": { @@ -77,14 +76,14 @@ "@typescript-eslint/eslint-plugin": "^8.19.0", "@typescript-eslint/parser": "^8.19.0", "@vitejs/plugin-react-swc": "^3.7.1", - "eslint": "^9.17.0", + "eslint": "catalog:", "eslint-plugin-react-hooks": "^5.1.0", "eslint-plugin-react-refresh": "^0.4.16", "make-vfs": "^1.0.15", "nodemon": "^3.0.3", "openapi-zod-client": "^1.14.0", "ts-essentials": "^9.4.1", - "typescript": "5.7.3", + "typescript": "catalog:", "vite": "^5.4.1", "vite-plugin-svgr": "^4.2.0", "vitest": "^3.2.4" diff --git a/web/turbo.json b/web/turbo.json index 9fa0f905..3fe81e40 100644 --- a/web/turbo.json +++ b/web/turbo.json @@ -12,7 +12,7 @@ "dependsOn": ["^build"] }, "bundle": { - "dependsOn": ["^bundle"], + "dependsOn": ["^build"], "outputs": ["dist/**"] }, "generate-client": {