Socket
Socket
Sign inDemoInstall

node-cookie

Package Overview
Dependencies
4
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.1 to 2.1.2

10

CHANGELOG.md

@@ -0,1 +1,11 @@

## [2.1.2](https://github.com/poppinss/node-cookie/compare/v2.1.1...v2.1.2) (2020-03-20)
### Bug Fixes
* reassign cookies var to array if needed (fixes [#8](https://github.com/poppinss/node-cookie/issues/8)) ([#9](https://github.com/poppinss/node-cookie/issues/9)) ([7e051fe](https://github.com/poppinss/node-cookie/commit/7e051fef9b5187c5a8315f4e8acd757fbbd9c315))
* update cookie dependency cookie to 0.4.0 ([#11](https://github.com/poppinss/node-cookie/issues/11)) ([c079cfa](https://github.com/poppinss/node-cookie/commit/c079cfaee7469624476a59f79e7cf1c031ba3b46))
<a name="2.1.1"></a>

@@ -2,0 +12,0 @@ ## [2.1.1](https://github.com/poppinss/node-cookie/compare/v2.1.0...v2.1.1) (2018-08-22)

10

index.js

@@ -51,3 +51,3 @@ 'use strict'

*/
let Cookie = exports = module.exports = {}
const Cookie = exports = module.exports = {}

@@ -164,4 +164,4 @@ /**

Cookie._append = function (res, cookie) {
const cookies = res.getHeader('Set-Cookie') || []
Array.isArray(cookies) ? cookies.push(cookie) : [cookies].push(cookie)
let cookies = res.getHeader('Set-Cookie') || []
Array.isArray(cookies) ? cookies.push(cookie) : (cookies = [cookies]).push(cookie)
res.setHeader('Set-Cookie', cookies.map(String))

@@ -216,3 +216,3 @@ }

Cookie._parseCookies = function (req) {
const cookieString = req.headers['cookie']
const cookieString = req.headers.cookie
return cookieString ? parser.parse(cookieString) : {}

@@ -295,3 +295,3 @@ }

cookies = cookies || Cookie._parseCookies(req)
let cookie = cookies[key]
const cookie = cookies[key]

@@ -298,0 +298,0 @@ /**

{
"name": "node-cookie",
"version": "2.1.1",
"version": "2.1.2",
"description": "sign, encrypt and parse http cookies",

@@ -12,7 +12,3 @@ "main": "index.js",

"pretest": "npm run lint",
"posttest": "npm run coverage",
"test:local": "FORCE_COLOR=true node bin/index.js --local",
"test": "./node_modules/.bin/nyc npm run test:local",
"test:win": "set FORCE_COLOR=true && node bin/index.js --win",
"coverage": "nyc report --reporter=text-lcov | coveralls"
"test": "node japaFile.js"
},

@@ -27,15 +23,13 @@ "keywords": [

"dependencies": {
"cookie": "^0.3.1",
"cookie": "^0.4.0",
"cookie-signature": "^1.1.0",
"simple-encryptor": "^1.4.0"
"simple-encryptor": "^3.0.0"
},
"devDependencies": {
"coveralls": "^3.0.2",
"cz-conventional-changelog": "^2.1.0",
"japa": "^1.0.6",
"cz-conventional-changelog": "^3.1.0",
"japa": "^3.0.1",
"japa-cli": "^1.0.1",
"lodash": "^4.17.10",
"nyc": "^12.0.2",
"standard": "^11.0.1",
"supertest": "^3.1.0"
"lodash": "^4.17.15",
"standard": "^14.3.3",
"supertest": "^4.0.2"
},

@@ -42,0 +36,0 @@ "directories": {

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc