From 9fc100e74e57653fb2c6ac9db26d6e9941f0bcc6 Mon Sep 17 00:00:00 2001 From: Douglas DUTEIL Date: Fri, 27 Sep 2024 16:54:44 +0200 Subject: [PATCH] chore(pkg): auto sync tsconfig references --- bun.lockb | Bin 464890 -> 464890 bytes package.json | 2 + packages/~/app/api/tsconfig.json | 37 ++++++++---- packages/~/app/layout/tsconfig.json | 21 +++++-- packages/~/app/middleware/tsconfig.json | 23 ++++++-- packages/~/app/sentry/package.json | 2 +- packages/~/app/sentry/tsconfig.json | 10 +++- packages/~/app/ui/tsconfig.json | 24 ++++++-- packages/~/auth/api/tsconfig.json | 12 +++- packages/~/infra/crisp/lib/tsconfig.json | 7 ++- .../~/infra/crisp/middleware/tsconfig.json | 6 +- packages/~/infra/crisp/ui/tsconfig.json | 6 +- .../infra/moncomptepro/database/tsconfig.json | 13 ++++- .../~/infra/moncomptepro/lib/tsconfig.json | 7 ++- packages/~/infra/zammad/api/tsconfig.json | 19 +++++- packages/~/infra/zammad/lib/tsconfig.json | 7 ++- packages/~/moderations/api/tsconfig.json | 55 +++++++++++++----- packages/~/moderations/lib/tsconfig.json | 20 +++++-- .../~/moderations/repository/tsconfig.json | 10 +++- packages/~/organizations/api/tsconfig.json | 26 +++++++-- packages/~/organizations/lib/tsconfig.json | 18 +++++- .../~/organizations/repository/tsconfig.json | 9 ++- packages/~/organizations/ui/tsconfig.json | 16 +++-- packages/~/users/api/tsconfig.json | 28 ++++++--- packages/~/users/repository/tsconfig.json | 6 +- packages/~/welcome/api/tsconfig.json | 20 +++++-- 26 files changed, 317 insertions(+), 87 deletions(-) diff --git a/bun.lockb b/bun.lockb index 769d7183310341fbc7522c3f947a46b52d464126..85478d2d517b1f9bb1b6a77a11bbac0406cd9c87 100755 GIT binary patch delta 39 qcmeyhUgp<&nT8g|7N!>FEiBDv*qIo>puOu13lOtz?>fU);0*vM=?*>s delta 39 tcmeyhUgp<&nT8g|7N!>FEiBDv*clD=42|>*+q=%N05R+Kt}|=}-T*w64_*KO diff --git a/package.json b/package.json index 495331cb8..89287706e 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,8 @@ "format": "bun x prettier --check .", "format:fix": "bun x prettier --write .", "format:pkg": "bun x sort-package-json ./package.json ./packages/~/*/*/package.json ./e2e/package.json", + "format:tsconfig": "bun x @monorepo-utils/workspaces-to-typescript-project-references", + "postadd": "bun run format:tsconfig", "renovate": "bun x npm-check-updates --packageManager bun --interactive --upgrade --deep", "start": "tsx bin/src/index.ts", "studio:moncomptepro": "bun run database:moncomptepro:run studio", diff --git a/packages/~/app/api/tsconfig.json b/packages/~/app/api/tsconfig.json index 17dda4bc1..fd824122e 100644 --- a/packages/~/app/api/tsconfig.json +++ b/packages/~/app/api/tsconfig.json @@ -5,15 +5,32 @@ }, "extends": "@~/config.typescript/base/tsconfig.json", "references": [ - { "path": "../../auth/api/tsconfig.json" }, - { "path": "../../infra/moncomptepro/database/tsconfig.json" }, - { "path": "../../moderations/api/tsconfig.json" }, - { "path": "../../organizations/api/tsconfig.json" }, - { "path": "../../proxy/api/tsconfig.json" }, - { "path": "../../users/api/tsconfig.json" }, - { "path": "../../welcome/api/tsconfig.json" }, - { "path": "../core/tsconfig.json" }, - { "path": "../layout/tsconfig.json" }, - { "path": "../middleware/tsconfig.json" } + { + "path": "../core" + }, + { + "path": "../layout" + }, + { + "path": "../sentry" + }, + { + "path": "../../auth/api" + }, + { + "path": "../../moderations/api" + }, + { + "path": "../../organizations/api" + }, + { + "path": "../../proxy/api" + }, + { + "path": "../../users/api" + }, + { + "path": "../../welcome/api" + } ] } diff --git a/packages/~/app/layout/tsconfig.json b/packages/~/app/layout/tsconfig.json index 330de5f82..494145615 100644 --- a/packages/~/app/layout/tsconfig.json +++ b/packages/~/app/layout/tsconfig.json @@ -2,13 +2,24 @@ "compilerOptions": { "jsxImportSource": "hono/jsx", "outDir": "./node_modules/.cache/tsc", - "lib": ["DOM"], - "types": ["bun-types", "hono"] + "lib": [ + "DOM" + ], + "types": [ + "bun-types", + "hono" + ] }, "extends": "@~/config.typescript/tsx/tsconfig.json", "references": [ - { "path": "../core/tsconfig.json" }, - { "path": "../middleware/tsconfig.json" }, - { "path": "../urls/tsconfig.json" } + { + "path": "../core" + }, + { + "path": "../middleware" + }, + { + "path": "../urls" + } ] } diff --git a/packages/~/app/middleware/tsconfig.json b/packages/~/app/middleware/tsconfig.json index 834e553fb..8f409bb27 100644 --- a/packages/~/app/middleware/tsconfig.json +++ b/packages/~/app/middleware/tsconfig.json @@ -5,10 +5,23 @@ }, "extends": "@~/config.typescript/base/tsconfig.json", "references": [ - { "path": "../../infra/moncomptepro/database/tsconfig.json" }, - { "path": "../core/tsconfig.json" }, - { "path": "../sentry/tsconfig.json" }, - { "path": "../ui/tsconfig.json" }, - { "path": "../urls/tsconfig.json" } + { + "path": "../core" + }, + { + "path": "../sentry" + }, + { + "path": "../ui" + }, + { + "path": "../urls" + }, + { + "path": "../../infra/moncomptepro/database" + }, + { + "path": "../../infra/moncomptepro/lib" + } ] } diff --git a/packages/~/app/sentry/package.json b/packages/~/app/sentry/package.json index 27fb2448d..712721283 100644 --- a/packages/~/app/sentry/package.json +++ b/packages/~/app/sentry/package.json @@ -14,9 +14,9 @@ "format": "prettier --write src/**/*.ts" }, "dependencies": { - "@~/app.core": "workspace:*", "@sentry/node": "8.31.0", "@sentry/profiling-node": "8.31.0", + "@~/app.core": "workspace:*", "consola": "3.2.3", "hono": "4.6.3" }, diff --git a/packages/~/app/sentry/tsconfig.json b/packages/~/app/sentry/tsconfig.json index 5a5f27e49..60783ed98 100644 --- a/packages/~/app/sentry/tsconfig.json +++ b/packages/~/app/sentry/tsconfig.json @@ -1,8 +1,14 @@ { "compilerOptions": { - "types": ["bun-types"], + "types": [ + "bun-types" + ], "outDir": "./node_modules/.cache/tsc" }, "extends": "@~/config.typescript/base/tsconfig.json", - "references": [{ "path": "../core/tsconfig.json" }] + "references": [ + { + "path": "../core" + } + ] } diff --git a/packages/~/app/ui/tsconfig.json b/packages/~/app/ui/tsconfig.json index 10f00e5ef..40607bf17 100644 --- a/packages/~/app/ui/tsconfig.json +++ b/packages/~/app/ui/tsconfig.json @@ -2,14 +2,28 @@ "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "hono/jsx", - "lib": ["DOM"], + "lib": [ + "DOM" + ], "outDir": "./node_modules/.cache/tsc", - "types": ["bun-types", "hono"] + "types": [ + "bun-types", + "hono" + ] }, "extends": "@~/config.typescript/tsx/tsconfig.json", "references": [ - { "path": "../../config/happydom/tsconfig.json" }, - { "path": "../core/tsconfig.json" }, - { "path": "../urls/tsconfig.json" } + { + "path": "../core" + }, + { + "path": "../urls" + }, + { + "path": "../../../hono-slotify" + }, + { + "path": "../../config/happydom" + } ] } diff --git a/packages/~/auth/api/tsconfig.json b/packages/~/auth/api/tsconfig.json index 1f71569a7..76c09d97b 100644 --- a/packages/~/auth/api/tsconfig.json +++ b/packages/~/auth/api/tsconfig.json @@ -4,8 +4,14 @@ }, "extends": "@~/config.typescript/api/tsconfig.json", "references": [ - { "path": "../../app/core/tsconfig.json" }, - { "path": "../../app/middleware/tsconfig.json" }, - { "path": "../../app/urls/tsconfig.json" } + { + "path": "../../app/core" + }, + { + "path": "../../app/middleware" + }, + { + "path": "../../app/urls" + } ] } diff --git a/packages/~/infra/crisp/lib/tsconfig.json b/packages/~/infra/crisp/lib/tsconfig.json index b0b93ced3..9e2b67c3a 100644 --- a/packages/~/infra/crisp/lib/tsconfig.json +++ b/packages/~/infra/crisp/lib/tsconfig.json @@ -2,5 +2,10 @@ "compilerOptions": { "outDir": "./node_modules/.cache/tsc" }, - "extends": "@~/config.typescript/bun/tsconfig.json" + "extends": "@~/config.typescript/bun/tsconfig.json", + "references": [ + { + "path": "../../../app/core" + } + ] } diff --git a/packages/~/infra/crisp/middleware/tsconfig.json b/packages/~/infra/crisp/middleware/tsconfig.json index 41b38d5e8..4ad5fba34 100644 --- a/packages/~/infra/crisp/middleware/tsconfig.json +++ b/packages/~/infra/crisp/middleware/tsconfig.json @@ -3,5 +3,9 @@ "outDir": "./node_modules/.cache/tsc" }, "extends": "@~/config.typescript/bun/tsconfig.json", - "references": [{ "path": "../lib/tsconfig.json" }] + "references": [ + { + "path": "../lib" + } + ] } diff --git a/packages/~/infra/crisp/ui/tsconfig.json b/packages/~/infra/crisp/ui/tsconfig.json index ebece7bfc..93e053815 100644 --- a/packages/~/infra/crisp/ui/tsconfig.json +++ b/packages/~/infra/crisp/ui/tsconfig.json @@ -5,5 +5,9 @@ "outDir": "./node_modules/.cache/tsc" }, "extends": "@~/config.typescript/tsx/tsconfig.json", - "references": [{ "path": "../lib/tsconfig.json" }] + "references": [ + { + "path": "../lib" + } + ] } diff --git a/packages/~/infra/moncomptepro/database/tsconfig.json b/packages/~/infra/moncomptepro/database/tsconfig.json index 9bd00dc12..950821bfc 100644 --- a/packages/~/infra/moncomptepro/database/tsconfig.json +++ b/packages/~/infra/moncomptepro/database/tsconfig.json @@ -1,8 +1,17 @@ { "compilerOptions": { "outDir": "./node_modules/.cache/tsc", - "types": ["pg"] + "types": [ + "pg" + ] }, "extends": "@~/config.typescript/base/tsconfig.json", - "references": [{ "path": "../../../app/core/tsconfig.json" }] + "references": [ + { + "path": "../../../app/core" + }, + { + "path": "../lib" + } + ] } diff --git a/packages/~/infra/moncomptepro/lib/tsconfig.json b/packages/~/infra/moncomptepro/lib/tsconfig.json index b0b93ced3..9e2b67c3a 100644 --- a/packages/~/infra/moncomptepro/lib/tsconfig.json +++ b/packages/~/infra/moncomptepro/lib/tsconfig.json @@ -2,5 +2,10 @@ "compilerOptions": { "outDir": "./node_modules/.cache/tsc" }, - "extends": "@~/config.typescript/bun/tsconfig.json" + "extends": "@~/config.typescript/bun/tsconfig.json", + "references": [ + { + "path": "../../../app/core" + } + ] } diff --git a/packages/~/infra/zammad/api/tsconfig.json b/packages/~/infra/zammad/api/tsconfig.json index 7e67cd993..017395606 100644 --- a/packages/~/infra/zammad/api/tsconfig.json +++ b/packages/~/infra/zammad/api/tsconfig.json @@ -4,9 +4,22 @@ "composite": true, "declaration": true, "emitDeclarationOnly": true, - "lib": ["ESNext", "DOM"], + "lib": [ + "ESNext", + "DOM" + ], "noEmit": false, "outDir": "./node_modules/.cache/tsc", - "types": ["bun-types"] - } + "types": [ + "bun-types" + ] + }, + "references": [ + { + "path": "../../../app/core" + }, + { + "path": "../lib" + } + ] } diff --git a/packages/~/infra/zammad/lib/tsconfig.json b/packages/~/infra/zammad/lib/tsconfig.json index b0b93ced3..9e2b67c3a 100644 --- a/packages/~/infra/zammad/lib/tsconfig.json +++ b/packages/~/infra/zammad/lib/tsconfig.json @@ -2,5 +2,10 @@ "compilerOptions": { "outDir": "./node_modules/.cache/tsc" }, - "extends": "@~/config.typescript/bun/tsconfig.json" + "extends": "@~/config.typescript/bun/tsconfig.json", + "references": [ + { + "path": "../../../app/core" + } + ] } diff --git a/packages/~/moderations/api/tsconfig.json b/packages/~/moderations/api/tsconfig.json index eaf510765..c4ca2625d 100644 --- a/packages/~/moderations/api/tsconfig.json +++ b/packages/~/moderations/api/tsconfig.json @@ -4,19 +4,48 @@ "outDir": "./node_modules/.cache/tsc" }, "extends": "@~/config.typescript/api/tsconfig.json", - "include": ["src"], + "include": [ + "src" + ], "references": [ - { "path": "../../app/layout/tsconfig.json" }, - { "path": "../../app/middleware/tsconfig.json" }, - { "path": "../../app/ui/tsconfig.json" }, - { "path": "../../app/urls/tsconfig.json" }, - { "path": "../../infra/crisp/lib/tsconfig.json" }, - { "path": "../../infra/crisp/middleware/tsconfig.json" }, - { "path": "../../infra/crisp/ui/tsconfig.json" }, - { "path": "../../infra/moncomptepro/database/tsconfig.json" }, - { "path": "../../infra/moncomptepro/lib/tsconfig.json" }, - { "path": "../../infra/zammad/lib/tsconfig.json" }, - { "path": "../../organizations/repository/tsconfig.json" }, - { "path": "../../organizations/ui/tsconfig.json" } + { + "path": "../../app/layout" + }, + { + "path": "../../app/middleware" + }, + { + "path": "../../app/ui" + }, + { + "path": "../../app/urls" + }, + { + "path": "../../infra/crisp/lib" + }, + { + "path": "../../infra/crisp/middleware" + }, + { + "path": "../../infra/crisp/ui" + }, + { + "path": "../lib" + }, + { + "path": "../../infra/moncomptepro/database" + }, + { + "path": "../../infra/moncomptepro/lib" + }, + { + "path": "../../organizations/repository" + }, + { + "path": "../../organizations/ui" + }, + { + "path": "../../infra/zammad/lib" + } ] } diff --git a/packages/~/moderations/lib/tsconfig.json b/packages/~/moderations/lib/tsconfig.json index ec4957298..b52db3ae9 100644 --- a/packages/~/moderations/lib/tsconfig.json +++ b/packages/~/moderations/lib/tsconfig.json @@ -3,11 +3,21 @@ "outDir": "./node_modules/.cache/tsc" }, "extends": "@~/config.typescript/base/tsconfig.json", - "include": ["src"], + "include": [ + "src" + ], "references": [ - { "path": "../../app/core/tsconfig.json" }, - { "path": "../../infra/crisp/lib/tsconfig.json" }, - { "path": "../../infra/moncomptepro/database/tsconfig.json" }, - { "path": "../repository/tsconfig.json" } + { + "path": "../../app/core" + }, + { + "path": "../../infra/crisp/lib" + }, + { + "path": "../repository" + }, + { + "path": "../../infra/moncomptepro/database" + } ] } diff --git a/packages/~/moderations/repository/tsconfig.json b/packages/~/moderations/repository/tsconfig.json index f59d72402..d9821ad4c 100644 --- a/packages/~/moderations/repository/tsconfig.json +++ b/packages/~/moderations/repository/tsconfig.json @@ -3,6 +3,12 @@ "outDir": "./node_modules/.cache/tsc" }, "extends": "@~/config.typescript/base/tsconfig.json", - "include": ["src"], - "references": [{ "path": "../../infra/moncomptepro/database/tsconfig.json" }] + "include": [ + "src" + ], + "references": [ + { + "path": "../../infra/moncomptepro/database" + } + ] } diff --git a/packages/~/organizations/api/tsconfig.json b/packages/~/organizations/api/tsconfig.json index 94322d5c2..2687f9c70 100644 --- a/packages/~/organizations/api/tsconfig.json +++ b/packages/~/organizations/api/tsconfig.json @@ -5,10 +5,26 @@ }, "extends": "@~/config.typescript/api/tsconfig.json", "references": [ - { "path": "../../app/layout/tsconfig.json" }, - { "path": "../../app/middleware/tsconfig.json" }, - { "path": "../../app/ui/tsconfig.json" }, - { "path": "../../app/urls/tsconfig.json" }, - { "path": "../../organizations/repository/tsconfig.json" } + { + "path": "../../app/layout" + }, + { + "path": "../../app/middleware" + }, + { + "path": "../../app/ui" + }, + { + "path": "../../app/urls" + }, + { + "path": "../repository" + }, + { + "path": "../ui" + }, + { + "path": "../../users/repository" + } ] } diff --git a/packages/~/organizations/lib/tsconfig.json b/packages/~/organizations/lib/tsconfig.json index 6fc6b115d..ca025441f 100644 --- a/packages/~/organizations/lib/tsconfig.json +++ b/packages/~/organizations/lib/tsconfig.json @@ -3,9 +3,21 @@ "outDir": "./node_modules/.cache/tsc" }, "extends": "@~/config.typescript/tsx/tsconfig.json", - "include": ["src"], + "include": [ + "src" + ], "references": [ - { "path": "../../infra/moncomptepro/database/tsconfig.json" }, - { "path": "../repository/tsconfig.json" } + { + "path": "../../infra/moncomptepro/database" + }, + { + "path": "../../infra/moncomptepro/lib" + }, + { + "path": "../repository" + }, + { + "path": "../../users/repository" + } ] } diff --git a/packages/~/organizations/repository/tsconfig.json b/packages/~/organizations/repository/tsconfig.json index 465982a5b..546f7b9a4 100644 --- a/packages/~/organizations/repository/tsconfig.json +++ b/packages/~/organizations/repository/tsconfig.json @@ -3,5 +3,12 @@ "outDir": "./node_modules/.cache/tsc" }, "extends": "@~/config.typescript/base/tsconfig.json", - "references": [{ "path": "../../infra/moncomptepro/database/tsconfig.json" }] + "references": [ + { + "path": "../../infra/moncomptepro/database" + }, + { + "path": "../../infra/moncomptepro/lib" + } + ] } diff --git a/packages/~/organizations/ui/tsconfig.json b/packages/~/organizations/ui/tsconfig.json index 77bcdfac2..228685e16 100644 --- a/packages/~/organizations/ui/tsconfig.json +++ b/packages/~/organizations/ui/tsconfig.json @@ -4,10 +4,18 @@ "outDir": "./node_modules/.cache/tsc" }, "extends": "@~/config.typescript/api/tsconfig.json", - "include": ["src"], + "include": [ + "src" + ], "references": [ - { "path": "../../app/ui/tsconfig.json" }, - { "path": "../../app/urls/tsconfig.json" }, - { "path": "../../organizations/lib/tsconfig.json" } + { + "path": "../../app/ui" + }, + { + "path": "../../app/urls" + }, + { + "path": "../lib" + } ] } diff --git a/packages/~/users/api/tsconfig.json b/packages/~/users/api/tsconfig.json index eb18cfe07..ec2eaa2a6 100644 --- a/packages/~/users/api/tsconfig.json +++ b/packages/~/users/api/tsconfig.json @@ -5,12 +5,26 @@ }, "extends": "@~/config.typescript/api/tsconfig.json", "references": [ - { "path": "../../app/layout/tsconfig.json" }, - { "path": "../../app/middleware/tsconfig.json" }, - { "path": "../../app/ui/tsconfig.json" }, - { "path": "../../app/urls/tsconfig.json" }, - { "path": "../../moderations/repository/tsconfig.json" }, - { "path": "../../organizations/repository/tsconfig.json" }, - { "path": "../../users/repository/tsconfig.json" } + { + "path": "../../app/layout" + }, + { + "path": "../../app/middleware" + }, + { + "path": "../../app/ui" + }, + { + "path": "../../app/urls" + }, + { + "path": "../../moderations/repository" + }, + { + "path": "../../organizations/repository" + }, + { + "path": "../repository" + } ] } diff --git a/packages/~/users/repository/tsconfig.json b/packages/~/users/repository/tsconfig.json index 465982a5b..054ff0948 100644 --- a/packages/~/users/repository/tsconfig.json +++ b/packages/~/users/repository/tsconfig.json @@ -3,5 +3,9 @@ "outDir": "./node_modules/.cache/tsc" }, "extends": "@~/config.typescript/base/tsconfig.json", - "references": [{ "path": "../../infra/moncomptepro/database/tsconfig.json" }] + "references": [ + { + "path": "../../infra/moncomptepro/database" + } + ] } diff --git a/packages/~/welcome/api/tsconfig.json b/packages/~/welcome/api/tsconfig.json index a650d6ecb..e249db651 100644 --- a/packages/~/welcome/api/tsconfig.json +++ b/packages/~/welcome/api/tsconfig.json @@ -4,13 +4,23 @@ "jsx": "react-jsx", "jsxImportSource": "hono/jsx", "outDir": "./node_modules/.cache/tsc", - "types": ["bun-types"] + "types": [ + "bun-types" + ] }, "extends": "@~/config.typescript/api/tsconfig.json", "references": [ - { "path": "../../app/core/tsconfig.json" }, - { "path": "../../app/middleware/tsconfig.json" }, - { "path": "../../app/layout/tsconfig.json" }, - { "path": "../../app/urls/tsconfig.json" } + { + "path": "../../app/core" + }, + { + "path": "../../app/layout" + }, + { + "path": "../../app/middleware" + }, + { + "path": "../../app/urls" + } ] }