Comparing version 0.4.0 to 0.4.1
@@ -0,1 +1,6 @@ | ||
0.4.1 / 2020-04-21 | ||
================== | ||
* Fix `maxAge` option to reject invalid values | ||
0.4.0 / 2019-05-15 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -123,3 +123,7 @@ /*! | ||
var maxAge = opt.maxAge - 0; | ||
if (isNaN(maxAge)) throw new Error('maxAge should be a Number'); | ||
if (isNaN(maxAge) || !isFinite(maxAge)) { | ||
throw new TypeError('option maxAge is invalid') | ||
} | ||
str += '; Max-Age=' + Math.floor(maxAge); | ||
@@ -126,0 +130,0 @@ } |
{ | ||
"name": "cookie", | ||
"description": "HTTP server cookie parsing and serialization", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"author": "Roman Shtylman <shtylman@gmail.com>", | ||
@@ -18,6 +18,6 @@ "contributors": [ | ||
"benchmark": "2.1.4", | ||
"eslint": "5.16.0", | ||
"eslint-plugin-markdown": "1.0.0", | ||
"istanbul": "0.4.5", | ||
"mocha": "6.1.4" | ||
"eslint": "6.8.0", | ||
"eslint-plugin-markdown": "1.0.2", | ||
"mocha": "7.1.1", | ||
"nyc": "15.0.1" | ||
}, | ||
@@ -36,7 +36,7 @@ "files": [ | ||
"lint": "eslint --plugin markdown --ext js,md .", | ||
"test": "mocha --reporter spec --bail --check-leaks test/", | ||
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", | ||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", | ||
"test": "mocha --reporter spec --bail --check-leaks --ui qunit test/", | ||
"test-ci": "nyc --reporter=text npm test", | ||
"test-cov": "nyc --reporter=html --reporter=text npm test", | ||
"version": "node scripts/version-history.js && git add HISTORY.md" | ||
} | ||
} |
@@ -13,2 +13,6 @@ # cookie | ||
This is a [Node.js](https://nodejs.org/en/) module available through the | ||
[npm registry](https://www.npmjs.com/). Installation is done using the | ||
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): | ||
```sh | ||
@@ -15,0 +19,0 @@ $ npm install cookie |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18123
163
258