test: enable step source-map assertions for vite local dev#1862
test: enable step source-map assertions for vite local dev#1862TooTallNate merged 3 commits intomainfrom
Conversation
Vite ^7.3.2 (bumped in #1827) preserves step bundle source maps in dev mode, so stack traces now contain original file paths. Update hasStepSourceMaps() so vite returns true in local dev and stays false only in local prod, fixing the consistently failing 'basic step error' and 'cross-file step error' e2e tests.
🦋 Changeset detectedLatest commit: 072a4d0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🧪 E2E Test Results✅ All tests passed Summary
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
|
📊 Benchmark Results
workflow with no steps💻 Local Development
workflow with 1 step💻 Local Development
workflow with 10 sequential steps💻 Local Development
workflow with 25 sequential steps💻 Local Development
workflow with 50 sequential steps💻 Local Development
Promise.all with 10 concurrent steps💻 Local Development
Promise.all with 25 concurrent steps💻 Local Development
Promise.all with 50 concurrent steps💻 Local Development
Promise.race with 10 concurrent steps💻 Local Development
Promise.race with 25 concurrent steps💻 Local Development
Promise.race with 50 concurrent steps💻 Local Development
workflow with 10 sequential data payload steps (10KB)💻 Local Development
workflow with 25 sequential data payload steps (10KB)💻 Local Development
workflow with 50 sequential data payload steps (10KB)💻 Local Development
workflow with 10 concurrent data payload steps (10KB)💻 Local Development
workflow with 25 concurrent data payload steps (10KB)💻 Local Development
workflow with 50 concurrent data payload steps (10KB)💻 Local Development
Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
stream pipeline with 5 transform steps (1MB)💻 Local Development
10 parallel streams (1MB each)💻 Local Development
fan-out fan-in 10 streams (1MB each)💻 Local Development
SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
|
There was a problem hiding this comment.
Pull request overview
Adjusts the e2e “step error preserves stack trace” assertions for Vite local dev after the Vite upgrade started preserving step bundle source maps in dev mode.
Changes:
- Update
hasStepSourceMaps()to allow Vite local dev to assert original source filenames in stacks (while keeping local prod behavior unchanged). - Add an (empty) changeset note documenting the Vite local-dev e2e fix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/core/e2e/utils.ts | Refines step sourcemap support matrix so Vite local dev no longer disables stack source assertions. |
| .changeset/fix-vite-step-source-maps-e2e.md | Documents the reason for the Vite local-dev e2e assertion change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The default `!DEV_TEST_CONFIG` fall-through already returns false for vite local prod, so the vite-specific guard is dead code. Just remove the vite block entirely now that vite local dev matches the default 'has source maps' behavior.
* test: enable step source-map assertions for vite local dev Vite ^7.3.2 (bumped in #1827) preserves step bundle source maps in dev mode, so stack traces now contain original file paths. Update hasStepSourceMaps() so vite returns true in local dev and stays false only in local prod, fixing the consistently failing 'basic step error' and 'cross-file step error' e2e tests. * chore: drop body from empty changeset * address review: drop redundant vite local-prod guard The default `!DEV_TEST_CONFIG` fall-through already returns false for vite local prod, so the vite-specific guard is dead code. Just remove the vite block entirely now that vite local dev matches the default 'has source maps' behavior.
Summary
basic step error preserves message and stack traceandcross-file step error preserves message and function names in stackhave been failing consistently since #1827 bumpedworkbench/vitefromvite@^7.1.12tovite@^7.3.2.99_e2e.ts,helpers.ts). However,hasStepSourceMaps()inpackages/core/e2e/utils.tsstill hard-codes vite as having no step source maps in any local environment, so the assertionexpect(stack).not.toContain('99_e2e.ts')fails.hasStepSourceMaps()entirely. Vite local dev now falls through to the defaultreturn true, while vite local prod is still caught by the existing!DEV_TEST_CONFIGguard further down — so local-prod behavior is unchanged.Why this took 6 days to surface
28dc089e) fixed the env-var bug, finally letting vite local dev run — and it surfaced this assertion failure.Reference failing run: https://github.com/vercel/workflow/actions/runs/25067758534/job/73444472541