You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@vercel/node

Package Overview
Dependencies
Maintainers
8
Versions
403
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/node - npm Package Compare versions

Comparing version
5.3.20
to
5.3.21
+23
-0
dist/dev-server.mjs

@@ -1304,2 +1304,25 @@ var __create = Object.create;

}
const publicDir = process.env.VERCEL_DEV_PUBLIC_DIR;
if (publicDir && req.url) {
const { join: join2 } = await import("path");
const { existsSync, statSync } = await import("fs");
const { readFile: readFile2 } = await import("fs/promises");
const staticPath = join2(process.cwd(), publicDir, req.url);
if (existsSync(staticPath) && statSync(staticPath).isFile()) {
try {
const content = await readFile2(staticPath);
const { extname: extname2 } = await import("path");
const { contentType } = await import("mime-types");
const url = new URL(req.url || "/", "http://localhost");
const ext = extname2(url.pathname);
const mimeType = contentType(ext) || "application/octet-stream";
res.setHeader("Content-Type", mimeType);
res.setHeader("Content-Length", content.length);
res.statusCode = 200;
res.end(content);
return;
} catch (error) {
}
}
}
if (!handleEvent) {

@@ -1306,0 +1329,0 @@ res.statusCode = 500;

+3
-1
{
"name": "@vercel/node",
"version": "5.3.20",
"version": "5.3.21",
"license": "Apache-2.0",

@@ -30,2 +30,3 @@ "main": "./dist/index",

"etag": "1.8.1",
"mime-types": "2.1.35",
"node-fetch": "2.6.9",

@@ -49,2 +50,3 @@ "path-to-regexp-updated": "npm:path-to-regexp@6.3.0",

"@types/jest": "29.5.0",
"@types/mime-types": "2.1.4",
"@vitest/expect": "1.4.0",

@@ -51,0 +53,0 @@ "content-type": "1.0.5",

Sorry, the diff of this file is too big to display