New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@edge-runtime/cookies

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@edge-runtime/cookies - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

4

dist/index.d.ts

@@ -117,3 +117,3 @@ // Type definitions for cookie 0.5

*/
interface CookieListItem extends Pick<CookieSerializeOptions, 'domain' | 'path' | 'expires' | 'secure' | 'sameSite'> {
interface CookieListItem extends Pick<CookieSerializeOptions, 'domain' | 'path' | 'secure' | 'sameSite'> {
/** A string with the name of a cookie. */

@@ -123,2 +123,4 @@ name: string;

value: string;
/** A number of milliseconds or Date interface containing the expires of the cookie. */
expires?: number | CookieSerializeOptions['expires'];
}

@@ -125,0 +127,0 @@ /**

@@ -32,3 +32,3 @@ "use strict";

"path" in c && c.path && `Path=${c.path}`,
"expires" in c && c.expires && `Expires=${c.expires.toUTCString()}`,
"expires" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === "number" ? new Date(c.expires) : c.expires).toUTCString()}`,
"maxAge" in c && c.maxAge && `Max-Age=${c.maxAge}`,

@@ -211,2 +211,5 @@ "domain" in c && c.domain && `Domain=${c.domain}`,

function normalizeCookie(cookie = { name: "", value: "" }) {
if (typeof cookie.expires === "number") {
cookie.expires = new Date(cookie.expires);
}
if (cookie.maxAge) {

@@ -213,0 +216,0 @@ cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3);

@@ -5,3 +5,3 @@ {

"homepage": "https://edge-runtime.vercel.app/packages/cookies",
"version": "3.0.5",
"version": "3.0.6",
"main": "dist/index.js",

@@ -8,0 +8,0 @@ "module": "dist/index.mjs",

Sorry, the diff of this file is not supported yet

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