chore: cleanup turbo tasks, consolidate some shared package versions

This commit is contained in:
Christian Benincasa
2025-09-30 21:02:20 -04:00
parent 091e7bd290
commit e98cccb94d
12 changed files with 67 additions and 51 deletions

View File

@@ -26,7 +26,7 @@
"@typescript-eslint/parser": "^8.21.0", "@typescript-eslint/parser": "^8.21.0",
"@vitest/coverage-v8": "^3.2.4", "@vitest/coverage-v8": "^3.2.4",
"esbuild": "^0.21.5", "esbuild": "^0.21.5",
"eslint": "9.17.0", "eslint": "catalog:",
"eslint-import-resolver-typescript": "^3.7.0", "eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-import": "^2.31.0", "eslint-plugin-import": "^2.31.0",
"eslint-plugin-react": "^7.37.3", "eslint-plugin-react": "^7.37.3",
@@ -39,7 +39,7 @@
"prettier": "^3.5.1", "prettier": "^3.5.1",
"semantic-release": "^24.2.7", "semantic-release": "^24.2.7",
"turbo": "^2.5.3", "turbo": "^2.5.3",
"typescript": "5.7.3", "typescript": "catalog:",
"vitest": "^3.2.4" "vitest": "^3.2.4"
}, },
"engines": { "engines": {

14
pnpm-lock.yaml generated
View File

@@ -4,6 +4,12 @@ settings:
autoInstallPeers: true autoInstallPeers: true
excludeLinksFromLockfile: false excludeLinksFromLockfile: false
catalogs:
default:
zod:
specifier: ^4.0.17
version: 4.0.17
overrides: overrides:
eslint: 9.17.0 eslint: 9.17.0
'@types/node': 22.10.7 '@types/node': 22.10.7
@@ -401,7 +407,7 @@ importers:
specifier: ^2.6.2 specifier: ^2.6.2
version: 2.6.2 version: 2.6.2
zod: zod:
specifier: ^4.0.17 specifier: 'catalog:'
version: 4.0.17 version: 4.0.17
devDependencies: devDependencies:
'@rollup/plugin-swc': '@rollup/plugin-swc':
@@ -435,7 +441,7 @@ importers:
types: types:
dependencies: dependencies:
zod: zod:
specifier: ^4.0.17 specifier: 'catalog:'
version: 4.0.17 version: 4.0.17
devDependencies: devDependencies:
'@microsoft/api-extractor': '@microsoft/api-extractor':
@@ -586,7 +592,7 @@ importers:
specifier: ^9.0.1 specifier: ^9.0.1
version: 9.0.1 version: 9.0.1
zod: zod:
specifier: ^4.0.17 specifier: 'catalog:'
version: 4.0.17 version: 4.0.17
zustand: zustand:
specifier: ^4.4.6 specifier: ^4.4.6
@@ -4086,7 +4092,7 @@ packages:
'@types/sql.js': '*' '@types/sql.js': '*'
'@vercel/postgres': '>=0.8.0' '@vercel/postgres': '>=0.8.0'
'@xata.io/client': '*' '@xata.io/client': '*'
better-sqlite3: 9.4.5 better-sqlite3: '>=7'
bun-types: '*' bun-types: '*'
expo-sqlite: '>=14.0.0' expo-sqlite: '>=14.0.0'
knex: '*' knex: '*'

View File

@@ -2,4 +2,12 @@ packages:
- server - server
- web - web
- types - types
- shared - 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

View File

@@ -23,7 +23,7 @@
"test:watch": "vitest --watch", "test:watch": "vitest --watch",
"test": "vitest --run", "test": "vitest --run",
"tunarr": "dotenv -e .env.development -- tsx src/index.ts", "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": { "dependencies": {
"@dotenvx/dotenvx": "^1.45.1", "@dotenvx/dotenvx": "^1.45.1",

View File

@@ -2,26 +2,20 @@
"$schema": "https://turbo.build/schema.json", "$schema": "https://turbo.build/schema.json",
"extends": ["//"], "extends": ["//"],
"tasks": { "tasks": {
"build": { "build": {},
"outputs": ["build/**"]
},
"typecheck": { "typecheck": {
"dependsOn": ["^build"] "dependsOn": ["^build"]
}, },
"generate-db-cache": {
"dependsOn": ["^bundle"],
"outputs": ["temp/metadata.json"]
},
"bundle": { "bundle": {
"inputs": ["./scripts/bundle.ts", "./src/**"], "inputs": ["./scripts/bundle.ts", "./src/**"],
"dependsOn": ["^build", "^bundle"], "dependsOn": ["^build"],
"outputs": ["dist/**"] "outputs": ["dist/**"]
}, },
"build-dev": { "build-dev": {
"dependsOn": ["^build"] "dependsOn": ["^build"]
}, },
"make-bin": { "make-bin": {
"dependsOn": ["bundle"], "dependsOn": ["@tunarr/web#bundle", "bundle"],
"outputs": ["bin/**"] "outputs": ["bin/**"]
}, },
"lint-staged": {}, "lint-staged": {},
@@ -29,6 +23,7 @@
"dependsOn": ["lint-staged"] "dependsOn": ["lint-staged"]
}, },
"dev": { "dev": {
"dependsOn": ["@tunarr/shared#build"],
"persistent": true, "persistent": true,
"cache": false, "cache": false,
"interruptible": true "interruptible": true

View File

@@ -8,38 +8,38 @@
"author": "chrisbenincasa", "author": "chrisbenincasa",
"type": "module", "type": "module",
"scripts": { "scripts": {
"bundle": "tsup", "bundle": "tsc",
"build": "tsup --dts", "build": "tsc --declaration",
"build-dev": "tsup --dts --watch", "build-dev": "tsup --dts --watch",
"clean": "rimraf ./dist/", "clean": "rimraf ./dist/",
"dev": "tsup --dts --watch", "dev": "tsc --declaration --watch",
"test": "vitest --run" "test": "vitest --run"
}, },
"exports": { "exports": {
".": { ".": {
"types": "./dist/index.d.ts", "types": "./dist/src/index.d.ts",
"default": "./dist/index.js" "default": "./dist/src/index.js"
}, },
"./constants": { "./constants": {
"types": "./dist/constants/index.d.ts", "types": "./dist/src/util/constants.d.ts",
"default": "./dist/constants/index.js" "default": "./dist/src/util/constants.js"
}, },
"./util": { "./util": {
"types": "./dist/util/index.d.ts", "types": "./dist/src/util/index.d.ts",
"default": "./dist/util/index.js" "default": "./dist/src/util/index.js"
}, },
"./types": { "./types": {
"types": "./dist/types/index.d.ts" "types": "./dist/src/types/index.d.ts"
} }
}, },
"main": "index.ts", "main": "index.ts",
"dependencies": { "dependencies": {
"@tunarr/types": "workspace:*", "@tunarr/types": "workspace:*",
"dayjs": "^1.11.10", "dayjs": "catalog:",
"lodash-es": "^4.17.21", "lodash-es": "catalog:",
"random-js": "2.1.0", "random-js": "catalog:",
"tslib": "^2.6.2", "tslib": "^2.6.2",
"zod": "^4.0.17" "zod": "catalog:"
}, },
"devDependencies": { "devDependencies": {
"@rollup/plugin-swc": "^0.4.0", "@rollup/plugin-swc": "^0.4.0",
@@ -49,7 +49,7 @@
"rimraf": "^5.0.5", "rimraf": "^5.0.5",
"ts-essentials": "^9.4.1", "ts-essentials": "^9.4.1",
"tsup": "^8.0.2", "tsup": "^8.0.2",
"typescript": "^5.3.3", "typescript": "catalog:",
"vitest": "^3.2.4" "vitest": "^3.2.4"
}, },
"peerDependencies": { "peerDependencies": {

View File

@@ -2,17 +2,14 @@
"$schema": "https://turbo.build/schema.json", "$schema": "https://turbo.build/schema.json",
"extends": ["//"], "extends": ["//"],
"tasks": { "tasks": {
"bundle": {
"dependsOn": ["@tunarr/types#build"],
"outputs": ["dist/**"]
},
"build": { "build": {
"dependsOn": ["@tunarr/types#build"], "dependsOn": ["@tunarr/types#build"],
"outputs": ["dist/**"] "outputs": ["dist/**"]
}, },
"build-dev": { "build-dev": {
"dependsOn": ["@tunarr/types#build"], "dependsOn": ["@tunarr/types#build"],
"cache": false "cache": false,
"persistent": true
} }
} }
} }

View File

@@ -11,12 +11,11 @@
"dependsOn": ["^build"], "dependsOn": ["^build"],
"outputs": ["build/**", "dist/**"] "outputs": ["build/**", "dist/**"]
}, },
"bundle": {},
"build-dev": {}, "build-dev": {},
"lint": {}, "lint": {},
"lint-fix": {}, "lint-fix": {},
"dev": { "dev": {
"dependsOn": ["@tunarr/types#build", "@tunarr/shared#bundle"], "dependsOn": ["@tunarr/types#build", "@tunarr/shared#build"],
"cache": false, "cache": false,
"persistent": true, "persistent": true,
"interruptible": true "interruptible": true

View File

@@ -4,7 +4,6 @@
"description": "Type definitions and schemas shared between server and web", "description": "Type definitions and schemas shared between server and web",
"private": true, "private": true,
"scripts": { "scripts": {
"bundle": "tsc --declaration",
"build": "tsc --declaration ", "build": "tsc --declaration ",
"clean": "rimraf ./build/", "clean": "rimraf ./build/",
"dev": "tsc --declaration --watch", "dev": "tsc --declaration --watch",
@@ -22,14 +21,14 @@
"@microsoft/api-extractor": "^7.43.0", "@microsoft/api-extractor": "^7.43.0",
"@typescript-eslint/eslint-plugin": "6.0.0", "@typescript-eslint/eslint-plugin": "6.0.0",
"@typescript-eslint/parser": "6.0.0", "@typescript-eslint/parser": "6.0.0",
"eslint": "9.17.0", "eslint": "catalog:",
"rimraf": "^5.0.5", "rimraf": "^5.0.5",
"tsup": "^8.0.2", "tsup": "^8.0.2",
"typed-openapi": "^0.10.1", "typed-openapi": "^0.10.1",
"typescript": "5.4.3" "typescript": "catalog:"
}, },
"dependencies": { "dependencies": {
"zod": "^4.0.17" "zod": "catalog:"
}, },
"exports": { "exports": {
".": { ".": {

13
types/turbo.json Normal file
View File

@@ -0,0 +1,13 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"tasks": {
"build": {
"outputs": ["dist/**"]
},
"build-dev": {
"persistent": true,
"cache": false
}
}
}

View File

@@ -8,10 +8,9 @@
"build-dev": "tsc -p tsconfig.build.json --noEmit --watch", "build-dev": "tsc -p tsconfig.build.json --noEmit --watch",
"regen-routes": "tsr generate", "regen-routes": "tsr generate",
"generate-client": "openapi-ts", "generate-client": "openapi-ts",
"prebuild": "make-vfs --verbose --dir ./dist --content-format import-bunfile --outfile dist/web-imports.js",
"bundle": "vite build", "bundle": "vite build",
"dev": "vite", "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", "preview": "vite preview",
"test": "vitest --run", "test": "vitest --run",
"typecheck": "tsc -p tsconfig.build.json --noEmit" "typecheck": "tsc -p tsconfig.build.json --noEmit"
@@ -35,10 +34,10 @@
"bowser": "^2.11.0", "bowser": "^2.11.0",
"color": "^5.0.0", "color": "^5.0.0",
"colorjs.io": "^0.5.2", "colorjs.io": "^0.5.2",
"dayjs": "^1.11.10", "dayjs": "catalog:",
"hls.js": "^1.4.12", "hls.js": "^1.4.12",
"immer": "^10.0.3", "immer": "^10.0.3",
"lodash-es": "^4.17.21", "lodash-es": "catalog:",
"material-react-table": "^3.2.1", "material-react-table": "^3.2.1",
"notistack": "^3.0.1", "notistack": "^3.0.1",
"pluralize": "^8.0.0", "pluralize": "^8.0.0",
@@ -57,7 +56,7 @@
"ts-pattern": "^5.4.0", "ts-pattern": "^5.4.0",
"usehooks-ts": "^2.14.0", "usehooks-ts": "^2.14.0",
"uuid": "^9.0.1", "uuid": "^9.0.1",
"zod": "^4.0.17", "zod": "catalog:",
"zustand": "^4.4.6" "zustand": "^4.4.6"
}, },
"devDependencies": { "devDependencies": {
@@ -77,14 +76,14 @@
"@typescript-eslint/eslint-plugin": "^8.19.0", "@typescript-eslint/eslint-plugin": "^8.19.0",
"@typescript-eslint/parser": "^8.19.0", "@typescript-eslint/parser": "^8.19.0",
"@vitejs/plugin-react-swc": "^3.7.1", "@vitejs/plugin-react-swc": "^3.7.1",
"eslint": "^9.17.0", "eslint": "catalog:",
"eslint-plugin-react-hooks": "^5.1.0", "eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.16", "eslint-plugin-react-refresh": "^0.4.16",
"make-vfs": "^1.0.15", "make-vfs": "^1.0.15",
"nodemon": "^3.0.3", "nodemon": "^3.0.3",
"openapi-zod-client": "^1.14.0", "openapi-zod-client": "^1.14.0",
"ts-essentials": "^9.4.1", "ts-essentials": "^9.4.1",
"typescript": "5.7.3", "typescript": "catalog:",
"vite": "^5.4.1", "vite": "^5.4.1",
"vite-plugin-svgr": "^4.2.0", "vite-plugin-svgr": "^4.2.0",
"vitest": "^3.2.4" "vitest": "^3.2.4"

View File

@@ -12,7 +12,7 @@
"dependsOn": ["^build"] "dependsOn": ["^build"]
}, },
"bundle": { "bundle": {
"dependsOn": ["^bundle"], "dependsOn": ["^build"],
"outputs": ["dist/**"] "outputs": ["dist/**"]
}, },
"generate-client": { "generate-client": {