@sveltejs/adapter-vercel 6.2.0 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ambient.d.ts CHANGED
@@ -1,10 +1,12 @@
1
- import { RequestContext } from './index.js';
1
+ import type { RequestContext } from './index.js';
2
2
 
3
3
  declare global {
4
4
  namespace App {
5
5
  export interface Platform {
6
6
  /**
7
7
  * `context` is only available in Edge Functions
8
+ *
9
+ * @deprecated Vercel's context is deprecated. Use [`@vercel/functions`](https://vercel.com/docs/functions/functions-api-reference/vercel-functions-package) instead.
8
10
  */
9
11
  context?: RequestContext;
10
12
  }
package/index.d.ts CHANGED
@@ -110,6 +110,8 @@ export type Config = (EdgeConfig | ServerlessConfig) & {
110
110
  /**
111
111
  * An extension to the standard `Request` object that is passed to every Edge Function.
112
112
  *
113
+ * @deprecated - use [`@vercel/functions`](https://vercel.com/docs/functions/functions-api-reference/vercel-functions-package) instead.
114
+ *
113
115
  * @example
114
116
  * ```ts
115
117
  * import type { RequestContext } from '@vercel/edge';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/adapter-vercel",
3
- "version": "6.2.0",
3
+ "version": "6.3.0",
4
4
  "description": "A SvelteKit adapter that creates a Vercel app",
5
5
  "keywords": [
6
6
  "adapter",
@@ -41,8 +41,8 @@
41
41
  "@sveltejs/vite-plugin-svelte": "^6.0.0-next.3",
42
42
  "@types/node": "^18.19.119",
43
43
  "typescript": "^5.3.3",
44
- "vitest": "^3.2.4",
45
- "@sveltejs/kit": "^2.49.0"
44
+ "vitest": "^4.0.0",
45
+ "@sveltejs/kit": "^2.49.3"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@sveltejs/kit": "^2.4.0"
package/utils.js CHANGED
@@ -121,6 +121,7 @@ export function resolve_runtime(default_key, override_key) {
121
121
  }
122
122
 
123
123
  const valid_node_versions = [20, 22, 24];
124
+ const formatter = new Intl.ListFormat('en', { type: 'disjunction' });
124
125
 
125
126
  /** @returns {RuntimeKey} */
126
127
  function get_default_runtime() {
@@ -131,7 +132,7 @@ function get_default_runtime() {
131
132
 
132
133
  if (!valid_node_versions.includes(major)) {
133
134
  throw new Error(
134
- `Unsupported Node.js version: ${process.version}. Please use Node ${valid_node_versions.slice(0, -1).join(', ')} or ${valid_node_versions.at(-1)} to build your project, or explicitly specify a runtime in your adapter configuration.`
135
+ `Unsupported Node.js version: ${process.version}. Please use Node ${formatter.format(valid_node_versions.map((v) => `${v}`))} to build your project, or explicitly specify a runtime in your adapter configuration.`
135
136
  );
136
137
  }
137
138