feat: expose `waitUntil` also for serverless runtime & add docs (#14725)
authorLeon Scherer <55341374+Fruup@users.noreply.github.com>
Thu, 1 Jan 2026 19:01:50 +0000 (20:01 +0100)
committerGitHub <noreply@github.com>
Thu, 1 Jan 2026 19:01:50 +0000 (03:01 +0800)
* improvement: expose `waitUntil` also for serverless runtime & add documentation

* changeset

* revert previous changes and add docs

* revert previous changes

* change changeset

---------

Co-authored-by: Tee Ming <chewteeming01@gmail.com>
.changeset/slimy-tips-shake.md [new file with mode: 0644]
documentation/docs/25-build-and-deploy/90-adapter-vercel.md
packages/adapter-vercel/ambient.d.ts
packages/adapter-vercel/index.d.ts

diff --git a/.changeset/slimy-tips-shake.md b/.changeset/slimy-tips-shake.md
new file mode 100644 (file)
index 0000000..a4c8565
--- /dev/null
@@ -0,0 +1,5 @@
+---
+'@sveltejs/adapter-vercel': minor
+---
+
+chore: mark `RequestContext` as deprecated and refer to `@vercel/functions`
index 5a18b1466bdb7d628b02059b3b3896be9a135bfa..50f25f4a929951173cbf57dcbd8d393761d9c83f 100644 (file)
@@ -177,6 +177,10 @@ Cookie-based skew protection comes with one caveat: if a user has multiple versi
 
 ## Notes
 
+### Vercel utilities
+
+If you need Vercel-specific utilities like `waitUntil`, use the package [`@vercel/functions`](https://vercel.com/docs/functions/functions-api-reference/vercel-functions-package).
+
 ### Vercel functions
 
 If you have Vercel functions contained in the `api` directory at the project's root, any requests for `/api/*` will _not_ be handled by SvelteKit. You should implement these as [API routes](routing#server) in your SvelteKit app instead, unless you need to use a non-JavaScript language in which case you will need to ensure that you don't have any `/api/*` routes in your SvelteKit app.
index a106f64e3f1254298f085b1abaa573b7c61fafac..67464d3365d963af1c874d2dc9ce2b7833e3933f 100644 (file)
@@ -1,10 +1,12 @@
-import { RequestContext } from './index.js';
+import type { RequestContext } from './index.js';
 
 declare global {
        namespace App {
                export interface Platform {
                        /**
                         * `context` is only available in Edge Functions
+                        *
+                        * @deprecated Vercel's context is deprecated. Use [`@vercel/functions`](https://vercel.com/docs/functions/functions-api-reference/vercel-functions-package) instead.
                         */
                        context?: RequestContext;
                }
index c4ea25f7c4a21007958c549e29aacf13497fbe7e..e3333d04a88eec692e76a859c70365efa4dc63fb 100644 (file)
@@ -110,6 +110,8 @@ export type Config = (EdgeConfig | ServerlessConfig) & {
 /**
  * An extension to the standard `Request` object that is passed to every Edge Function.
  *
+ * @deprecated - use [`@vercel/functions`](https://vercel.com/docs/functions/functions-api-reference/vercel-functions-package) instead.
+ *
  * @example
  * ```ts
  * import type { RequestContext } from '@vercel/edge';