build: use inline sourcemaps across all workspace packages#1799
Conversation
🦋 Changeset detectedLatest commit: 4c4d26e The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
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 |
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Express | Nitro workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 10 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) workflow with 25 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 50 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 10 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 25 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 50 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Express | Nitro Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro stream pipeline with 5 transform steps (1MB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) 10 parallel streams (1MB each)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express fan-out fan-in 10 streams (1MB each)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
Check the workflow run for details. |
🧪 E2E Test Results✅ All tests passed Summary
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
|
There was a problem hiding this comment.
Pull request overview
This PR stabilizes Windows Turbopack/SWC behavior in the monorepo by switching TypeScript sourcemap emission to inline sourcemaps across all workspace packages, avoiding external .js.map files that Turbopack mis-resolves on Windows and can crash the SWC worker.
Changes:
- Update the shared
@workflow/tsconfig/base.jsonto emit inline sourcemaps (inlineSourceMap: true) and stop emitting external.js.mapfiles (sourceMap: false). - Remove now-redundant per-package sourcemap overrides from
@workflow/coreandworkflowtsconfigs. - Add a changeset describing the cross-workspace packaging/output change.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/tsconfig/base.json |
Centralizes inline sourcemap settings for all TS packages extending the base config. |
packages/core/tsconfig.json |
Drops per-package sourcemap overrides now covered by the base config. |
packages/workflow/tsconfig.json |
Drops per-package sourcemap overrides now covered by the base config. |
.changeset/windows-inline-sourcemaps.md |
Publishes patch bumps for many packages and documents the Windows Turbopack/SWC workaround. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Prevents a Turbopack bug on Windows that caused the SWC worker to crash when reading external .js.map files in workspace-linked packages (paths were concatenated with mixed separators like 'packages/serde/dist\\index.js.map'). Once the worker crashed, the module graph entered a broken state where all subsequent requests returned 500, manifesting as flaky E2E Windows tests where the 'should rebuild on imported step dependency change' test would time out waiting for /api/workflows/start to succeed. Extends the original fix from #352 (previously applied only to @workflow/core and workflow) to the shared base tsconfig.json so that all packages producing a dist/ output benefit.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nathan Rajlich <n@n8.io>
110a659 to
4c4d26e
Compare
|
Backport PR opened against |
Summary
Generalizes the
inlineSourceMap: truetsconfig override that #352 previously applied only to@workflow/core(and laterworkflow) to the shared@workflow/tsconfig/base.json. All workspace packages that extend the base config now produce inline sourcemaps instead of external.js.mapfiles.Note
While investigating a flaky Windows E2E test I originally suspected this sourcemap read error:
…was the root cause. It's not — that message is a non-fatal Turbopack warning. The Windows CI flake is caused by something else (see the linked issue for follow-up investigation). Landing this PR still cleans up the warning noise and removes two one-off per-package overrides, but it will not stabilize the Windows E2E job on its own.
Why still land this
@workflow/coreandworkflow..js.mapfiles (source is still embedded inline viainlineSources: true, so debugging experience is unchanged)..d.ts.mapfiles are still produced (they aren't read by Turbopack's SWC sourcemap reader, only by IDEs for Go-to-Definition).Testing
@workflow/serde,@workflow/core, andworkflowlocally —.js.mapfiles are no longer emitted; sourcemaps are embedded assourceMappingURL=data:application/json;base64,....pnpm typecheckandpnpm testpass for the affected packages.