Gate next-plugin and vite-plugin with one landing e2e suite - #636
Merged
Conversation
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.
Contributor
Changepacks@devup-ui/wasm@1.0.75 → 1.0.76 - bindings/devup-ui-wasm/package.jsonPatch
@devup-ui/bun-plugin@1.0.12 → 1.0.13 - packages/bun-plugin/package.jsonPatch
@devup-ui/components@0.1.50 → 0.1.51 - packages/components/package.jsonPatch
@devup-ui/next-plugin@1.0.80 → 1.0.81 - packages/next-plugin/package.jsonPatch
@devup-ui/plugin-utils@1.0.10 → 1.0.11 - packages/plugin-utils/package.jsonPatch
@devup-ui/react@1.0.37 → 1.0.38 - packages/react/package.jsonPatch
@devup-ui/reset-css@1.0.24 → 1.0.25 - packages/reset-css/package.jsonPatch
@devup-ui/rsbuild-plugin@1.0.58 → 1.0.59 - packages/rsbuild-plugin/package.jsonPatch
@devup-ui/vite-plugin@1.0.64 → 1.0.65 - packages/vite-plugin/package.jsonPatch
@devup-ui/webpack-plugin@1.0.63 → 1.0.64 - packages/webpack-plugin/package.jsonPatch
|
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apps/landingis 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 — thebenchmarkjob 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.globwas the only bundler-specific API left inapps/landing/src. Reverting it to the pre-migration form (runtimereaddir+ computedimport()) would have restored exactly the import opacity that #633's prewarm had to compensate for, soscript.js— which already runs before every build — now also emitssrc/utils/demos.generated.tswith explicit imports. The demo graph is statically visible to Turbopack and Vite alike, andgetDemoskeeps its contract. The generated file is committed and prettier-stable, so builds never dirty the tree.Mode-aware harness
LANDING_OUTPUT_ROOT/LANDING_BUILD_MODEselectapps/landing/outorapps/landing/dist/client._not-found.htmlbeside404.html; the route manifest accounts for that per mode.output: 'export'writes it as a directory tree and leaves the mapping to the host.serve-static.mjsresolves between the two, so the Next artifact runs under the same no-404/no-console-error assertions.Next build specifics
build:nextrestores the Next toolchain behindLANDING_BUILD_MODE=nextand differs from the deployed config in two deliberate ways: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 brokeclient navigation preserves browser state..rscartifacts. 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 CSStakes ~4s alone but shares one single-threaded static server with four route-render tests that each walk 63 routes tonetworkidle. 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-e2ejob, off the publish critical path.Verification
Local, all four combinations, final code:
DEVUP_SINGLE_CSS=1DEVUP_SINGLE_CSS=1Also
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
singleCssbuild 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.