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

@vercel/node

Package Overview
Dependencies
Maintainers
12
Versions
296
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 1.7.5-canary.1 to 1.7.5-canary.2

12

dist/helpers.js

@@ -712,2 +712,13 @@ module.exports =

}
function redirect(res, statusOrUrl, url) {
if (typeof statusOrUrl === 'string') {
url = statusOrUrl;
statusOrUrl = 307;
}
if (typeof statusOrUrl !== 'number' || typeof url !== 'string') {
throw new Error(`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`);
}
res.writeHead(statusOrUrl, { Location: url }).end();
return res;
}
function setCharset(type, charset) {

@@ -872,2 +883,3 @@ // eslint-disable-next-line @typescript-eslint/no-var-requires

res.status = statusCode => status(res, statusCode);
res.redirect = (statusOrUrl, url) => redirect(res, statusOrUrl, url);
res.send = body => send(req, res, body);

@@ -874,0 +886,0 @@ res.json = jsonBody => json(req, res, jsonBody);

1

dist/index.d.ts

@@ -19,3 +19,4 @@ /// <reference types="node" />

status: (statusCode: number) => NowResponse;
redirect: (statusOrUrl: string | number, url?: string) => NowResponse;
};
export declare type NowApiHandler = (req: NowRequest, res: NowResponse) => void;

4

package.json
{
"name": "@vercel/node",
"version": "1.7.5-canary.1",
"version": "1.7.5-canary.2",
"license": "MIT",

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

},
"gitHead": "ad0cc858ed08685d313ccd5d4ac90a3c8ad63b32"
"gitHead": "7945155a0f1c3a3df25e1c1185e270c6d564ec73"
}
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