Skip to content

Gate next-plugin and vite-plugin with one landing e2e suite - #636

Merged
owjs3901 merged 1 commit into
mainfrom
owjs3901/dual-plugin-e2e
Aug 23, 2026
Merged

Gate next-plugin and vite-plugin with one landing e2e suite#636
owjs3901 merged 1 commit into
mainfrom
owjs3901/dual-plugin-e2e

Conversation

@owjs3901

Copy link
Copy Markdown
Contributor

Summary

apps/landing is the only real-scale acceptance target in this repository. #631 migrated it to vinext, which left @devup-ui/next-plugin's Turbopack production CSS path with no e2e coverage at all — the benchmark job builds turbo Next apps but only prints byte counts, it asserts nothing.

That gap matters for this specific bug class: #633's race only reproduced across a 64-route build's extraction waves. A toy app cannot stand in for it.

This builds the same sources with both bundlers and runs the same 128 assertions and the same screenshot baselines against each artifact. vinext still produces the deployed output; the Next build is CI-only and never deployed.

Source compatibility

import.meta.glob was the only bundler-specific API left in apps/landing/src. Reverting it to the pre-migration form (runtime readdir + computed import()) would have restored exactly the import opacity that #633's prewarm had to compensate for, so script.js — which already runs before every build — now also emits src/utils/demos.generated.ts with explicit imports. The demo graph is statically visible to Turbopack and Vite alike, and getDemos keeps its contract. The generated file is committed and prettier-stable, so builds never dirty the tree.

Mode-aware harness

  • LANDING_OUTPUT_ROOT / LANDING_BUILD_MODE select apps/landing/out or apps/landing/dist/client.
  • Next's export emits _not-found.html beside 404.html; the route manifest accounts for that per mode.
  • Next 16's segment-cache prefetch requests a flat dot-joined payload name while output: 'export' writes it as a directory tree and leaves the mapping to the host. serve-static.mjs resolves between the two, so the Next artifact runs under the same no-404/no-console-error assertions.

Next build specifics

build:next restores the Next toolchain behind LANDING_BUILD_MODE=next and differs from the deployed config in two deliberate ways:

  • drops deploymentId — Next reads it as skew protection and falls back to a full page load whenever the host cannot echo the id, which a plain static host never can. This is what broke client navigation preserves browser state.
  • skips the static RSC transport — it exists only to feed vinext's navigation runtime from .rsc artifacts. Next emits none, so installing it would turn every RSC prefetch into a 404 the suite rightly fails on.

Flake fix

serves every local asset referenced by exported HTML and CSS takes ~4s alone but shares one single-threaded static server with four route-render tests that each walk 63 routes to networkidle. Serial requests starved past the default 60s budget. It now uses a bounded request pool and states its real budget — relevant because this PR doubles the number of e2e runs.

CI

The Next pair runs in a parallel landing-next-e2e job, off the publish critical path.

Verification

Local, all four combinations, final code:

build CSS mode result
vinext default 128/128
vinext DEVUP_SINGLE_CSS=1 128/128
Next 16 + Turbopack default 128/128
Next 16 + Turbopack DEVUP_SINGLE_CSS=1 128/128

Also bunx eslint (0 errors), bunx tsc --noEmit -p apps/landing/tsconfig.json, and the pre-commit hook (Rust fmt/clippy/coverage plus 5,135 Bun tests).

I could not force #633's race to reproduce on demand: with the prewarm disabled the Next singleCss build still emitted complete CSS on this machine and the suite passed. The race was reported against Linux CI timing, so this is a coverage restoration rather than a reproducer.

No published package source changes, so no changepack.

The landing app is the repository's only real-scale acceptance target, and
migrating it to vinext left `@devup-ui/next-plugin`'s Turbopack production
CSS path with no e2e coverage at all. That path's last regression (#633)
only reproduced across a 64-route build's extraction waves, so a toy app
cannot replace it.

Build the same sources with both bundlers and run the same 128 assertions
and the same screenshot baselines against each artifact. vinext still
produces the deployed output; the Next build is CI-only.

- replace `import.meta.glob` demo discovery with a barrel generated by
  `script.js`, so the demo graph is statically visible to Turbopack and
  Vite alike instead of to only one of them
- resolve the artifact root and the not-found manifest from
  LANDING_BUILD_MODE, and teach the static server Next's nested
  segment-cache payload layout
- restore the Next toolchain behind `build:next`, which drops
  `deploymentId` (Next reads it as skew protection and hard-navigates when
  a static host cannot echo it) and skips the vinext-only RSC transport
- give the local-asset sweep a stated budget and a bounded request pool;
  it takes ~4s alone but starved past 60s against the route-render tests
- run the Next pair in a parallel `landing-next-e2e` job

Verified locally, 128/128 in all four combinations: vinext and Next, each
with default and DEVUP_SINGLE_CSS=1.
@github-actions

Copy link
Copy Markdown
Contributor

Changepacks

@devup-ui/wasm@1.0.75 → 1.0.76 - bindings/devup-ui-wasm/package.json

Patch

  • Add plugin-configured custom shorthands with generated TypeScript completion

@devup-ui/bun-plugin@1.0.12 → 1.0.13 - packages/bun-plugin/package.json

Patch

  • Add plugin-configured custom shorthands with generated TypeScript completion

@devup-ui/components@0.1.50 → 0.1.51 - packages/components/package.json

Patch

  • Auto-update: depends on '@devup-ui/react' via a local workspace dependency

@devup-ui/next-plugin@1.0.80 → 1.0.81 - packages/next-plugin/package.json

Patch

  • Add plugin-configured custom shorthands with generated TypeScript completion
  • Prevent incomplete CSS in Turbopack production builds by prewarming application and external global style entries

@devup-ui/plugin-utils@1.0.10 → 1.0.11 - packages/plugin-utils/package.json

Patch

  • Add plugin-configured custom shorthands with generated TypeScript completion
  • Prevent incomplete CSS in Turbopack production builds by prewarming application and external global style entries

@devup-ui/react@1.0.37 → 1.0.38 - packages/react/package.json

Patch

  • Add plugin-configured custom shorthands with generated TypeScript completion

@devup-ui/reset-css@1.0.24 → 1.0.25 - packages/reset-css/package.json

Patch

  • Auto-update: depends on '@devup-ui/react' via a local workspace dependency

@devup-ui/rsbuild-plugin@1.0.58 → 1.0.59 - packages/rsbuild-plugin/package.json

Patch

  • Add plugin-configured custom shorthands with generated TypeScript completion

@devup-ui/vite-plugin@1.0.64 → 1.0.65 - packages/vite-plugin/package.json

Patch

  • Add plugin-configured custom shorthands with generated TypeScript completion

@devup-ui/webpack-plugin@1.0.63 → 1.0.64 - packages/webpack-plugin/package.json

Patch

  • Add plugin-configured custom shorthands with generated TypeScript completion

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@owjs3901
owjs3901 merged commit 387b0cd into main Aug 23, 2026
4 checks passed
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.

1 participant