Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sveltejs/adapter-vercel

Package Overview
Dependencies
Maintainers
4
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sveltejs/adapter-vercel - npm Package Compare versions

Comparing version 3.0.3 to 3.1.0

6

index.d.ts

@@ -8,6 +8,6 @@ import { Adapter } from '@sveltejs/kit';

/**
* Whether to use [Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) or [Serverless Functions](https://vercel.com/docs/concepts/functions/serverless-functions)
* Whether to use [Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) (`'edge'`) or [Serverless Functions](https://vercel.com/docs/concepts/functions/serverless-functions) (`'nodejs18.x'`, `'nodejs20.x'` etc).
* @default 'nodejs18.x'
*/
runtime?: 'nodejs16.x' | 'nodejs18.x';
runtime?: `nodejs${number}.x`;
/**

@@ -59,3 +59,3 @@ * To which regions to deploy the app. A list of regions.

/**
* Whether to use [Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) or [Serverless Functions](https://vercel.com/docs/concepts/functions/serverless-functions)
* Whether to use [Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) (`'edge'`) or [Serverless Functions](https://vercel.com/docs/concepts/functions/serverless-functions) (`'nodejs18.x'`, `'nodejs20.x'` etc).
*/

@@ -62,0 +62,0 @@ runtime?: 'edge';

@@ -8,4 +8,2 @@ import fs from 'node:fs';

const VALID_RUNTIMES = ['edge', 'nodejs16.x', 'nodejs18.x'];
const DEFAULT_FUNCTION_NAME = 'fn';

@@ -17,5 +15,6 @@

if (major === '18') return 'nodejs18.x';
if (major === '20') return 'nodejs20.x';
throw new Error(
`Unsupported Node.js version: ${process.version}. Please use Node 16 or Node 18 to build your project, or explicitly specify a runtime in your adapter configuration.`
`Unsupported Node.js version: ${process.version}. Please use Node 16, Node 18 or Node 20 to build your project, or explicitly specify a runtime in your adapter configuration.`
);

@@ -169,7 +168,7 @@ };

if (runtime && !VALID_RUNTIMES.includes(runtime)) {
const node_runtime = /nodejs([0-9]+)\.x/.exec(runtime);
if (runtime !== 'edge' && (!node_runtime || node_runtime[1] < 16)) {
throw new Error(
`Invalid runtime '${runtime}' for route ${
route.id
}. Valid runtimes are ${VALID_RUNTIMES.join(', ')}`
`Invalid runtime '${runtime}' for route ${route.id}. Valid runtimes are 'edge' and 'nodejs16.x' or higher ` +
'(see the Node.js Version section in your Vercel project settings for info on the currently supported versions).'
);

@@ -181,5 +180,5 @@ }

if (runtime !== 'nodejs16.x' && runtime !== 'nodejs18.x') {
if (!runtime.startsWith('nodejs')) {
throw new Error(
`${directory}: Routes using \`isr\` must use either \`runtime: 'nodejs16.x'\` or \`runtime: 'nodejs18.x'\``
`${directory}: Routes using \`isr\` must use a Node.js runtime (for example 'nodejs20.x')`
);

@@ -186,0 +185,0 @@ }

{
"name": "@sveltejs/adapter-vercel",
"version": "3.0.3",
"version": "3.1.0",
"description": "A SvelteKit adapter that creates a Vercel app",

@@ -28,3 +28,3 @@ "repository": {

"dependencies": {
"@vercel/nft": "^0.23.0",
"@vercel/nft": "^0.24.0",
"esbuild": "^0.18.11"

@@ -35,4 +35,4 @@ },

"typescript": "^4.9.4",
"vitest": "^0.33.0",
"@sveltejs/kit": "^1.22.4"
"vitest": "^0.34.5",
"@sveltejs/kit": "^1.27.6"
},

@@ -43,3 +43,3 @@ "peerDependencies": {

"scripts": {
"lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
"lint": "prettier --check .",
"format": "pnpm lint --write",

@@ -46,0 +46,0 @@ "check": "tsc",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc