mirror of
https://github.com/vercel/vercel-plugin.git
synced 2026-09-14 15:39:47 +08:00
fbd90503b9
* [vercel-functions] Add long-duration, large functions, and Docker; harden anti-Edge guidance The skill had no coverage of several shipped Functions features, and carried stale numbers that produced actively wrong advice. New sections: - Duration and Long-Duration Functions — per-plan table, extended max duration beta (1800s) with its real constraints: per-function config only, supported runtime versions, no Secure Compute/Static IPs, HTTP/1.1 idle-connection caveat and the heartbeat workaround, getDeadline(), and when to use Workflow. - Large Functions — 250 MB / 500 MB Python standard limits, the 5 GB beta and VERCEL_SUPPORT_LARGE_FUNCTIONS opt-in, bundle trimming, and the separate 4.5 MB payload cap that gets confused with it. - Docker and Container Images — Dockerfile.vercel, PORT, scale-to-zero, the 30s SIGTERM grace period, per-instance log broadcast, Services with runtime: "container", VCR limits/pricing, and when not to containerize. - Plan Limits at a Glance, with a "What changed for Hobby" note: duration went 60s -> 300s for both default and max, and Basic CPU was replaced by Standard. Anti-Edge guidance is now prescriptive rather than advisory. "Rule #1: Node.js, never Edge" leads the skill with a directive to remove runtime = 'edge' on sight, a table answering each reason people reach for Edge, what Edge actually costs, and a migration recipe. A new validate rule flags runtime = 'edge' / "runtime": "edge" as an error, and the runtime-selection table and diagnostics trees no longer recommend Edge anywhere. Corrections to existing content: - Hobby max duration was listed as 10s; it is 300s. - waitUntil was shown taking a callback. It takes a Promise — the documented form silently did nothing. - memory was shown in vercel.json and in the OOM diagnostic; it cannot be set there (build warning) and is dashboard-only, Pro/Enterprise only. - Request bodies were listed as 100 MB; the documented cap is 4.5 MB. - 5 GB bundles were stated unconditionally; they require the opt-in beta. - Edge was described as a 25s hard limit; it is 25s to first byte, then up to 300s of streaming. - now.json removal was written in the future tense with a date now past. Also adds a summary field so the skill degrades to a short summary instead of being dropped entirely when it exceeds the injection budget, plus path/bash/ prompt signals for Dockerfile.vercel, vercel.ts, vercel vcr, and duration and bundle-size phrasing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Malte Ubl <89679+cramforce@users.noreply.github.com> * Correct the vercel.json memory claim Two problems with the previous wording, both flagged in review: "and is ignored" was not documented anywhere. The memory docs say only that setting it produces a build-time warning; whether the value is then discarded is not stated. Removed the invented consequence. "NOT settable in vercel.json" dropped a real qualifier. The vercel.json reference scopes it: "Memory cannot be set in vercel.json with Fluid compute enabled." The memory key remains valid for legacy non-Fluid deployments, which is why /docs/functions/configuring-functions/advanced-configuration still shows "memory": 3009 examples. Restored the Fluid qualifier in all four places and noted why older examples exist, so the skill doesn't read as contradicting Vercel's own docs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Malte Ubl <89679+cramforce@users.noreply.github.com> * Soften anti-Edge guidance to a strong recommendation; drop AWS mention The Edge guidance was written as a prohibition. Reframed as a strong default while keeping the one genuinely hard constraint — Next.js 16.3+ doesn't support runtime = 'edge', so migration is required there and only there. - Heading: "Rule #1: Node.js, never Edge" -> "Prefer Node.js over the Edge runtime" (all three internal anchors updated). - "Do not write it, do not suggest it, remove it on sight" -> prefer Node.js in new code, recommend migrating when found; a tested reason to stay on Edge is a legitimate call to make deliberately. - validate rule severity: error -> recommended. Existing Edge functions still work, so this is a nudge rather than a blocker. Message reworded to match. - Migration section now says it's worth doing when already touching the file, and required on Next.js 16.3+ — not an emergency otherwise. - vercel.json's runtime: "edge" moved out of the "cannot put here" list, since it is accepted; it's now a preference note. - Diagnostics: "Correct fix: delete" -> "Recommended fix: drop"; "Do NOT fix this by moving to Edge" -> "Moving to the Edge runtime is not the fix". - "Edge (legacy — do not choose this)" -> "(legacy — not recommended)". Also removes the infrastructure-provider attribution from the 250 MB bundle limit, and drops a redundant sentence from the long-function cost note. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Malte Ubl <89679+cramforce@users.noreply.github.com> --------- Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: Malte Ubl <89679+cramforce@users.noreply.github.com>