Backport #1481: Auto-remove workflow packages from serverExternalPackages#1940
Open
github-actions[bot] wants to merge 2 commits intostablefrom
Open
Backport #1481: Auto-remove workflow packages from serverExternalPackages#1940github-actions[bot] wants to merge 2 commits intostablefrom
github-actions[bot] wants to merge 2 commits intostablefrom
Conversation
* Warn when serverExternalPackages hides workflow-enabled packages
Add a build-time warning when packages in serverExternalPackages contain
workflow code ('use step', 'use workflow', or serialization classes).
These packages are completely invisible to the workflow compiler when
externalized, causing silent runtime failures.
The warning detects workflow patterns via two methods:
- Fast path: check package.json dependencies for @workflow/serde
- Thorough path: read the package entry file and run pattern detection
Also adds documentation in the serialization guide about the
externalization footgun for 3rd-party packages.
* Auto-remove workflow packages from serverExternalPackages
When workflow-enabled dependencies are externalized in Next.js, compiler transforms are skipped and runtime failures follow. Detect those packages in withWorkflow, remove them from serverExternalPackages for the current build, and keep a generalized externalPackages warning fallback for non-Next builders.
* Address review feedback: add entry-point limitation comment and missing test case
Signed-off-by: Nathan Rajlich <n@n8.io>
🦋 Changeset detectedLatest commit: 5be7ba1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 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 |
Contributor
TooTallNate
approved these changes
May 5, 2026
Contributor
Author
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests▲ Vercel Production (4 failed)nextjs-turbopack (1 failed):
sveltekit (2 failed):
vite (1 failed):
💻 Local Development (82 failed)hono-stable (82 failed):
🌍 Community Worlds (83 failed)mongodb (11 failed):
redis (7 failed):
turso (65 failed):
Details by Category❌ ▲ Vercel Production
❌ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
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.
Automated backport of #1481 to
stable.AI recommendation: This is a self-contained bug-fix/UX improvement that auto-removes workflow-enabled packages from
serverExternalPackagesto avoid silent runtime failures, plus a best-effort warning fallback in builders. It targets existing functionality (withWorkflowand the builder pipeline) that exists onstable, includes new tests, and doesn't appear to depend onmain-only APIs, so backporting improves the stable user experience.Merge conflicts were resolved by AI (opencode with Claude Opus). Please review the conflict resolution carefully before merging.