presets(vercel): support local queue delivery during dev#4340
presets(vercel): support local queue delivery during dev#4340RihanArfan wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/presets/vercel/preset.ts`:
- Line 156: Update the dynamic import used in the async loader expression (the
arrow function async (nitro) => await import("./dev").then((m) =>
m.vercelDev(nitro))) to use an explicit module extension; replace
import("./dev") with an explicit import path such as import("./dev.ts") (or .mjs
if that matches your build) so the ESM import rule for src/**/*.{ts,js} is
respected.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8a7e34ef-1117-4ff9-897c-358460ac930b
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (6)
docs/2.deploy/20.providers/vercel.mdpackage.jsonsrc/presets/_types.gen.tssrc/presets/vercel/dev.tssrc/presets/vercel/preset.tssrc/presets/vercel/runtime/queue.dev.ts
| { | ||
| extends: "nitro-dev", | ||
| modules: [ | ||
| async (nitro) => await import("./dev").then((m) => m.vercelDev(nitro)), |
There was a problem hiding this comment.
Use an explicit extension in the dynamic import.
Line 156 uses import("./dev"). Please switch to an explicit extension (.ts/.mjs) for consistency with the repository ESM import rule.
Suggested patch
- async (nitro) => await import("./dev").then((m) => m.vercelDev(nitro)),
+ async (nitro) => await import("./dev.ts").then((m) => m.vercelDev(nitro)),As per coding guidelines, src/**/*.{ts,js} imports should use explicit .ts/.mjs extensions.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/presets/vercel/preset.ts` at line 156, Update the dynamic import used in
the async loader expression (the arrow function async (nitro) => await
import("./dev").then((m) => m.vercelDev(nitro))) to use an explicit module
extension; replace import("./dev") with an explicit import path such as
import("./dev.ts") (or .mjs if that matches your build) so the ESM import rule
for src/**/*.{ts,js} is respected.
Source: Coding guidelines
🔗 Linked issue
Backport of #4264 to v2
❓ Type of change
📚 Description
Support Vercel Queues during local development. Calling
send()from@vercel/queuewill call the consumers registered withinnitro.config.ts.Uses
@vercel/queueregisterDevConsumer()to enable passing queue triggers and consumers to register allowing bypassing registration viavercel.json.📝 Checklist