update node_modules

This commit is contained in:
bitkarrot
2022-03-20 22:29:16 -07:00
parent c97bfff58e
commit ff7f8a6ab0
115 changed files with 5651 additions and 2419 deletions

11
node_modules/cookie/HISTORY.md generated vendored
View File

@@ -1,3 +1,14 @@
0.4.2 / 2022-02-02
==================
* pref: read value only when assigning in parse
* pref: remove unnecessary regexp in parse
0.4.1 / 2020-04-21
==================
* Fix `maxAge` option to reject invalid values
0.4.0 / 2019-05-15
==================

73
node_modules/cookie/README.md generated vendored
View File

@@ -3,13 +3,17 @@
[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][travis-image]][travis-url]
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Basic HTTP cookie parser and serializer for HTTP servers.
## Installation
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
$ npm install cookie
```
@@ -194,32 +198,61 @@ $ npm test
```
$ npm run bench
> cookie@0.3.1 bench cookie
> cookie@0.4.1 bench
> node benchmark/index.js
http_parser@2.8.0
node@6.14.2
v8@5.1.281.111
uv@1.16.1
node@16.13.1
v8@9.4.146.24-node.14
uv@1.42.0
zlib@1.2.11
ares@1.10.1-DEV
icu@58.2
modules@48
napi@3
openssl@1.0.2o
brotli@1.0.9
ares@1.18.1
modules@93
nghttp2@1.45.1
napi@8
llhttp@6.0.4
openssl@1.1.1l+quic
cldr@39.0
icu@69.1
tz@2021a
unicode@13.0
ngtcp2@0.1.0-DEV
nghttp3@0.1.0-DEV
> node benchmark/parse-top.js
cookie.parse - top sites
15 tests completed.
parse accounts.google.com x 504,358 ops/sec ±6.55% (171 runs sampled)
parse apple.com x 1,369,991 ops/sec ±0.84% (189 runs sampled)
parse cloudflare.com x 360,669 ops/sec ±3.75% (182 runs sampled)
parse docs.google.com x 521,496 ops/sec ±4.90% (180 runs sampled)
parse drive.google.com x 553,514 ops/sec ±0.59% (189 runs sampled)
parse en.wikipedia.org x 286,052 ops/sec ±0.62% (188 runs sampled)
parse linkedin.com x 178,817 ops/sec ±0.61% (192 runs sampled)
parse maps.google.com x 284,585 ops/sec ±0.68% (188 runs sampled)
parse microsoft.com x 161,230 ops/sec ±0.56% (192 runs sampled)
parse play.google.com x 352,144 ops/sec ±1.01% (181 runs sampled)
parse plus.google.com x 275,204 ops/sec ±7.78% (156 runs sampled)
parse support.google.com x 339,493 ops/sec ±1.02% (191 runs sampled)
parse www.google.com x 286,110 ops/sec ±0.90% (191 runs sampled)
parse youtu.be x 548,557 ops/sec ±0.60% (184 runs sampled)
parse youtube.com x 545,293 ops/sec ±0.65% (191 runs sampled)
> node benchmark/parse.js
cookie.parse
cookie.parse - generic
6 tests completed.
simple x 1,200,691 ops/sec ±1.12% (189 runs sampled)
decode x 1,012,994 ops/sec ±0.97% (186 runs sampled)
unquote x 1,074,174 ops/sec ±2.43% (186 runs sampled)
duplicates x 438,424 ops/sec ±2.17% (184 runs sampled)
10 cookies x 147,154 ops/sec ±1.01% (186 runs sampled)
100 cookies x 14,274 ops/sec ±1.07% (187 runs sampled)
simple x 1,266,646 ops/sec ±0.65% (191 runs sampled)
decode x 838,413 ops/sec ±0.60% (191 runs sampled)
unquote x 877,820 ops/sec ±0.72% (189 runs sampled)
duplicates x 516,680 ops/sec ±0.61% (191 runs sampled)
10 cookies x 156,874 ops/sec ±0.52% (189 runs sampled)
100 cookies x 14,663 ops/sec ±0.53% (191 runs sampled)
```
## References
@@ -244,10 +277,10 @@ $ npm run bench
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/cookie/master
[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master
[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/cookie/ci/master?label=ci
[github-actions-ci-url]: https://github.com/jshttp/cookie/actions/workflows/ci.yml
[node-version-image]: https://badgen.net/npm/node/cookie
[node-version-url]: https://nodejs.org/en/download
[npm-downloads-image]: https://badgen.net/npm/dm/cookie
[npm-url]: https://npmjs.org/package/cookie
[npm-version-image]: https://badgen.net/npm/v/cookie
[travis-image]: https://badgen.net/travis/jshttp/cookie/master
[travis-url]: https://travis-ci.org/jshttp/cookie

28
node_modules/cookie/index.js generated vendored
View File

@@ -22,7 +22,6 @@ exports.serialize = serialize;
var decode = decodeURIComponent;
var encode = encodeURIComponent;
var pairSplitRegExp = /; */;
/**
* RegExp to match field-content in RFC 7230 sec 3.2
@@ -53,28 +52,29 @@ function parse(str, options) {
var obj = {}
var opt = options || {};
var pairs = str.split(pairSplitRegExp);
var pairs = str.split(';')
var dec = opt.decode || decode;
for (var i = 0; i < pairs.length; i++) {
var pair = pairs[i];
var eq_idx = pair.indexOf('=');
var index = pair.indexOf('=')
// skip things that don't look like key=value
if (eq_idx < 0) {
if (index < 0) {
continue;
}
var key = pair.substr(0, eq_idx).trim()
var val = pair.substr(++eq_idx, pair.length).trim();
// quoted values
if ('"' == val[0]) {
val = val.slice(1, -1);
}
var key = pair.substring(0, index).trim()
// only assign once
if (undefined == obj[key]) {
var val = pair.substring(index + 1, pair.length).trim()
// quoted values
if (val[0] === '"') {
val = val.slice(1, -1)
}
obj[key] = tryDecode(val, dec);
}
}
@@ -120,7 +120,11 @@ function serialize(name, val, options) {
if (null != opt.maxAge) {
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);
}

20
node_modules/cookie/package.json generated vendored
View File

@@ -1,7 +1,7 @@
{
"name": "cookie",
"description": "HTTP server cookie parsing and serialization",
"version": "0.4.0",
"version": "0.4.2",
"author": "Roman Shtylman <shtylman@gmail.com>",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>"
@@ -15,10 +15,11 @@
"devDependencies": {
"beautify-benchmark": "0.2.4",
"benchmark": "2.1.4",
"eslint": "5.16.0",
"eslint-plugin-markdown": "1.0.0",
"istanbul": "0.4.5",
"mocha": "6.1.4"
"eslint": "7.32.0",
"eslint-plugin-markdown": "2.2.1",
"mocha": "9.2.0",
"nyc": "15.1.0",
"top-sites": "1.1.85"
},
"files": [
"HISTORY.md",
@@ -31,10 +32,11 @@
},
"scripts": {
"bench": "node benchmark/index.js",
"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/",
"lint": "eslint .",
"test": "mocha --reporter spec --bail --check-leaks --ui qunit test/",
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test",
"update-bench": "node scripts/update-benchmark.js",
"version": "node scripts/version-history.js && git add HISTORY.md"
}
}