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 1.1.0-beta.31 to 1.1.0-beta.32

50

dist/index.js

@@ -1,6 +0,22 @@

"use strict";
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __export = (target, all) => {

@@ -68,14 +84,8 @@ for (var name in all)

const [[name, value], ...attributes] = parseCookieString(setCookie);
const { domain, expires, httponly, maxage, path, samesite, secure } = Object.fromEntries(
attributes.map(([key, value2]) => [key.toLowerCase(), value2])
);
const options = {
domain,
...expires && { expires: new Date(expires) },
...httponly && { httpOnly: true },
...typeof maxage === "string" && { maxAge: Number(maxage) },
path,
...samesite && { sameSite: parseSameSite(samesite) },
...secure && { secure: true }
};
const { domain, expires, httponly, maxage, path, samesite, secure } = Object.fromEntries(attributes.map(([key, value2]) => [key.toLowerCase(), value2]));
const options = __spreadValues(__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({
domain
}, expires && { expires: new Date(expires) }), httponly && { httpOnly: true }), typeof maxage === "string" && { maxAge: Number(maxage) }), {
path
}), samesite && { sameSite: parseSameSite(samesite) }), secure && { secure: true });
return {

@@ -142,5 +152,3 @@ name,

[Symbol.for("edge-runtime.inspect.custom")]() {
return `ResponseCookies ${JSON.stringify(
Object.fromEntries(this.parsed())
)}`;
return `ResponseCookies ${JSON.stringify(Object.fromEntries(this.parsed()))}`;
}

@@ -200,6 +208,3 @@ };

map.set(name, value);
this.headers.set(
"cookie",
[...map].map(([key, value2]) => serialize(key, value2, {})).join("; ")
);
this.headers.set("cookie", [...map].map(([key, value2]) => serialize(key, value2, {})).join("; "));
return this;

@@ -210,6 +215,3 @@ }

const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name));
this.headers.set(
"cookie",
[...map].map(([key, value]) => serialize(key, value, {})).join("; ")
);
this.headers.set("cookie", [...map].map(([key, value]) => serialize(key, value, {})).join("; "));
return result;

@@ -216,0 +218,0 @@ }

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

"homepage": "https://edge-runtime.vercel.app/packages/cookies",
"version": "1.1.0-beta.31",
"version": "1.1.0-beta.32",
"main": "dist/index.js",

@@ -23,4 +23,4 @@ "module": "dist/index.mjs",

"devDependencies": {
"@edge-runtime/format": "1.1.0-beta.31",
"@edge-runtime/jest-environment": "1.1.0-beta.31",
"@edge-runtime/format": "1.1.0-beta.32",
"@edge-runtime/jest-environment": "1.1.0-beta.32",
"@types/cookie": "0.5.1",

@@ -32,2 +32,7 @@ "tsup": "6"

],
"license": "MPLv2",
"publishConfig": {
"access": "public"
},
"types": "dist/index.d.ts",
"scripts": {

@@ -39,9 +44,3 @@ "build": "tsup",

"test": "jest"
},
"license": "MPLv2",
"publishConfig": {
"access": "public"
},
"types": "dist/index.d.ts",
"gitHead": "68c4c0ba7d6a8800c5aa0df1675a22d0404066da"
}
}
}

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