mirror of
https://github.com/goauthentik/authentik
synced 2026-05-15 03:16:22 +02:00
* Updgrade Typescript to use Typescript 7 (aka TSGO) * web: drop `packages/` and composite from `tsc -p .` graph (#22100) Excluding the workspace subpackages cuts the program graph from 2719 to 1800 non-`node_modules` files (-34%) — most of the drop is the 912 generated files in `packages/client-ts/src/`, which are pulled in by the recursive include glob even though that package has its own composite tsconfig and is consumed via `@goauthentik/api/dist/*.d.ts`. The base `@goauthentik/tsconfig` sets `composite: true`, which forced TS6307 the moment we tried to exclude `packages/` (`@goauthentik/core` imports get followed into `web/packages/core/`). Nothing references `web` in this repo, so disabling composite is safe; `incremental` is inherited from the base and still drives the `.tsbuildinfo` cache. On this branch: - cold `tsc -p .` 26.3s → 22.7s (-14%) - warm `tsc -p .` 4.1s → 3.5s (-15%) - `npm run precommit` 39.9s → 37.9s warm Type coverage is unchanged: each excluded package already type-checks itself via its own tsconfig + build, and stories/tests/e2e remain in the include set. Co-Authored-By: Agent (authentik-i22100-affordable-constant-chartreuse) <279763771+playpen-agent@users.noreply.github.com> * Fix types. --------- Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Co-authored-by: Agent (authentik-i22100-affordable-constant-chartreuse) <279763771+playpen-agent@users.noreply.github.com>
88 lines
2.7 KiB
JSON
88 lines
2.7 KiB
JSON
// @file TSConfig used by the web package during development.
|
|
{
|
|
"extends": "@goauthentik/tsconfig",
|
|
"compilerOptions": {
|
|
"ignoreDeprecations": "6.0",
|
|
// Nothing references the web package, so it does not need to act as a
|
|
// composite project. Disabling composite lets us exclude `packages/`
|
|
// (each subpackage owns its own tsconfig + build) without TS6307.
|
|
"composite": false,
|
|
"types": ["node"],
|
|
"checkJs": true,
|
|
"allowJs": true,
|
|
"resolveJsonModule": true,
|
|
"allowSyntheticDefaultImports": true,
|
|
"emitDeclarationOnly": true,
|
|
"experimentalDecorators": true,
|
|
// See https://lit.dev/docs/components/properties/
|
|
"useDefineForClassFields": false,
|
|
"target": "esnext",
|
|
"module": "preserve",
|
|
"moduleResolution": "bundler",
|
|
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
|
|
// TODO: We should enable this when when we're ready to enforce it.
|
|
"noUncheckedIndexedAccess": false,
|
|
"plugins": [
|
|
// #region Lit
|
|
{
|
|
"name": "ts-lit-plugin",
|
|
"strict": true,
|
|
"rules": {
|
|
"no-incompatible-type-binding": "off"
|
|
},
|
|
|
|
"globalAttributes": [
|
|
//#region Testing
|
|
|
|
"name",
|
|
|
|
//#endregion
|
|
|
|
//#region ARIA
|
|
|
|
"aria-description",
|
|
"inert",
|
|
"enterkeyhint",
|
|
|
|
//#endregion
|
|
|
|
//#region Popover
|
|
|
|
"popover",
|
|
"popovertarget",
|
|
"popovertargetaction"
|
|
|
|
//#endregion
|
|
]
|
|
},
|
|
{
|
|
"name": "@genesiscommunitysuccess/custom-elements-lsp",
|
|
"designSystemPrefix": "ak-",
|
|
"parser": {
|
|
"timeout": 2000
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"exclude": [
|
|
// ---
|
|
"**/out/**/*",
|
|
"**/dist/**/*",
|
|
"storybook-static",
|
|
"src/**/*.test.ts",
|
|
"./tests",
|
|
// Workspace subpackages each own their tsconfig and build. Including
|
|
// them here pulls ~1k files (notably the OpenAPI client in
|
|
// packages/client-ts) into every `tsc -p .` for no benefit.
|
|
"packages",
|
|
// TODO: @lit/localize-tools v0.8.0 has a nullish coalescing typing error.
|
|
// Remove when we upgrade past that.
|
|
"scripts/pseudolocalize.mjs",
|
|
"scripts/build-locales.mjs",
|
|
|
|
// TODO: Remove after monorepo cleanup.
|
|
"src/**/*.comp.ts"
|
|
]
|
|
}
|