Skip to content

web: drop packages/ and composite from tsc -p . graph#22102

Open
GirlBossRush wants to merge 1 commit intogoauthentik:mainfrom
GirlBossRush:issue-22100-web-tsc--p-is-slow-during
Open

web: drop packages/ and composite from tsc -p . graph#22102
GirlBossRush wants to merge 1 commit intogoauthentik:mainfrom
GirlBossRush:issue-22100-web-tsc--p-is-slow-during

Conversation

@GirlBossRush
Copy link
Copy Markdown
Contributor

Closes #22100.

Change

web/tsconfig.json:

  • Exclude packages/ from the tsc -p . include graph.
  • Set composite: false (the base @goauthentik/tsconfig enables it).

Why

tsc -p . was pulling 2719 non-node_modules files into the program; 912 of those were generated files in packages/client-ts/src/. Each workspace subpackage already type-checks itself via its own composite tsconfig and is consumed by web through compiled .d.ts outputs (e.g. @goauthentik/api/dist/*.d.ts), so they don't need to be re-checked from the top-level program.

Excluding packages/ triggered TS6307 because the base config sets composite: true, and @goauthentik/core imports get followed back into web/packages/core/. Nothing in the repo references web as a project, so disabling composite for this leaf is safe. incremental is still inherited from the base, so the .tsbuildinfo cache continues to drive warm runs.

Measurements (this branch)

before after Δ
tsc -p . cold 26.3s 22.7s -14%
tsc -p . warm 4.1s 3.5s -15%
npm run precommit warm 39.9s 37.9s -5%

Coverage

Unchanged. Each excluded subpackage type-checks itself; stories, tests, and e2e remain in the include set.

…k#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>
@GirlBossRush GirlBossRush requested a review from a team as a code owner May 6, 2026 21:32
@netlify
Copy link
Copy Markdown

netlify Bot commented May 6, 2026

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit e9a2609
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/69fbb383f40d9a00083599fc
😎 Deploy Preview https://deploy-preview-22102--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 6, 2026

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit e9a2609
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69fbb38363cd410008090903
😎 Deploy Preview https://deploy-preview-22102--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 6, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit e9a2609
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69fbb384e051fd00089a6156
😎 Deploy Preview https://deploy-preview-22102--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.19%. Comparing base (9f17d6d) to head (e9a2609).
⚠️ Report is 38 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22102      +/-   ##
==========================================
+ Coverage   93.15%   93.19%   +0.03%     
==========================================
  Files        1024     1026       +2     
  Lines       59278    59410     +132     
  Branches      400      400              
==========================================
+ Hits        55223    55365     +142     
+ Misses       4055     4045      -10     
Flag Coverage Δ
conformance 36.85% <ø> (-0.05%) ⬇️
e2e 42.05% <ø> (-0.05%) ⬇️
integration 32.76% <ø> (-0.54%) ⬇️
rust 0.00% <ø> (ø)
unit 92.15% <ø> (+0.06%) ⬆️
unit-migrate 92.18% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web: tsc -p . is slow during npm run precommit

1 participant