[tarballs] Build workspace deps before packing#1908
Merged
Conversation
The standalone tarballs project's vercel.json sets "buildCommand": "pnpm --filter tarballs build", which only runs the tarballs package's build script (node scripts/pack.ts) and does not trigger turbo's `dependsOn: ["^build"]` chain. Every workspace package gets packed with an empty dist/ directory, so downstream installs fail with errors like "Cannot find module '<pkg>/dist/next.cjs'". The previous docs-based pipeline didn't hit this because Vercel detected docs as a Next.js framework, ran turbo for it, and pack.ts was wired as a prebuild step that ran after deps were already built. Switch the buildCommand to `pnpm turbo build --filter=tarballs` so turbo evaluates the build task for tarballs, fans out via ^build to compile every workspace dependency first, and only then runs tarballs#build (pack.ts) against the populated dist/ directories. Verified locally: a fresh build now produces tarballs containing the full dist/ tree (including dist/next.cjs). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
🦋 Changeset detectedLatest commit: 881c6f9 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 |
Contributor
🧪 E2E Test Results✅ All tests passed Summary
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
|
Contributor
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
workflow with 1 step💻 Local Development
▲ Production (Vercel)
workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
workflow with 10 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
workflow with 25 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
workflow with 50 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
workflow with 10 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
workflow with 25 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
workflow with 50 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
stream pipeline with 5 transform steps (1MB)💻 Local Development
▲ Production (Vercel)
10 parallel streams (1MB each)💻 Local Development
▲ Production (Vercel)
fan-out fan-in 10 streams (1MB each)💻 Local Development
▲ Production (Vercel)
SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
|
2 tasks
pranaygp
approved these changes
May 4, 2026
VaguelySerious
added a commit
that referenced
this pull request
May 4, 2026
ziyak97
pushed a commit
to ziyak97/workflow
that referenced
this pull request
May 4, 2026
pranaygp
added a commit
that referenced
this pull request
May 4, 2026
…ovements * origin/main: web: configure vercelPreset() for Vercel deployments (#1815) [core] Combine flow+step bundle and process steps eagerly (#1338) [world-vercel] Revert stream close control framing (#1891) [tarballs] Use turbo to build workspace deps before packing (#1908) # Conflicts: # tarballs/vercel.json
pranaygp
added a commit
that referenced
this pull request
May 5, 2026
…ignal * origin/main: [core] Skip inline step execution when suspension also has a wait (#1924) [errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915) Fix compatibility with Zod 4.4.x (#1902) Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851) tarballs: redesign preview tarballs index page (#1911) Remove extra changeset (#1922) Add stable Next.js eager and lazy test coverage (#1747) Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878) fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807) Allow disabling step sourcemap with new `sourcemap` option in builders (#1842) [ci] Enable Vercel-prod e2e for tanstack-start (#1904) web: configure vercelPreset() for Vercel deployments (#1815) [core] Combine flow+step bundle and process steps eagerly (#1338) [world-vercel] Revert stream close control framing (#1891) [tarballs] Use turbo to build workspace deps before packing (#1908) # Conflicts: # packages/core/src/runtime/step-handler.test.ts # packages/core/src/runtime/step-handler.ts # packages/core/src/runtime/suspension-handler.ts # packages/core/src/step.test.ts # packages/world-local/src/storage/events-storage.ts # packages/world-postgres/src/drizzle/migrations/meta/_journal.json
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
The
tarballsVercel project'svercel.jsonsetswhich only runs the
tarballspackage'sbuildscript (node scripts/pack.ts) and does not trigger turbo'sdependsOn: ["^build"]chain. As a result every preview tarball gets packed with an emptydist/directory — onlybin/,package.json,README.md, anddocs/make it in. Downstream installs then fail with errors like:The old docs-based pipeline did not hit this because Vercel detected
docsas a Next.js framework, ran turbo for it (which fans out via^build), andpack.tswas wired as aprebuildstep that ran after workspace deps were already built. Splitting tarballs out of docs in #1893 dropped that side-effect.The fix is one line: switch the build command to
so turbo evaluates the build task for
tarballs, fans out via^buildto compile every workspace dependency first, and only then runstarballs#build(pack.ts) against the populateddist/directories.Test plan
pnpm turbo build --filter=tarballslocally — output tarballs contain the fulldist/tree (verifiedpackage/dist/next.cjsis present intarballs/public/workflow.tgz).workflow/nextcorrectly when installed in a downstream Next.js app.🤖 Generated with Claude Code