Skip to content

web: Allow the vite oxc transform to compile co-located unit tests. - #23991

Merged
GirlBossRush merged 1 commit into
mainfrom
web/vite-oxc-test-transform
Aug 7, 2026
Merged

GirlBossRush merged 1 commit into
mainfrom
web/vite-oxc-test-transform

Conversation

@GirlBossRush

Copy link
Copy Markdown
Contributor

Details

What does this PR change?

One config change in the "Unit Tests" vitest project: oxc: { tsconfig: false }, disabling the per-file tsconfig discovery that Vite 8's built-in oxc transform performs when compiling TypeScript test files.

Today that discovery makes every co-located unit test under web/src/ fail before running: the root tsconfig.json excludes src/**/*.test.ts, and the transform refuses excluded files with [TSCONFIG_ERROR] Tsconfig not found. The committed src/polyfill/custom-elements-get-name.unit.test.ts fails this way today (masked in CI, see #23989). Tests under test/unit/ are unaffected; they have their own tsconfig.

This only touches how vitest compiles test files. lint:types, the build, ESLint, and Prettier are unchanged — this is the transform half of the oxc toolchain that ships inside Vite 8, not the Oxlint/Oxfmt adoption tracked in #23519, which stays deferred.

Why is this change needed?

Upcoming router PRs (#23990, #23988) ship co-located unit tests under web/src/, and the existing polyfill test should run at all. Scoping the workaround to the vitest project keeps the root tsconfig excludes intact for typechecking; when the broader oxc story lands via #23519, this line is the marker for revisiting.

How was this tested?

pnpm exec vitest run --project "Unit Tests" from web/: the polyfill test file compiles and passes (previously failed at transform); test/unit/ unaffected (41 tests total). pnpm run lint:types output identical before and after.

Linked issues

refs #23519


Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)

@netlify

netlify Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 7da09b4
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a761547017d080008d77402
😎 Deploy Preview https://deploy-preview-23991--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

netlify Bot commented Jul 13, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 1e0b16d
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a556f0cdf710a0008e02f3e
😎 Deploy Preview https://deploy-preview-23991--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

codecov Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.37%. Comparing base (1c4e990) to head (7da09b4).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #23991   +/-   ##
=======================================
  Coverage   91.37%   91.37%           
=======================================
  Files        1137     1137           
  Lines       71591    71591           
  Branches     3875     3875           
=======================================
  Hits        65416    65416           
  Misses       6140     6140           
  Partials       35       35           
Flag Coverage Δ
conformance 34.82% <ø> (ø)
e2e 39.55% <ø> (+0.01%) ⬆️
integration 31.40% <ø> (+<0.01%) ⬆️
rust 38.89% <ø> (ø)
unit 93.03% <ø> (ø)
unit-migrate 93.06% <ø> (+<0.01%) ⬆️

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

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

@github-actions

github-actions Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-7da09b4ddb52a643e1f32c67b2d1335094a0d90c
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-7da09b4ddb52a643e1f32c67b2d1335094a0d90c

Afterwards, run the upgrade commands from the latest release notes.

@GirlBossRush
GirlBossRush force-pushed the web/vite-oxc-test-transform branch from 1e0b16d to 8002f21 Compare August 7, 2026 16:26
Vite 8's vite:oxc plugin does per-file tsconfig discovery and refuses to
transform src/**/*.unit.test.ts because the root tsconfig.json excludes
src/**/*.test.ts. Disable tsconfig discovery for the Node "Unit Tests"
project so oxc transforms those files, leaving tsconfig.json's excludes
and tsgo -p . untouched.
@GirlBossRush
GirlBossRush force-pushed the web/vite-oxc-test-transform branch from 8002f21 to 7da09b4 Compare August 7, 2026 17:26
@GirlBossRush GirlBossRush self-assigned this Aug 7, 2026
@GirlBossRush GirlBossRush added the area:frontend Features or issues related to the browser, TypeScript, Node.js, etc label Aug 7, 2026
@GirlBossRush GirlBossRush moved this to Needs review in authentik Core Aug 7, 2026
@github-project-automation github-project-automation Bot moved this from Needs review to In Progress in authentik Core Aug 7, 2026
@GirlBossRush
GirlBossRush merged commit a73e8b2 into main Aug 7, 2026
143 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Aug 7, 2026
@GirlBossRush
GirlBossRush deleted the web/vite-oxc-test-transform branch August 7, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Features or issues related to the browser, TypeScript, Node.js, etc

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants