-
Notifications
You must be signed in to change notification settings - Fork 246
refactor(nitro): use nitro v3 functionRules workflow routes
#1575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RihanArfan
wants to merge
19
commits into
main
Choose a base branch
from
feat/nitro-builder-improvement
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
ae775a6
chore(deps): bump nitro catalog to 3.0.260415-beta
RihanArfan d73a335
refactor(nitro)!: use nitro v3 `functionRules` for vercel workflow ro…
RihanArfan 990fd75
fix(nitro): chain pre-built workflow bundle sourcemaps through nitro'…
RihanArfan 0eb6c1a
Merge branch 'main' into feat/nitro-builder-improvement
RihanArfan 0a10088
perf: use rolldown filters
RihanArfan ec263ef
feat: support passing esbuld options to @workflow/builder
RihanArfan f50d2f2
refactor: replace workflow:force-inline rollup hook with noExternals
RihanArfan 310bc62
Merge remote-tracking branch 'origin/main' into feat/nitro-builder-im…
RihanArfan 73cea8e
fix(nitro): handle noExternals true/false, merge functionRules, align…
RihanArfan 503049b
feat(nitro): support nitro virtual imports via #imports
RihanArfan 437c23d
test: add sourcemap loader plugin tests
RihanArfan d7d9685
Merge branch 'main' into feat/nitro-builder-improvement
VaguelySerious c31b398
Merge remote-tracking branch 'origin/main' into feat/nitro-builder-im…
RihanArfan f29c92e
fix: use source maps in vercel runtime with nitro for workflow routes
RihanArfan 37e6ba0
chore(deps): update to latest nitro beta
RihanArfan c2d1b17
Merge branch 'main' into feat/nitro-builder-improvement
VaguelySerious 22a28da
Merge branch 'main' into feat/nitro-builder-improvement
RihanArfan 9606de5
fix(nitro): make source maps opt in
RihanArfan d0ca3cb
test: update for nitro
RihanArfan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| "@workflow/builders": minor | ||
| "@workflow/nitro": patch | ||
| --- | ||
|
|
||
| `@workflow/builders`: allow passing extra esbuild options merged into every bundle the builder produces (steps, intermediate workflow, final workflow wrapper, and webhook) via a new `esbuildOptions` config field. | ||
|
|
||
| `@workflow/nitro`: pass `sourcesContent: false` to the underlying builder so sources aren't duplicated — nitro re-bundles these outputs and inlines sourcemaps via `workflowSourcemapLoaderPlugin`. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@workflow/nitro": patch | ||
| --- | ||
|
|
||
| Bundle workflow routes within the Nitro server using base builder, use Nitro v3 `functionRules` for Vercel workflow routes |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AI Review: Nit
esbuildOptions: Partial<BuildOptions>is a broad surface for one knobThe new field accepts the full esbuild
BuildOptionsand is spread into four bundle calls with very different needs (steps: node/esm, workflow VM: neutral/cjs, webhook: node/esm, final wrapper: node/esm). The current spread order puts user options first so builder-required options likeplatform,format,bundle,pluginswin — that's defensive — but the API still implies "you can pass any esbuild option" when in practice almost everything that matters is overridden.Given the only consumer is
sourcesContent: false, consider either narrowing the public type to a small allowlist or naming the field something closer to its actual purpose. Not blocking, but the surface area will be hard to take back later.