mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
32a17b4033
* fix(next): resolve bare specifiers in copied step files for lazy discovery When the deferred builder copies step files to __workflow_step_files__/, bare specifiers that are transitive SDK deps can't resolve from the app directory. Use enhanced-resolve with ESM conditions (preferring 'import' over 'require') to resolve from the original source location, only when the specifier can't be resolved from the app directory. Also add enhanced-resolve to the pnpm catalog and use catalog: in both @workflow/builders and @workflow/next. * fix(next): address review feedback on lazy discovery resolver - Cache ESM/CJS resolvers as class fields instead of re-creating per call - Remove redundant try/catch (resolveBareCopiedStepSpecifier already returns undefined on failure) - Use shared NODE_RESOLVE_OPTIONS / NODE_ESM_RESOLVE_OPTIONS matching the configuration in swc-esbuild-plugin.ts for consistent resolution
408 B
408 B
@workflow/next, @workflow/builders
| @workflow/next | @workflow/builders |
|---|---|
| patch | patch |
Fix lazy discovery bare specifier resolution in copied step files
- Use
enhanced-resolvewith ESM conditions to resolve bare specifiers from the original source file's location - Only rewrite specifiers that can't resolve from the app directory (transitive SDK deps)
- Add
enhanced-resolveto pnpm catalog and usecatalog:in both packages