mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
37312edd0a
* Default source maps to dev-on / prod-off Inline source maps are embedded in the step bundle and the intermediate workflow VM bundle, which bloats production function bundles (a problem for the Vercel 250MB limit) even though maps only help when reading a stack trace. Make the default environment-aware in @workflow/builders: inline in development (next dev / nitro dev / Vite-based dev servers, detected via config.watch or NODE_ENV=development) and off in production. The `sourcemap` config option and `WORKFLOW_SOURCEMAP` env var still override in either environment. A production build with no override also drops the source-map-support shim from the Vercel step function. Keep runtime stack remapping graceful and fast when maps are absent (@workflow/core): short-circuit when no frame references the workflow file and memoize the parsed map (or its absence) per bundle, so production failures don't rescan the bundle. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test(e2e): make source-map expectations match dev-on/prod-off default The e2e error-stack tests gate source-map assertions on hasWorkflowSourceMaps() and hasStepSourceMaps(). Now that source maps default to off in production builds, update those helpers: - hasWorkflowSourceMaps(): false for all production builds (local prod, postgres, Vercel — keyed off DEV_TEST_CONFIG), and exclude nest in dev (the Nest integration builds with watch:false / no NODE_ENV=development, so its bundles have no maps). - hasStepSourceMaps(): nest now resolves to a production build (maps off) in both dev and prod. Add unit cases for the dev-vs-prod and nest behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
230 B
230 B
@workflow/core
| @workflow/core |
|---|
| patch |
Speed up workflow stack-trace remapping when source maps are absent (production default): skip bundle scanning when no frame references the workflow file and memoize parsed source maps per bundle.